User avatar
neobusy
Posts: 18
Joined: Mon Dec 03, 2012 11:24 am

Accelerated x driver?

Mon Dec 30, 2013 4:53 pm

I just read about this in the news http://www.raspberrypi.org/archives/5580

[*]New hardware-accelerated X driver included and enabled by default.

I set my raspbian up several months ago and I run apt-get upgrade / dist-upgrade on a regular base. Do I get the accelerated x driver this way too? How can I see which x driver is active?

Thank you.

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

Re: Accelerated x driver?

Mon Dec 30, 2013 5:05 pm

sudo rpi-update

to get the latest firmware, plus the other stuff and you should get it I think, but check out the thread on it for instructions to check the procedure.
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."

User avatar
neobusy
Posts: 18
Joined: Mon Dec 03, 2012 11:24 am

Re: Accelerated x driver?

Mon Dec 30, 2013 5:12 pm

I will do so, thanks for pointing me to this utility!

User avatar
bleep42
Posts: 153
Joined: Wed Mar 07, 2012 12:43 pm
Location: Sussex

Re: Accelerated x driver?

Mon Dec 30, 2013 5:22 pm

Hi neobusy,
I don't believe a standard update will do it, you need to see this thread. http://www.raspberrypi.org/phpBB3/viewt ... 17#p467617 This is what I've done to an old standard Raspbian install and it's working fine. :-)
Regards, Kevin.

dr_d_gee
Posts: 84
Joined: Fri Jan 04, 2013 1:30 pm

Re: Accelerated x driver?

Fri Jan 03, 2014 1:39 pm

I followed the instructions in the post bleep42 referred to--installing the new accelerated driver and then restarting X--and it's fine; the performance is significantly better than before.

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

Re: Accelerated x driver?

Fri Jan 03, 2014 4:06 pm

There's also a very recent (yesterday) firmware change that might give an extra 10-20% CPU or so when dragging windows and suchlike.
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."

User avatar
neobusy
Posts: 18
Joined: Mon Dec 03, 2012 11:24 am

Re: Accelerated x driver?

Sun Jan 12, 2014 10:43 pm

I'm not sure if this is the problem I have right now. My Pi is connected to a HDTV with HDMI and running Xfce on Raspbian. I updated the system with rpi-update and verified, that the new fbturbo driver is used.

However, I noticed a huge jump in cpu usage when moving my mouse cursor on the Xfce Desktop without any programs open. According to top it's ~25% for xfdesktop and ~20% for Xorg. I checked my settings to make sure compositing is disabled.

I tried moving an open window around to check the load and according to top, Xorg used ~45% !

What can I do to narrow down the problem? I noticed a horrible slowdown in all applications, as Xorg just eats on my cpu now...

Edit:
I removed fbturbo and the situation is the same, now at 26% for xfdesktop and 21% for Xorg, 61+% for moving a window. Any idea what is eating my cpu? I don't remember it being THAT slow :shock:

Thank you!

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

Re: Accelerated x driver?

Mon Jan 13, 2014 9:28 am

The cursor is not HW accelerated, so can take quite a bit of processor time. In addition, as a cursor moves over an application windows, the app is sent lots of cursor move style messages, which have to be handled. It all adds up.
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."

User avatar
Fidelius
Posts: 447
Joined: Wed Jan 01, 2014 8:40 pm
Location: Germany

Re: Accelerated x driver?

Tue Jan 14, 2014 2:54 pm

Neobusy, I get similar % values, also using XFCE here.

I'm wondering if my hardware acceleration is on? Because of the following lines in the /var/log/Xorg.0.log which sound strange to me (but I'm not a Linux or X expert), so I marked them with a "***".

Does anybody know what these marked lines mean? Do we have 2D HW acceleration under Raspberry with the latest versions?
I'm asking because when running some simple Java2D programs, it seems there's no hardware acceleration, which I find to be a pity, since Java apps in general run really great on this nice PI hardware, which is very impressive. Just when it comes to things like canvas.createBufferStrategy(>1) and canvas.getBufferStrategy() on a java.atw.Canvas, it doesn't seem to be fast at the moment.

Code: Select all

