jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23382
Joined: Sat Jul 30, 2011 7:41 pm

Beta testers needed - HW cursor testing

Wed Feb 19, 2014 10:37 am

Hello all,

I've written a HW cursor driver based on the FBturbo driver already used on the Raspi. I need people to try it out before its pushed in to general use.

You will need to do an rpi-update to get the correct firmware (released last friday), and also download and build my version of the FBTurbo driver.

Code is here

https://github.com/JamesH65/xf86-video-fbturbo

Instruction on build/install here…

https://github.com/ssvb/xf86-video-fbtu ... stallation

You will need to set the HW cursor to on in config file here /usr/share/X11/xorg.conf.d/99-fbturbo.conf

Option “HWCursor” “true”



Have fun - please report any issues here.

James
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23382
Joined: Sat Jul 30, 2011 7:41 pm

Re: Beta testers needed

Wed Feb 19, 2014 12:29 pm

Ooops, forgot to say - the branch you need from my github is the hwcursor2 one

I'll update master at some point today.

EDIT: Have updated master so you can use that or the hwcursor2 branch.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Beta testers needed

Wed Feb 19, 2014 6:09 pm

I did all the steps and my RPI still works and I can still VNC into and edit in Scratch via X11VNC.

But how can I prove I'm running the new setup? (In case i'm made a mistook)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5318
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Beta testers needed

Wed Feb 19, 2014 8:48 pm

simplesi wrote:I did all the steps and my RPI still works and I can still VNC into and edit in Scratch via X11VNC.
I don't think you can test through VNC. In theory the cursor shouldn't be visible through VNC (although it is possible HW cursors get disabled, or rendered through a different mechanism when VNC is used).

If you are not using VNC, then I believe waggling the mouse furiously should make the CPU hit 100%. If you have the HW cursor I believe the CPU wil remain lower.

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Beta testers needed

Thu Feb 20, 2014 12:35 am

I think we need something a bit more definitive than mouse waggling as a indication of install sucess :)

I can't get 100% CPU due to mouse waggling unless I run Scratch - waggling on plain desktop is 50% via VNC, 30% using wireless kbd/mouse/monitor on beta system (if I installed it right that is)

I Just wanted to make sure that mod didn't muck up X11VNC as that's what I use in schools - not expecting any speed increase - just happy if it still works :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: Beta testers needed

Thu Feb 20, 2014 8:08 am

I did this:

Code: Select all

git clone https://github.com/JamesH65/xf86-video-fbturbo.git 
cd xf86-video-fbturbo/
autoreconf -vi
./configure --prefix=/usr
make
sudo make install
sudo cp xorg.conf /etc/X11/xorg.conf
and rebooted. After that startx gives:
$ startx


X.Org X Server 1.12.4
Release Date: 2012-08-27
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.2.0-2-mx5 armv7l Debian
Current Operating System: Linux raspberry2 3.10.30+ #640 PREEMPT Fri Feb 14 19:09:14 GMT 2014 armv6l
Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1680 bcm2708_fb.fbheight=1050 bcm2708.boardrev=0xe bcm2708.serial=0xa0b1eba1 smsc95xx.macaddr=B8:27:EB:B1:EB:A1 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
Build Date: 18 December 2013 05:20:52PM
xorg-server 2:1.12.4-6+deb7u2 (Julien Cristau <[email protected]>)
Current version of pixman: 0.29.3
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Thu Feb 20 10:03:58 2014
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
FATAL: Module g2d_23 not found.
xinit: connection to X server lost
more info:

Code: Select all

$ sudo find / -name g2d_23* -print
does not find anything.

Code: Select all

$ cat /usr/share/X11/xorg.conf.d/99-fbturbo.conf
cat: /usr/share/X11/xorg.conf.d/99-fbturbo.conf: No such file or directory
What did I do wrong?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23382
Joined: Sat Jul 30, 2011 7:41 pm

Re: Beta testers needed

Thu Feb 20, 2014 9:31 am

Hmm. Dunno.

