Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gnome3 stopping GPU assisted acceleration?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7051
Location: almost Mile High in the USA

PostPosted: Mon Feb 29, 2016 5:22 pm    Post subject: Gnome3 stopping GPU assisted acceleration? Reply with quote

I found a strange behavior on one of my x86_64 machines:

I have the machine booting to CLI/getty/login. When I login to the CLI I can then run startx to start X11.

I have two .xinitrc's: One contains just

gnome-session

When I startx, the gnome3 desktop starts up just fine, but it's fairly slow.... not unusably slow, but it seems that it drops to software renderring (via glxinfo) instead of using the Radeon 9250. Basically anything that uses the GPU or acceleration is awful. Namely using MythTV the refresh rate is pretty bad, and running OpenGL is very slow.

However I have this other .xinitrc that contains

xterm&
fvwm2

This time, mythtv works just fine. 3D acceleration is enabled (glxinfo reports hardware acceleration) and MythTV runs just fine, and OpenGL apps works quite a bit faster.

I'm not using gdm as it wasn't very clean choosing between fvwm2 and gnome3... And it seems that 3D acceleration is disabled even when using gdm - though my other Gnome3 machines seem to work fine with 3D acceleration (fglrx and OSS Intel).

Any ideas why gnome3 seems to disable 3D acceleration on the Radeon 9250 (OSS ATI R200 driver)?
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Leio
Developer
Developer


Joined: 27 Feb 2003
Posts: 480
Location: Estonia

PostPosted: Mon Mar 14, 2016 8:28 pm    Post subject: Reply with quote

Do not use .xinitrc like this. Use XSESSION=Gnome startx or something if you want to launch from terminal without a DM.
The presence of .xinitrc overrides various steps of desktop startup scripts and you are missing various services most likely, like dbus user session and more.
If things don't work with a proper startup without .xinitrc, then we can think further.
And I think it might mess with things even when you use gdm and have .xinitrc present.
_________________
GNOME team lead; GStreamer; MIPS/ARM64
Back to top
View user's profile Send private message
Leio
Developer
Developer


Joined: 27 Feb 2003
Posts: 480
Location: Estonia

PostPosted: Mon Mar 14, 2016 8:30 pm    Post subject: Reply with quote

Also I believe gnome-shell requires GLX_EXT_texture_from_pixmap GL extension on X11, do you have that?
Code:
glxinfo |grep GLX_EXT_texture_from_pixmap

_________________
GNOME team lead; GStreamer; MIPS/ARM64
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7051
Location: almost Mile High in the USA

PostPosted: Mon Mar 14, 2016 9:06 pm    Post subject: Reply with quote

Was about to post another interesting observation:

I tried startx with .xinitrc containing just "xterm" (no DE, no windowmanager).

When I run glxinfo from there, it reports acceleration was enabled.

Then if I run

$ gnome-session&

from that terminal, Gnome starts up. Opening a gnome-terminal from that session... glxinfo indicates SOFTWARE rendering!

Now, from that initial xterm, glxinfo: shows my R280 is still doing hardware rendering. However running glx software is about as slow from that window along with the spawned gnome-terminal.

Weird...

I'll have to test if the R280 has GLX_EXT_texture_from_pixmap, but seems pretty rotten the whole thing gets disabled if the extension is missing.

(note: this is a systemd box, and things look like it works OK other than 3d acceleration when started from .xinitrc, alas, this is just an experiment until I can go back to using gdm.)
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?


Last edited by eccerr0r on Mon Mar 14, 2016 9:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
Leio
Developer
Developer


Joined: 27 Feb 2003
Posts: 480
Location: Estonia

PostPosted: Mon Mar 14, 2016 9:10 pm    Post subject: Reply with quote

Just nuke .xinitrc and do XSESSION=Gnome startx from the terminal? Or how are you starting right now anyways without gdm
_________________
GNOME team lead; GStreamer; MIPS/ARM64
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7051
Location: almost Mile High in the USA

PostPosted: Mon Mar 14, 2016 9:11 pm    Post subject: Reply with quote