[    27.544] (==) Log file: "/var/log/Xorg.0.log", Time: Mon Jan 13 18:06:08 2014
...
[    27.786] (II) Loading extension DRI2
[    27.786] (II) LoadModule: "fbturbo"
[    27.819] (II) Loading /usr/lib/xorg/modules/drivers/fbturbo_drv.so
[    27.826] (II) Module fbturbo: vendor="X.Org Foundation"
[    27.826] 	compiled for 1.12.4, module version = 0.3.1
[    27.827] 	Module class: X.Org Video Driver
[    27.827] 	ABI class: X.Org Video Driver, version 12.1
[    27.827] (II) FBTURBO: driver for framebuffer: fbturbo
[    27.827] (++) using VT number 7
...
*** [    27.828] (WW) Falling back to old probe method for fbturbo

[    27.828] (II) Loading sub module "fbdevhw"
[    27.828] (II) LoadModule: "fbdevhw"
[    27.830] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[    27.833] (II) Module fbdevhw: vendor="X.Org Foundation"
[    27.833] 	compiled for 1.12.4, module version = 0.0.2
[    27.833] 	ABI class: X.Org Video Driver, version 12.1
[    27.834] (II) FBTURBO(0): using /dev/fb0
[    27.834] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[    27.835] (II) FBTURBO(0): Creating default Display subsection in Screen section
	"Default Screen Section" for depth/fbbpp 16/16
[    27.835] (==) FBTURBO(0): Depth 16, (==) framebuffer bpp 16
[    27.835] (==) FBTURBO(0): RGB weight 565
[    27.835] (==) FBTURBO(0): Default visual is TrueColor
[    27.836] (==) FBTURBO(0): Using gamma correction (1.0, 1.0, 1.0)
[    27.836] (II) FBTURBO(0): hardware: BCM2708 FB (video memory: 2560kB)
[    27.836] (**) FBTURBO(0): Option "fbdev" "/dev/fb0"
[    27.836] (**) FBTURBO(0): Option "SwapbuffersWait" "true"
[    27.838] (II) FBTURBO(0): processor: ARM1176
[    27.838] (II) FBTURBO(0): checking modes against framebuffer device...
[    27.838] (II) FBTURBO(0): checking modes against monitor...
[    27.850] (--) FBTURBO(0): Virtual size is 1280x1024 (pitch 1280)
[    27.850] (**) FBTURBO(0):  Built-in mode "current"
[    27.850] (==) FBTURBO(0): DPI set to (96, 96)
[    27.851] (II) Loading sub module "fb"
[    27.851] (II) LoadModule: "fb"
[    27.852] (II) Loading /usr/lib/xorg/modules/libfb.so
[    27.864] (II) Module fb: vendor="X.Org Foundation"
[    27.864] 	compiled for 1.12.4, module version = 1.0.0
[    27.864] 	ABI class: X.Org ANSI C Emulation, version 0.4
[    27.865] (EE) FBTURBO(0): FBIOBLANK: Operation not permitted
[    27.887] (II) FBTURBO(0): using backing store heuristics
[    27.920] (II) FBTURBO(0): can't load 'g2d_23' kernel module
[    27.920] (II) FBTURBO(0): failed to enable the use of sunxi display controller

*** [    27.921] (II) FBTURBO(0): No sunxi-g2d hardware detected (check /dev/disp and /dev/g2d)[/b]
*** [    27.921] (II) FBTURBO(0): G2D hardware acceleration can't be enabled[/b]

[    27.921] (II) FBTURBO(0): enabled fbdev copyarea acceleration
[    27.922] (==) FBTURBO(0): Backing store disabled
[    27.923] (==) FBTURBO(0): DPMS enabled
[    27.923] (II) FBTURBO(0): failed to enable hardware cursor

*** [    27.923] (II) FBTURBO(0): no 3D acceleration because the driver has been compiled without libUMP[/b]

[    27.924] (II) FBTURBO(0): if this is wrong and needs to be fixed, please check ./configure log
[    27.924] (==) RandR enabled
[    27.924] (II) Initializing built-in extension Generic Event Extension
[    27.924] (II) Initializing built-in extension SHAPE
[    27.924] (II) Initializing built-in extension MIT-SHM
[    27.925] (II) Initializing built-in extension XInputExtension
[    27.925] (II) Initializing built-in extension XTEST
[    27.925] (II) Initializing built-in extension BIG-REQUESTS
[    27.925] (II) Initializing built-in extension SYNC
[    27.925] (II) Initializing built-in extension XKEYBOARD
[    27.925] (II) Initializing built-in extension XC-MISC
[    27.925] (II) Initializing built-in extension SECURITY
[    27.926] (II) Initializing built-in extension XINERAMA
[    27.926] (II) Initializing built-in extension XFIXES
[    27.926] (II) Initializing built-in extension RENDER
[    27.926] (II) Initializing built-in extension RANDR
[    27.926] (II) Initializing built-in extension COMPOSITE
[    27.926] (II) Initializing built-in extension DAMAGE
[    27.927] (II) SELinux: Disabled on system
[    28.114] (II) AIGLX: Screen 0 is not DRI2 capable
[    28.114] (II) AIGLX: Screen 0 is not DRI capable
[    28.311] (II) AIGLX: Loaded and initialized swrast
[    28.311] (II) GLX: Initialized DRISWRAST GL provider for screen 0
...

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

Re: Accelerated x driver?

Tue Jan 14, 2014 3:21 pm

Yes, the acceleration is on. But note that its is extremely difficult to accelerate all aspects of X with the GPU. In fact, little of it is actually used (and this is the case for most other X implementations - few have any HW acceleration due to its complexity).

The acceleration from FBTurbo is to use the ARM more efficiently with optimised code for the particular ARM processor being used, and also to accelerate the copyarea function in X with DMA. These both make quite a difference.
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."

User avatar
Fidelius
Posts: 447
Joined: Wed Jan 01, 2014 8:40 pm
Location: Germany

Re: Accelerated x driver?

Tue Jan 14, 2014 3:36 pm

Thank Jamesh for your helpful answer, as usual.

This whole PI is so exciting. It's a wonderful little machine. And I'm so impressed that nearly all these stable Debian packages run on the ARM ! That's a master-piece.

I lost track of the ARM when Acorn went down with my Archie, but now it's a kind of revival.
And with an accelerated X server. :-)

So, if I understand you correctly and bearing in mind that there's some very talented developers on and around the PI, is it possible that we're going to see further speed improvements with this accelerated X driver in the future?
("Unfortunately" I missed the last step, because I got a PI only at Christmas, when there's already been the brand new accelerated X driver which you all rave about; meaning I only know the PI with this turbo enabled... Oh, us newbies!)

Am I right in supposing that the omxplayer (which is also very, very impressive) doesn't use the X server but uses the GPU directly?
But normal Java programs use the X server?

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

Re: Accelerated x driver?

Tue Jan 14, 2014 4:30 pm

Fidelius wrote:Thank Jamesh for your helpful answer, as usual.

This whole PI is so exciting. It's a wonderful little machine. And I'm so impressed that nearly all these stable Debian packages run on the ARM ! That's a master-piece.

I lost track of the ARM when Acorn went down with my Archie, but now it's a kind of revival.
And with an accelerated X server. :-)

So, if I understand you correctly and bearing in mind that there's some very talented developers on and around the PI, is it possible that we're going to see further speed improvements with this accelerated X driver in the future?
("Unfortunately" I missed the last step, because I got a PI only at Christmas, when there's already been the brand new accelerated X driver which you all rave about; meaning I only know the PI with this turbo enabled... Oh, us newbies!)

Am I right in supposing that the omxplayer (which is also very, very impressive) doesn't use the X server but uses the GPU directly?
But normal Java programs use the X server?
Pretty much what you said. There are a few more low hanging fruit to accelerate X (I'm looking at a HW cursor right now for example), but major improvements over what we have now are unlikely for X (That's my personal view - others may disagree)

But we do have a lot of dev work going in to Weston/Wayland, which CAN be accelerated using the GPU. This is a new desktop designed to work much better with HW acceleration. Check out YouTube for some examples, or you can download development versions, but I don't know where from...Google will help.
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."

User avatar
Fidelius
Posts: 447
Joined: Wed Jan 01, 2014 8:40 pm
Location: Germany

Re: Accelerated x driver?

Tue Jan 14, 2014 4:52 pm

Great to hear! That's really good news.
Weston/Wayland I heard from, but I will defenitely check it out, now that I learnt it's going to run also on the PI in the future.

Edit: I think this is the Youtube video you could have meant. It shows Eben Upton from the Raspberry Pi Foundation talking on LinxCon in North America in September (?) 2013, also about Wayland/Weston replacing the X-Server on the Raspberry in the near future :

http://www.youtube.com/watch?v=PmCsQDTc-WU

Return to “Raspbian”