I don't use xorg.conf, just the 99-fbturbo.conf one in to which I add the Option “HWCursor” “true”stuff. I'm out of office today, so cannot post the 99 one that I have. Surprised you don't have the 99 file on the system...don't remember having to create a new one on mine.

Ignore the missing module error. That nothing to do with the cursor.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: Beta testers needed

Thu Feb 20, 2014 9:50 am

can't ignore that missing module since it prevents X from starting.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23382
Joined: Sat Jul 30, 2011 7:41 pm

Re: Beta testers needed

Thu Feb 20, 2014 11:08 am

I think its because of the xorg.conf you are using - delete that and use the 99- one instead.

Although, did you rpi-update? You will need the latest firmware.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: Beta testers needed

Thu Feb 20, 2014 1:25 pm

$ v.sh
Linux raspberry2 3.10.30+ #640 PREEMPT Fri Feb 14 19:09:14 GMT 2014 armv6l GNU/Linux
Feb 17 2014 21:35:01
Copyright (c) 2012 Broadcom
version f5c67bfc77e918b2c89a130bd2682dcab5903490 (clean) (release)

Should be fresh.
If somebody can paste that 99- file, I can try. It can't be big.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23382
Joined: Sat Jul 30, 2011 7:41 pm

Re: Beta testers needed

Thu Feb 20, 2014 1:56 pm

It's just a few lines.

I'm in the office tomorrow, so will post it then.

Although not sure why you don't already have one. It should be here /usr/share/X11/xorg.conf.d/99-fbturbo.conf IIRC.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

asb
Forum Moderator
Forum Moderator
Posts: 853
Joined: Fri Sep 16, 2011 7:16 pm
Contact: Website

Re: Beta testers needed

Thu Feb 20, 2014 4:55 pm

jamesh wrote:I think its because of the xorg.conf you are using - delete that and use the 99- one instead.

