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
Refactor NVidia drivers #22304
Refactor NVidia drivers #22304
Conversation
@abbradar, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @vcunat and @wkennington to be potential reviewers. |
What laptop do you have? ps: if you rebase this against master, https://prs.nix.gsc.io/eval/857 will build the nixos/release.nix + tests. |
@grahamc Lenovo T440p. I think at some point option to force NVidia only was there, but it's gone now (I regularly update BIOS so that may be the reasion). Would Hydra build unfree packages and their reverse dependencies? Also, will use that chance to say thank you very much for your work on Hydra for PRs ^_^. |
Hmm... I wish it would. I'm working on having this included in hydra.nixos.org. Unfortunately, I don't want to set a precedent that it'll build unfree :( |
Also, you're welcome, I'm glad to make progress on this! :) |
That's completely fine, on the contrary -- I'd be surprised if you did enable this :D |
inherit version useGLVND; | ||
inherit (stdenv) system; | ||
|
||
outputs = [ "out" ] ++ optional (!libsOnly) "bin"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The convention has been to put the output containing binaries as the first output (it changed at one point).
Also I didn't check too closely, but doesn't splitting to multiple outputs remove the need for all the libsOnly
logic?
Right, forgot about output changes.
Outputs here solve the problem of space but not of time - without `libsOnly` users with multilib OpenGL would need to compile 32-bit nvidia kernel modules each update.
--
Nikolay.
|
Hmm, what's the benefit of splitting this to multiple outputs then? In what situations you end up with the built system depending on only one of the outputs? |
@dezgeg Never ;) The point of splitting is to keep logically separate parts separate. This way we don't have BTW is there a way to enforce current convention (binary outputs primary) when the binary output doesn't always exist? |
I can test on a notebook hard-wired to nvidia. |
@vcunat would be cool! BTW (offtopic, teaser) I have an in-progress branch that moves us to libglvnd completely (so Hopefully when AMDGPU-PRO also moves to |
@abbradar: my older libglvnd WIP if you find some useful bits... but I expect most work will be in finishing the details, especially if we were to implement putting the C symbols into a separate linker namespace. |
I originally paused the effort for AMD to catch up; that might be a long wait, so waiting for at least some larger distro might save some work. |
Yep, I think there are also more drivers that won't support |
I think we can link anyway to glvnd-provided libGL shim during build-time and then just put another libGL on |
I'm specifically looking forward to mesa updates not causing mass rebuilds. |
Driver seems OK, but |
The |
Ah, during some round of final refactoring I lost |
Resolved conflicts. |
* Use libglvnd; * Compile nvidia-settings, nvidia-persistenced from source; * Generalize builder.
The settings app does work now for me, and the rest has been working OK the whole time - now even with xorg-server-1.19.1. I don't use any special stuff like vulkan or CUDA. Anything else to wait for? It doesn't seem likely to get much more testing until it's forced on unstable/master users :-) |
Actually I was just waiting for you to confirm that settings now work -- we got a deadlock :D |
JFTR, some of this bunch of lines from journalctl seem fishy:
|
@vcunat Those look interesting:
|
Can you track at which moment |
I think I invoked it from my user session by a mistake. |
Yes, logs confirm it wasn't done during startup. Now I also noticed:
|
Ugh, any idea what process does this? It seems it's dying in a loop, so I'd be difficult to lookup it by pid.
--
Nikolay.
|
No idea yet. After switching xorg-server to 1.19.1, my firefox shows github's top bar with black background instead of light, though that might be unrelated. I keep watching the system, but so far I've felt no problems. |
I have the black bar in qutebrowser, Chromium and Firefox since yesterday. Seems not related to nvidia at least, though strange.
--
Nikolay.
|
The black bar has been present in GitHub Enterprise for months, apparently they've moved it over to public GitHub. FWIW. |
Oh, that explains it, thanks. |
:-D I tried on chromium and didn't have the bar. I assumed logging in won't change it, but I was wrong. |
Motivation for this change
Make several improvements to nvidia drivers on NixOS:
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)Sadly I can't fully test this myself because at some point my laptop lost ability to switch to dedicated-only card in BIOS so I can't use nvidia without intel/bumblebee now. Bumblebee works fine though, both
optirun
andprimusrun
.