What is the best way to override the nvidia driver to create the symbolic link from libnvidia-allocator.so to nvidia-drm_gbm.so? What I’m doing now is:
Ahh, this was just with glxgears/glxinfo haha. There are some quirks that lead me to believe that it’s not completely working right, waiting on the Mesa PR to make it into staging or master before testing further.
I’m trying to figure out how to follow along from home using 495 without eglstreams. I’ve got a vanilla install on nixos-unstable with just nvidia.nix and wayland-tweaks.nix copied over, but that doesn’t seem to be enough. (I’ve also used the GBM_BACKENDS_PATH trick with /etc above).
The default sway session doesn’t start (normal, it doesn’t have any of the fixups mentioned here), but starting nvidia-sway results in a black screen with nothing. /tmp/sway.log shows everything working
Loaded SDL version 2.0.17-6744061
OpenGL GLX extension not supported by display
OpenGL GLX extension not supported by displaysrc/steamUI/Main.cpp (409) : Assertion Failed: Fatal Error: OpenGL GLX extension not supported by display
src/steamUI/Main.cpp (409) : Assertion Failed: Fatal Error: OpenGL GLX extension not supported by display
Installing breakpad exception handler for appid(steam)/version(1634158817)
DBG DBG ffffffff DUMP_REQUESTED Assert( Assertion Failed: Fatal Error: OpenGL GLX extension not supported by display ):/data/src/steamUI/Main.cpp:409
Though that is what I have always gotten over wayland before the 2 PRs/4 commits.
mesa: add support for locating gdm's through /run/opengl-driver/lib
nvidia: install egl wayland gbm support
nvidia: add wayland to nvidia-egl-wayland libpath
nvidia: fix egl-wayland loading
I think I might be missing the EGL overlay for steam, investigating. However I can at least report everything that worked before the patches is still very functional after a whole day of usage.
I finally got everything working after a chat with a colleague helping me to understand more about how things work, and then reading through the nix pills again (this time with enough understanding to follow everything). I’m using an overlay to replace a couple of packages with those coming from @colemickens but while sway works just find, as does accelerated firefox, I can’t get xwayland to work accelerated. When I run eglinfo, I get X11 platform: eglinfo: eglInitialize failed
The mesa change is in the nixpkgs fork of @colemickens . I’m using this right now, and it’s better than the alternative, but I still can’t yet build steam (the overlay mixing nixpkgs unstable with the custom packages has some weird issues I’ve had to work around). I’ve got 3D acceleration working for things like glmark, glxgears, and firefox, so at least there’s that. Unfortunately, I’m unable to get my monitor to full resolution because the nvidia driver doesn’t seem to support display stream compression (EDID reports available modes that get filtered out by the kernel DRM). I may just try out i3 on X to see if things are better there.
For anyone who wants to follow at home, I wanted to document the simplest config that gets you to where I am. You need a local copy of the builder.sh from the nvidia_x11 package, because it’s been modified, in my case it’s next to my config and called nvidia_x11_builder.sh
The following is in my configuration.nix:
Wunderbar! Great timing! I was just reading through the wlroots code side by side between 0.14.1 and master, and trying to figure out what the problem was. It was easy enough to see that display binding was removed and that device_enum wasn’t working, but it was looking to me like there was supposed to be an additional case for using GBM directly without device_enum. This solves the problem for me, so thank you!
I tried it out, and it builds, with eglinfo showing support on wayland, and both glmark2 and glxgears working, however firefox is no longer accelerated (error about an inability to find a gpu on the pci bus), and chrome won’t even start. eglinfo still doesn’t show support on Xwayland, which is what I’ve been trying to fix.
I’ve reverted to the release version of wlroots, as I have more things working, though not steam.
I’ve now been at this for two weeks. After realizing that there is no support for hardware acceleration for video decoding in wayland, I abandoned this config and tried to go back to X.org with i3.
This made me realize that X.org is a mess, too, and not one that I think is worth it for the video acceleration.
Where I’m stuck right now is that every time I try to add steam, nixos-rebuild trys to rebuild a multi-architecture mesa, and the meson build system fails because it can’t detect the type of the compiler
I can’t really say I know anything about that, but I certainly know about going back to X11 and realizing that despite the warts it’s not worth looking backward.
thanks to Nvidia Users Testers Requested (Sway on Nvidia, Steam on Wayland) - #32 by douglas I managed to get sway working with my nvidia GeForce GTX 970. There is some subtlte flickering though sometimes every 10 sec (I am in HDMI). Firefox or chrome decorations appear (including firefox tabs) but inside the window, I can’t do shit. I haven’t tried steam yet.