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
nixos/nvidia: Add NVIDIA optimus option to allow external GPUs #59856
Conversation
It's customary to prefix a commit msg to a nixos module with
|
Thanks for taking a look - should all be sorted now :D |
3b19954
to
51bd263
Compare
Would making this be enabled by default be a problem? |
Default enabling it shouldn't be a problem + I updated the code to do that. If it's enabled by default do we still need the option to disable it? It seems like a safe conservative choice to leave it in case someone finds problems or doesn't want to allow it. |
What do the docs on this option say? I feel like there might be some security implications, but I really have no idea. If there's no problems with enabling it I don't think we need a NixOS option for it even. |
https://download.nvidia.com/XFree86/Linux-x86_64/396.51/README/xconfigoptions.html#AllowExternalGpus says that if you unplug the GPU you'll have issues. No security issues are mentioned |
Eh, after reading that description I'm pretty sure we should leave it at false by default and leave it configurable. There's apparently reasons it's false by default. |
Flipped it back |
Without this option - NVIDIA refuses to use an external GPU.
@infinisil is this good to merge? |
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.
Looks good 👍
Thank you @c00w for contributing 🎆 Sorry about all the flipping back and forth, but we did figure out why it's false by default |
Without this option - NVIDIA refuses to use an external GPU.
Motivation for this change
I have a computer with an external NVIDIA GPU connected. I want to run some monitors off the external GPU and some off the internal intel GPU - After a lot of debugging, this was the required change.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)