NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.68k stars 13.82k forks source link

KDE Wayland session uses llvmpipe for OpenGL, not hardware acceleration #30649

Closed kliu128 closed 6 years ago

kliu128 commented 6 years ago

Issue description

Running a wayland session with export $(dbus-launch); startplasmacompositor on a tty, everything seems to work, but OpenGL applications are quite slow. Running glxinfo reveals that they are using llvmpipe. (This might just be an XWayland thing, but I'm not sure.) Firefox (on XWayland) also says it is using llvmpipe.

I have an AMD GPU and have the following opengl-related options enabled:

services.xserver.enable = true;
services.xserver.videoDrivers = [ "amdgpu" ];                                                        
hardware.opengl.driSupport32Bit = true;

Steps to reproduce

  1. Start KDE with export $(dbus-launch); startplasmacompositor.
  2. Run glxinfo in a terminal to see that it is using llvmpipe.

Technical details

ghost commented 6 years ago

Running glxinfo reveals that they are using llvmpipe. (This might just be an XWayland thing, but I'm not sure.)

It is XWayland thing. Should be fixed by https://github.com/NixOS/nixpkgs/pull/30828

To test what KDE itself uses, do the following: "open KRunner, enter “KWin”, select KWin Debug Console, switch to OpenGL tab"

kliu128 commented 6 years ago

KWin is using OpenGL with the proper hardware rendering.

30828 does indeed fix it; XWayland's glxinfo now reports the proper render info:

...
Extended renderer info (GLX_MESA_query_renderer):                                                                            
    Vendor: X.Org (0x1002)                                                                                                   
    Device: Radeon RX 580 Series (AMD POLARIS10 / DRM 3.18.0 / 4.13.9, LLVM 5.0.0) (0x67df)                                  
    Version: 17.2.2                                                                                                          
    Accelerated: yes                                                                                                         
    Video memory: 8050MB
...

Thank you very much!

kliu128 commented 6 years ago

Fixed by now-merged #30828.