All three ways:
1. .xinitrc with gnome-session
2. .xinitrc with xterm, and running gnome-session from that xterm
3. gdm directly

have the same issue.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Leio
Developer
Developer


Joined: 27 Feb 2003
Posts: 480
Location: Estonia

PostPosted: Mon Mar 14, 2016 9:14 pm    Post subject: Reply with quote

eccerr0r wrote:

3. gdm directly


Did you remove .xinitrc for this?

Just forget about .xinitrc here, remove it, don't test with it. Unless you add a ton of extra stuff to the lines in there, you are going to get a bad experience.
It might not affect 3D acceleration with it used or not, but it certainly affects other things, like user dbus session and so on, which break other gnome desktop-y stuff when not working.
There is XSESSION environment variable support, documented in some Xorg guides (also suggested to use it via env.d if a long-term thing, etc), which fully integrates with the launching of everything, so it ought to be as good as using a DM.
.xinitrc presence breaks this integration because it assumes you know what you are doing (running plain fullscreen client without a WM via it with no dbus user session needed, or whatever along those lines).
_________________
GNOME team lead; GStreamer; MIPS/ARM64
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7051
Location: almost Mile High in the USA

PostPosted: Mon Mar 14, 2016 9:17 pm    Post subject: Reply with quote

No xinitrc when I was using gdm (it was the default state, gdm starts up Gnome just fine by default. I just didn't really want to figure out a way to make gdm start fvwm2 hence the hack.)
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7051
Location: almost Mile High in the USA

PostPosted: Tue Mar 15, 2016 7:09 am    Post subject: Reply with quote

OK, looks like the server and client do have GLX_EXT_texture_from_pixmap.

This is grepping render from fvwm2:
Code:
$ glxinfo|grep render
direct rendering: Yes
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
OpenGL renderer string: Mesa DRI R200 (RV280 5960)  DRI2

This is grepping render from gnome, whether started from gdm or not, or even running gnome-session from xinit with no window manager started (it will show the above in that window that gnome-session is started, but no other window opened from Gnome:
Code:
$ glxinfo|grep render
direct rendering: Yes
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.5, 128 bits)
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
    GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_packed_depth_stencil,
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
    GL_NV_blend_square, GL_NV_conditional_render, GL_NV_depth_clamp,
    GL_OES_fbo_render_mipmap, GL_OES_get_program_binary, GL_OES_mapbuffer,

_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7051
Location: almost Mile High in the USA

PostPosted: Mon Nov 28, 2016 11:54 pm    Post subject: Reply with quote

Ahhh, finally found one piece of very useful information.

If I start with gdm, I get no acceleration. However if I use "sudo glxinfo" --- IT REPORTS ACCELERATION with the GPU!

So, I have a permission problem here. I am in the 'video' group and can access /etc/dri/card0 just fine (being in group 'video' supposedly is superfluous). But still baffling why gdm started clients do not have HW acceleration turned on. No errors that I can discern.

Despite glxinfo reporting hardware renderer being used, if I run other clients as root, it still seems to be using software rendering... but maybe it's due to the load of gnome3 that it's slower than usual. Something strange is still going on.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7051
Location: almost Mile High in the USA

PostPosted: Wed Aug 16, 2017 4:21 pm    Post subject: Reply with quote

I think I found out what's going on.

The Gnome guys silently blacklisted R200 (RV280) cards apparently because it does strange things.

https://bugzilla.redhat.com/show_bug.cgi?id=679579

To workaround the problem, the environment is changed. I believe the strange behavior is due to when running 'sudo' it changes the environment back to the default configuration, allowing hardware acceleration.

I tried hacking gnome-session-check-acceleration and it crashed in libcogl.

I reverted gnome-session-check-acceleration and threw in a nouveau (NV34) card.

It crashed in libcogl too.

Hmm... I guess this machine gets gnome3 deleted - I installed xfce4 and now have a DE with working acceleration, which firefox desperately needs... Unfortunately systemd is still on this machine. I guess it stays for now.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum