Nvidia: Difference between revisions

imported>Vodkabot2
No edit summary
imported>Bitmappergit
m conciseness
Line 8: Line 8:
'''You need MXM card'''. Follow [https://nixos.org/nixos/manual/#idm140737316313424 NVIDIA Graphics Cards] section in official manual.  
'''You need MXM card'''. Follow [https://nixos.org/nixos/manual/#idm140737316313424 NVIDIA Graphics Cards] section in official manual.  


In case of laptop you may also need to use BIOS option to select which card to use for internal display.
In case of laptop you may also need to use a BIOS option to select which card to use for the internal display.


== Optimus ==
== Optimus ==
Line 17: Line 17:


Unofficial solution.
Unofficial solution.
 
* Pros:  
* Pros:  
** out of box experience, just start the game via ''primusrun'' or ''optirun'' wrapper
** works out of the box, just start the game via the ''primusrun'' or ''optirun'' wrapper
** works under existing X11 server
** works under existing X11 server


* Cons:  
* Cons:  
** some performance penalty, running under wayland descreases performance even more
** some performance penalties, running under wayland decreases performance even more
** things like Vulkan, CUDA and OpenCL are problematic to configure
** things like Vulkan, CUDA and OpenCL are problematic to configure


Line 36: Line 36:


* Pros:  
* Pros:  
** better performance than Bumblebee
** Has better performance than Bumblebee
** Vulkan, CUDA and OpenCL work, though CUDA needs an additional device creation rule https://github.com/NixOS/nixpkgs/blob/05e375d7103ac51e2da917965c37246c99f1ae4f/nixos/modules/hardware/video/nvidia.nix#L72
** Vulkan, CUDA and OpenCL work, though CUDA needs an additional device creation rule https://github.com/NixOS/nixpkgs/blob/05e375d7103ac51e2da917965c37246c99f1ae4f/nixos/modules/hardware/video/nvidia.nix#L72
** pure wayland setup is supported
** Using a pure wayland setup is supported


* Cons:
* Cons:
** there are still some rough edges noted on the top of script
** There are still some slight issues noted at the top of script
** launches new X11 server (and so its preferable to run WM/DE along with running program)
** Launches new X11 server (and so it's preferable to run the WM/DE alongside the program)


'''1.''' Configure NixOS to allow Intel and Nvidia X.Org drivers coexist together (only needed because NixOS forces LD_LIBRARY_PATH variable propagation), and also to disable nvidia card by default.
'''1.''' Configure NixOS to allow Intel and Nvidia X.Org drivers coexist together (only needed because NixOS forces LD_LIBRARY_PATH variable propagation), and also to disable nvidia card by default.