Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvidia: Bump beta driver to 361.18 #12719

Closed
wants to merge 3 commits into from
Closed

nvidia: Bump beta driver to 361.18 #12719

wants to merge 3 commits into from

Conversation

Baughn
Copy link
Contributor

@Baughn Baughn commented Jan 31, 2016

Including some more build fixes for that. These will presumably be useful for the default version, eventually.

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @wkennington, @vcunat and @spencerjanssen to be potential reviewers

@Baughn
Copy link
Contributor Author

Baughn commented Jan 31, 2016

It turns out that, despite setting boot.extraModulePackages = [ pkgs.linuxPackages.nvidia_x11_beta ];, the stable driver is the one that's loaded. It compiles the beta version, it just doesn't use it.

Any tips?

@vcunat
Copy link
Member

vcunat commented Jan 31, 2016

It seems we have no proper support for plugging in the beta driver. Currently we allow "nvidia" and "nvidiaLegacy*" values of the drivers, so I suggest we just add "nvidiaBeta" to that list.

@vcunat
Copy link
Member

vcunat commented Feb 1, 2016

Will you test running the beta drivers? Additional code for my suggestion is simple:

diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix
index 7115769..e89f574 100644
--- a/nixos/modules/hardware/video/nvidia.nix
+++ b/nixos/modules/hardware/video/nvidia.nix
@@ -14,6 +14,8 @@ let
   nvidiaForKernel = kernelPackages:
     if elem "nvidia" drivers then
         kernelPackages.nvidia_x11
+    else if elem "nvidiaBeta" drivers then
+      kernelPackages.nvidia_x11_beta
     else if elem "nvidiaLegacy173" drivers then
       kernelPackages.nvidia_x11_legacy173
     else if elem "nvidiaLegacy304" drivers then

@Baughn
Copy link
Contributor Author

Baughn commented Feb 1, 2016

I've tested it. Unfortunately it doesn't work, and I don't think it has to do with the stable/beta difference. nvidia changed something in between versions; now none of my applications can use it, and there's no error messages that I can see. It's all in perfect shape. It just doesn't do anything.

Well, there are a few errors:

➜  nvidia git:(nvidia) ✗ glxinfo                                                                                                                ~/dev/nvidia
name of display: :0
Error: couldn't find RGB GLX visual or fbconfig
Error: couldn't find RGB GLX visual or fbconfig

I think this one's a bit beyond me.