Although, did you rpi-update? You will need the latest firmware.
People with an older image will need to apt-get install xserver-xorg-video-fbturbo as well (everyone do this, now! It's a big improvement). That gives the fbturbo baseline and installs 99-fbturbo.conf.

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Beta testers needed

Thu Feb 20, 2014 5:28 pm

AS well as rpi-update?

Will we have to go through james's install process again afterwards?

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23382
Joined: Sat Jul 30, 2011 7:41 pm

Re: Beta testers needed

Thu Feb 20, 2014 6:14 pm

asb wrote:
jamesh wrote:I think its because of the xorg.conf you are using - delete that and use the 99- one instead.

Although, did you rpi-update? You will need the latest firmware.
People with an older image will need to apt-get install xserver-xorg-video-fbturbo as well (everyone do this, now! It's a big improvement). That gives the fbturbo baseline and installs 99-fbturbo.conf.
Thanks Alex, that explains what's missing. Was pondering what I had done on my install that meant it all worked!

As Alex say, fbturbo really is a big improvement. Try dragging a window around before and after and feel the speeeeed!

Once installed, then you can install my version of fbturbo using the instructions above, do an rpi-update, and the appropriate enabled code in the 99- file, restart X if you had it running. And then tell me if you notice any difference at all! Good news would be 'didn't see any difference', best news if you see a performance improvement.

You can also reduce the mouse poll speed which also makes a huge difference in QT and GTK apps. I'll need to post about that tomorrow as my notes on it are at work.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Beta testers needed

Thu Feb 20, 2014 6:20 pm

Can we just clarify the order that needs doing for us slow ones please :)

I originally rpi-updated and then did your instructions, I've not done Alex's stuff ye,t do I need to start again?

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23382
Joined: Sat Jul 30, 2011 7:41 pm

Re: Beta testers needed

Thu Feb 20, 2014 6:23 pm

DO the standard fb install as asb wrote in previous post.

Do rpi-update if not already done

Then, if you have already built the modified driver, go to its root folder (xf something usually)

sudo make install

Now edit the 99- file to add the cursor enable

Restart X
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Beta testers needed

Thu Feb 20, 2014 10:30 pm

FOund the issue
I just followed the github instructions and did't come back to your post and do the extra edit on the 99- file :)

So I did that -rebooted but I still don't think its working as waggling mouse on desktop gets me to about 40% CPU

(This is plain using wireless mouse not via VNC - but I get same response via VNC on another RPi so it makes me think I've not got it working

Is there a better test to see if everything is installed ?

Simon



Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: Beta testers needed

Fri Feb 21, 2014 8:17 am

ok, doing

Code: Select all

 sudo apt-get install xserver-xorg-video-fbturbo
created the missing /usr/share/X11/xorg.conf.d/99-fbturbo.conf
and my startx works again.

Tested mouse move with and without
  • Option "HWCursor" "true"
But I did not see any performance increase. I was able to get X to use 10% CPU by moving mouse quickly on an empty screen.
Good thing is that it seems to work, but I agree with simplesi that this test does not proove that new HW cursor is in use.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23382
Joined: Sat Jul 30, 2011 7:41 pm

Re: Beta testers needed

Fri Feb 21, 2014 9:56 am

do

cat /var/log/Xorg.0.log | grep -i cursor

And it will tell you if it has detected and is using the cursor.

You wont see massive performance improvements (often the app itself handles mouse messages badly which is where all the overhead is), but the HW cursor will not flicker during certain graphics operations, and there are other hidden benefits.

To get even more of a speed up though, reduce the mouse poll rate as follows...

edit the /boot/cmdline.txt file and add to the end of the command line

usbhid.mousepoll=20

See if that improves the CPU with wiggling.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Beta testers needed

Fri Feb 21, 2014 9:59 am

"failed to enable hardware cursor" :(

I'll try all the steps again :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Beta testers needed

Fri Feb 21, 2014 10:13 am

Same result 2nd time around
Lets wait til someone else tries it to see if its me or the instructions :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: Beta testers needed

Fri Feb 21, 2014 10:15 am

Code: Select all

$ cat /var/log/Xorg.0.log | grep -i cursor
[   221.722] (**) FBTURBO(0): Option "HWCursor" "true"
[   221.785] (II) FBTURBO(0): failed to enable hardware cursor
I wonder what is wrong?

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Beta testers needed

Fri Feb 21, 2014 10:26 am

You wont see massive performance improvements
hang on !!! I'm sure you sold this to us as being the best thing since Speedy Gonzales took to the streets! :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: Beta testers needed

Fri Feb 21, 2014 10:29 am

I think there is something wrong.
I did this new HWcursor xf86-video-fbturbo sudo make install again and after that X does not start.
I see that installs these files:

Code: Select all

 $ ll /usr/lib/xorg/modules/drivers/
total 324
-rw-r--r-- 1 root root  18688 May 23  2012 fbdev_drv.so
-rwxr-xr-x 1 root root    955 Feb 21 12:19 fbturbo_drv.la
-rwxr-xr-x 1 root root 306894 Feb 21 12:19 fbturbo_drv.so
Then I reinstalled xserver-xorg-video-fbturbo and X started working, but those module drivers are now different:

Code: Select all

$ ll /usr/lib/xorg/modules/drivers/
total 72
-rw-r--r-- 1 root root 18688 May 23  2012 fbdev_drv.so
-rw-r--r-- 1 root root   955 Dec 12 00:27 fbturbo_drv.la
-rw-r--r-- 1 root root 48196 Dec 12 00:27 fbturbo_drv.so

Maybe there is mismatch on those dirvers?

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: Beta testers needed

Fri Feb 21, 2014 10:34 am

but after that HWcursor seems to work:
  • $ cat /var/log/Xorg.0.log | grep -i cursor
    [ 7702.066] (**) FBTURBO(0): Option "HWCursor" "true"
    [ 7702.096] (II) FBTURBO(0): Detecting Raspi HW cursor...
    [ 7702.096] (**) FBTURBO(0): raspberry_cursor_init: Entered
    [ 7702.097] (**) FBTURBO(0): raspberry_cursor_init: Detected firmware version 1392672901)
    [ 7702.097] (II) FBTURBO(0): using Raspi hardware cursor
I still see no improvment in performance though. And there is an ugly spot in the middle of the screen. And I got memory leak information when closing X.
Reboooting to clear the situation.

Return to “Graphics, sound and multimedia”