3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos/modules/services/x11
Ambroz Bizjak 370d3af0c4 nixos: Don't set LD_LIBRARY_PATH for graphics drivers that don't need it.
A new internal option `hardware.opengl.setLdLibraryPath` is added which controls if `LD_LIBRARY_PATH` should be set to `/run/opengl-driver(-32)/lib`. It is false by default and is meant to be set to true by any driver which requires it. If this option is false, then `opengl.nix` and `xserver.nix` will not set `LD_LIBRARY_PATH`.

Currently Mesa and NVidia drivers don't set `setLdLibraryPath` because they work with libglvnd and do not override libraries, while `amdgpu-pro`, `ati` and `parallels-guest` set it to true (the former two really need it, the last one doesn't build so is presumed to).

Additionally, the `libPath` attribute within entries of `services.xserver.drivers` is removed. This made `xserver.nix` add the driver path directly to the `LD_LIBRARY_PATH` for the display manager (including X server). Not only is it redundant when the driver is added to `hardware.opengl.package` (assuming that `hardware.opengl.enable` is true), in fact all current drivers except `ati` set it incorrectly to the package path instead of package/lib.

This removal of `LD_LIBRARY_PATH` could break certain packages using CUDA, but only those that themselves load `libcuda` or other NVidia driver libraries using `dlopen` (not if they just use `cudatoolkit`). A few have already been fixed but it is practically impossible to test all because most packages using CUDA are libraries/frameworks without a simple way to test.

Fixes #11434 if only Mesa or NVidia graphics drivers are used.
2019-05-26 10:23:46 +02:00
..
desktop-managers nixos/pantheon: add geoclue application configuration 2019-05-16 18:46:07 -04:00
display-managers nixos/xserver: improve DM error message when X off 2019-05-02 16:19:59 +00:00
hardware
window-managers nixos/window-managers/i3: write config file to /etc/i3/config 2019-04-26 21:12:52 +02:00
colord.nix nixos/modules: Ensure the colord user is a system user 2019-05-18 16:48:34 -06:00
compton.nix nixos/compton: fix corrupt colours with Mesa 18 on AMD 2018-10-19 01:10:11 +02:00
fractalart.nix
gdk-pixbuf.nix nixos: add preferLocalBuild=true; on derivations for config files 2019-02-22 20:11:27 +01:00
redshift.nix
terminal-server.nix
unclutter-xfixes.nix
unclutter.nix
urxvtd.nix urxvt: Allow switching out package 2019-01-07 07:35:20 -05:00
xautolock.nix nixos/xautolock: improve doc of time parameer 2019-02-09 20:47:01 +01:00
xbanish.nix
xfs.conf
xfs.nix
xserver.nix nixos: Don't set LD_LIBRARY_PATH for graphics drivers that don't need it. 2019-05-26 10:23:46 +02:00