➜  nvidia git:(nvidia) ✗ sudo journalctl -k | grep -i nvidia                                                                                    ~/dev/nvidia
Feb 01 23:12:07 saya kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 250
Feb 01 23:12:07 saya kernel: [drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:01:00.0 on minor 0
Feb 01 23:12:07 saya kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module  361.18  Sat Jan  9 21:27:18 PST 2016
Feb 01 23:12:07 saya kernel: nvidia-uvm: Loaded the UVM driver in lite mode, major device number 249
Feb 01 23:12:09 saya kernel: nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  361.18  Sat Jan  9 20:45:38 PST 2016
Feb 01 23:12:09 saya kernel: nvidia-modeset: Allocated GPU:0 (GPU-385b65ca-980e-5687-c0de-8d863abf26a7) @ PCI:0000:01:00.0
➜  nvidia git:(nvidia) ✗ sprunge < /var/log/X.0.log                                                                                             ~/dev/nvidia
http://sprunge.us/JXDS

@vcunat
Copy link
Member

vcunat commented Feb 2, 2016

Hmm, I also see no relevant error message (except for glxinfo).

@Baughn
Copy link
Contributor Author

Baughn commented Feb 2, 2016

I bet it has to do with the GLVND infrastructure they're referring to in the release notes. I checked to make sure that all included libraries are installed, although since GLVND is open-source we might actually want to build that separately... anyway, nothing obvious there.

They do seem to be bundling libglx.so, for the first time, so that might be causing problems. I'm not sure what version of libglx it'd be, or what to do about it. I'd probably need to look at how it gets installed on a more traditional Linux system; Ubuntu or so.

Anyway, it'd be good to have this working before the driver leaves beta, but I don't think I'm likely to succeed. I'll take another poke or two at it, but you shouldn't expect anything.

@vcunat
Copy link
Member

vcunat commented Feb 2, 2016

Bundling libglx for the first time? It certainly was also in previous releases: /run/opengl-driver/lib/xorg/modules/extensions/libglx.so.358.16 on my system ATM.

@vcunat
Copy link
Member

vcunat commented Feb 2, 2016

We won't be able to switch to the branch before we fix it :-) ATM I've got personally other stuff with higher priority. Maybe someone else will fix it in the meantime.

@Baughn
Copy link
Contributor Author

Baughn commented Feb 2, 2016

Oh, sorry for the confusion. 361.18 has both libglx.so.361.18, which is presumably the X module, but also libGLX.so.0... which from the disassembly appears to be a thin wrapper for glvnd.

The Goobuntu system I'm sitting in front of right now, actually doesn't have libGLX at all. It's also on 340, though. I'll definitely need to see this package in action on a real system. I'll probably find time for that tomorrow.

@Baughn
Copy link
Contributor Author

Baughn commented Mar 5, 2016

@vcunat -- It's been somewhat more than a day, but I never could figure out what the problem was, save that it's caused by GLVND.

So for now, I've changed the build script to select the legacy driver. I'm running a system with it right now; OpenGL works. Meanwhile the non-beta driver also bumped, so I'm also including that.

squash! nvidia: Bump driver to 361.28
@vcunat
Copy link
Member

vcunat commented Mar 5, 2016

So at this commit 361.28 runs for you good, right?

@Baughn
Copy link
Contributor Author

Baughn commented Mar 5, 2016

Right.

@vcunat vcunat closed this in e0fe8cf Mar 7, 2016
@vcunat
Copy link
Member

vcunat commented Mar 7, 2016

It runs fine for me as well. Thanks.

vcunat pushed a commit that referenced this pull request Mar 7, 2016
Beta also gets updated, but even upstream it's older than stable.
vcunat generalized parallel make. Close #12719.

(cherry picked from commit e0fe8cf)
This is a new long-lived branch, so the update seems suitable for 16.03.
@vcunat
Copy link
Member

vcunat commented Mar 8, 2016

Has anyone noticed new segfaults after this merge? Since I switched to this, I'm getting some even segfaults with binaries that worked previously, so it has to be some impurity and we don't have so many...

@Baughn
Copy link
Contributor Author

Baughn commented Mar 8, 2016

Can't say I have.

What sort of segfaults? In OpenGL apps, or..?

@vcunat
Copy link
Member

vcunat commented Mar 8, 2016

So far only when I quit (g)vim or when I start vlc. It might be some other impurity. We'll see in time, I hope.

@nathanielbaxter
Copy link
Contributor

Can also confirm the above segfaults in vlc (on start) and gvim (on exit) using the "nvidia" driver on master, which are due to a segfault in "__eglTeardownVendor" from libEGL provided by the nvidia-x11 package according to valgrind.

@nathanielbaxter
Copy link
Contributor

Another segfaulting app is mplayer. While I think it's likely that the issue is with libEGL (which is a binary provided by nvidia in this driver) I have little understanding of the internals of OpenGL. This topic on the nvidia forums could be the same issue, although I had the same issue with running nixos vlc versions going back to 2.1.5 (I should really gc at some point :-) ).

I'll have a closer look and submit more information to nvidia at some point, unless someone beats me to it. Going to have to revert this locally for now.

@codyopel
Copy link
Member

The GLVND libraries do work, but you must create version symlinks to specific libraries. The libraries being libGLX_nvidia.so.0, libEGL_nvidia.so.0, libGLESv1_CM_nvidia.so.1, libGLESv2_nvidia.so.2, & libGL.so.1.

https://devtalk.nvidia.com/default/topic/915640/unix-graphics-announcements-and-news/multiple-glx-client-libraries-in-the-nvidia-linux-driver-installer-package/

Fixing this will resolve the random segfaults you are encountering when libEGL looks for the library named with a specific version that doesn't exist at runtime.

https://github.com/triton/triton/blob/master/pkgs/all-pkgs/nvidia-drivers/builder-generic.sh

@Baughn Baughn deleted the nvidia branch March 12, 2016 18:19
@vcunat
Copy link
Member

vcunat commented Mar 13, 2016

Ah, thanks. @codyopel: would you file a PR for this against https://github.com/NixOS/nixpkgs?

adrianpk added a commit to adrianpk/nixpkgs that referenced this pull request May 31, 2024
Beta also gets updated, but even upstream it's older than stable.
vcunat generalized parallel make. Close NixOS#12719.

(cherry picked from commit e0fe8cf)
This is a new long-lived branch, so the update seems suitable for 16.03.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants