-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Difficulty installing with nouveau + nvidia #19
Comments
Hello. Thank you for reporting this issue. With nouveau you should use However, you appear to have an hybrid configuration, with an intel card AND a discreet nvidia GPU which is setup by default to use However, |
Cool! Look forward to hearing what you find out. |
I'm running into what I think is a similar situation (sorry if I'm conflating different issues): on Arch Linux I have the nouveau kernel module loaded, and the nvidia package uninstalled entirely. The device has an GTX 1060 graphics card, which nouveau picks up as code name NV136:
Now when I try to run a Haskell application that depends on gloss (using the GLUT backend), I get the following error:
When I strace this to investigate further, I see something like the following towards the end:
i.e. just as @edahlgren had observed, the problem is the inability to resolve |
@masaeedu thank you for the detailled report. To be sure, you Is your haskell application built in a nix environment? Using GHC from nix and with nix dependencies? Because if not, perhaps it is not needed to run it under I do realize that "I'm experimenting today with a computer with nouveau driver" was one year old. Sorry about that @edahlgren |
From this comment, a longer explanation of what I believe was my underlying issue installing and using nixGL. Assume Ubuntu 16.04 for apt commands / packages.
nixGLIntel
because the README.md says: "For mesa (intel, amd, nouveau, ...)". So I did:glxinfo
and discovered that it couldn't find nvidia shared libraries. I also noticed that in a last ditch attemptglxinfo
looked forlibGLX_indirect.so.0
, couldn't find it, and failed.At this point I was confused about whether I needed to use nixGLNvidia. So I started looking around for my exact nVidia version number (e.g. 390.25). Unfortunately I could only find the incomplete version string 384, so I downloaded
nvidia-smi
to discover an exact version. This is where things got weird.This actually fetched (and apparently installed --- unintentional by me), a new nvidia 384.130 driver, but since I didn't reboot,
lshw
continued to show nouveau. I then used this version number (384.130) to build nixGLNvidia. I tested it, and it failed in the same way as before:At this point it felt like nixGL wouldn't work at all for my setup. So I started looking into redirecting libGL through X --- an approach that I could reason about easily, at least more than than nvidia drivers --- which I didn't understand at all.
Through experimenting with my X server, I ended up rebooting. At that point the nvidia drivers became active (overriding nouveau), and
lshw
produced this:While writing up this issue, I rebuilt nixGLNvidia, installed it, and tested it again with glxinfo to reproduce the error. This time direct rendering worked:
Thoughts:
nixGLNvidia seems to work just fine for my configuration if nvidia drivers are being used, not nouveau. nixGLIntel didn't work with my nouveau driver and was the root cause of my confusion.
I wouldn't have even got nixGLNvidia working if I hadn't accidentally installed new nvidia drivers using
nvidia-smi
and happened to reboot (unrelated).nixGL as a solution is great when it works (it's very nice to have fully-functioning direct rendering from a nix shell), but I ended up abandoning it because (a) I didn't know which nixGLXXX I was supposed to use, and (b) I didn't have the patience to debug it further when both nixGLIntel and nixGLNvidia didn't work for me.
So maybe in my case (and for others like me), the solution is to either provide scripts to fully detect which nixGLXXX to use, and automatically blacklist nouveau if it's known to cause problems, with a shell.nix to use (avoiding needing to remember to wrap binaries). If not all configurations can be covered/tested, then maybe some sort of fallback solution to indirect rendering could be suggested, or a fallback to disable hardware acceleration entirely (e.g. LIBGL_ALWAYS_SOFTWARE), just so the user can get something to work.
Hope this helps! 😃
Thanks for developing this!
The text was updated successfully, but these errors were encountered: