nixpkgs/pkgs/desktops/gnome-3/core
Ambroz Bizjak f26153754a nixos/xserver: Implement configuration of NVIDIA Optimus via PRIME
This adds configuration options which automate the configuration of NVIDIA Optimus using PRIME. This allows using the NVIDIA proprietary driver on Optimus laptops, in order to render using the NVIDIA GPU while outputting to displays connected only to the integrated Intel GPU. It also adds an option for enabling kernel modesetting for the NVIDIA driver (via a kernel command line flag); this is particularly useful together with Optimus/PRIME because it fixes tearing on PRIME-connected screens.

The user still needs to enable the Optimus/PRIME feature and specify the bus IDs of the Intel and NVIDIA GPUs, but this is still much easier for users and more reliable. The implementation handles both the X configuration file as well as getting display managers to run certain necessary `xrandr` commands just after X has started.

Configuration of commands run after X startup is done using a new configuration option `services.xserver.displayManager.setupCommands`. Support for this option is implemented for LightDM, GDM and SDDM; all of these have been tested with this feature including logging into a Plasma session.

Note: support of `setupCommands` for GDM is implemented by making GDM run the session executable via a wrapper; the wrapper will run the `setupCommands` before execing. This seemed like the simplest and most reliable approach, and solves running these commands both for GDM's X server and user X servers (GDM starts separate X servers for itself and user sessions). An alternative approach would be with autostart files but that seems harder to set up and less reliable.

Note that some simple features for X configuration file generation (in `xserver.nix`) are added which are used in the implementation:
- `services.xserver.extraConfig`: Allows adding arbitrary new sections. This is used to add the Device section for the Intel GPU.
- `deviceSection` and `screenSection` within `services.xserver.drivers`. This allows the nvidia configuration module to add additional contents into the `Device` and `Screen` sections of the "nvidia" driver, and not into such sections for other drivers that may be enabled.
2018-07-09 18:46:13 +02:00
..
adwaita-icon-theme gnome3: automated update 2018-03-22 07:46:42 +01:00
baobab gnome3.baobab: fix build 2018-03-22 07:46:43 +01:00
caribou gnome3.caribou: add updateScript 2018-03-04 20:05:55 +01:00
dconf tree-wide: disable doCheck and doInstallCheck where it fails (the trivial part) 2018-04-25 04:18:46 +00:00
dconf-editor gnome3.dconf-editor: fix build 2018-03-22 07:46:43 +01:00
empathy gnome3: automated update 2018-03-22 07:46:42 +01:00
eog gnome3.eog: 3.28.1 → 3.28.2 2018-05-08 02:36:21 +02:00
epiphany gnome3.epiphany: 3.28.2.1 → 3.28.3.1 2018-06-13 20:15:05 +02:00
evince gnome3: 3.28.0 → 3.28.1 2018-04-14 13:35:45 +02:00
evolution-data-server evolution-data-server: 3.28.2 → 3.28.3 2018-06-20 02:06:47 +02:00
folks treewide: stdenv.lib.platforms.gnu -> ... gnu ++ linux 2018-04-30 18:12:10 -05:00
gconf tree-wide: autorename gnome packages to use dashes 2018-02-25 17:41:16 +01:00
gcr gnome3: automated update 2018-03-22 07:46:42 +01:00
gdm nixos/xserver: Implement configuration of NVIDIA Optimus via PRIME 2018-07-09 18:46:13 +02:00
geocode-glib gnome3.geocode-glib: 3.25.4.1 → 3.26.0 2018-06-06 11:40:17 +02:00
gjs gnome3.gjs: 1.52.2 → 1.52.3 2018-05-08 02:36:57 +02:00
gnome-backgrounds gnome3.gnome-backgrounds: fix build 2018-03-22 07:46:42 +01:00
gnome-bluetooth gnome3: automated update 2018-03-22 07:46:42 +01:00
gnome-calculator gnome3: 3.28.0 → 3.28.1 2018-04-14 13:35:45 +02:00
gnome-color-manager gnome3.gnome-color-manager: fix build 2018-03-22 07:46:45 +01:00
gnome-common gnome3: move src.nix into default.nix automatically 2018-03-01 02:53:00 +01:00
gnome-contacts gnome3.gnome-contacts: 3.28.1 → 3.28.2 2018-05-08 02:37:17 +02:00
gnome-control-center gnome3.gnome-control-center: 3.28.1 → 3.28.2 2018-06-06 11:40:31 +02:00
gnome-desktop gnome3.gnome-desktop: 3.28.1 → 3.28.2 2018-05-19 17:34:09 +02:00
gnome-dictionary gnome3.gnome-dictionary: clean up 2018-03-23 13:18:37 +01:00
gnome-disk-utility gnome3.gnome-disk-utility: 3.28.2 → 3.28.3 2018-06-06 11:40:49 +02:00
gnome-font-viewer gnome3: automated update 2018-03-22 07:46:42 +01:00
gnome-keyring gnome3.gnome-keyring: 3.28.0.2 → 3.28.2 2018-05-08 02:37:35 +02:00
gnome-menus treewide: http to https 2018-04-30 21:39:20 -07:00
gnome-online-accounts gnome3.gnome-online-accounts: fix build 2018-03-22 07:46:54 +01:00
gnome-online-miners gnome3: move src.nix into default.nix automatically 2018-03-01 02:53:00 +01:00
gnome-screenshot gnome3.gnome-screenshot: clean up 2018-03-23 13:18:38 +01:00
gnome-session gnome3: 3.28.0 → 3.28.1 2018-04-14 13:35:45 +02:00
gnome-settings-daemon gnome3: 3.28.0 → 3.28.1 2018-04-14 13:35:45 +02:00
gnome-shell gnome3.gnome-shell: 3.28.1 -> 3.28.2 2018-05-13 23:15:39 +02:00
gnome-shell-extensions gnome3.gnome-shell-extensions: 3.28.0 → 3.28.1 2018-05-08 02:47:43 +02:00
gnome-software gnome3.gnome-software: 3.28.1 → 3.28.2 2018-05-19 17:34:09 +02:00
gnome-system-log gnome3.gnome-system-log: clean up 2018-03-23 13:18:38 +01:00
gnome-system-monitor gnome3.gnome-system-monitor: 3.28.1 → 3.28.2 2018-05-19 17:34:10 +02:00
gnome-terminal gnome3.gnome-terminal: 3.28.1 → 3.28.2 2018-06-06 11:41:09 +02:00
gnome-themes-extra gnome3.gnome-themes-extra: 3.27.92 → 3.28 2018-03-28 19:50:32 +02:00
gnome-user-docs gnome3.gnome-user-docs: 3.28.1 → 3.28.2 2018-05-19 17:34:10 +02:00
gnome-user-share gnome3: 3.28.0 → 3.28.1 2018-04-14 13:35:45 +02:00
grilo gnome3.grilo: clean up 2018-06-18 05:03:38 +02:00
grilo-plugins gnome3.grilo-plugins: add updateScript 2018-03-04 20:05:55 +01:00
gsettings-desktop-schemas gnome3: automated update 2018-03-22 07:46:42 +01:00
gsound gnome3.gsound: add updateScript 2018-03-04 20:05:55 +01:00
gtksourceviewmm gnome3: automated update 2018-03-22 07:46:42 +01:00
gucharmap gnome3.gucharmap: clean up 2018-03-22 07:46:50 +01:00
libcroco gnome3.libcroco: fix patch url 2018-05-29 10:56:23 +02:00
libgdata gnome3.libgdata: add updateScript 2018-03-04 20:05:50 +01:00
libgee treewide: remove placeholder usage 2018-03-27 20:14:44 +02:00
libgepub gnome3: automated update 2018-03-22 07:46:42 +01:00
libgnome-keyring gnome3.libgnome-keyring: add updateScript 2018-03-04 20:05:50 +01:00
libgnomekbd gnome3: move src.nix into default.nix automatically 2018-03-01 02:53:00 +01:00
libgweather gnome3.libgweather: 3.28.1 → 3.28.2 2018-06-14 18:26:50 +02:00
libgxps gnome3.libgxps: add updateScript 2018-03-04 20:05:50 +01:00
libpeas libpeas: supports darwin 2018-05-31 12:34:15 -04:00
libzapojit gnome3.libzapojit: build gir 2018-03-22 07:46:54 +01:00
mutter gnome3.gnome-shell: 3.28.1 -> 3.28.2 2018-05-13 23:15:39 +02:00
nautilus gnome3: 3.28.0 → 3.28.1 2018-04-14 13:35:45 +02:00
rest gnome3.rest: add updateScript 2018-03-04 20:05:50 +01:00
simple-scan gnome3: 3.28.0 → 3.28.1 2018-04-14 13:35:45 +02:00
sushi gnome3.sushi: 3.24.0 → 3.28.3 2018-04-24 13:30:57 +02:00
totem gnome3.totem: 3.26.0 → 3.26.1 2018-06-18 05:03:40 +02:00
totem-pl-parser gnome3.totem-pl-parser: 3.26.0 → 3.26.1 2018-06-14 18:16:28 +02:00
tracker gnome3.tracker: 2.0.3 → 2.0.4 2018-06-30 02:23:25 +02:00
tracker-miners gnome3.tracker-miners: 2.0.4 → 2.0.5 2018-06-30 02:31:10 +02:00
vino gnome3.vino: clean up 2018-03-22 07:46:58 +01:00
vte gnome3.vte: 0.52.1 → 0.52.2 2018-06-06 12:43:30 +02:00
yelp gnome3: 3.28.0 → 3.28.1 2018-04-14 13:35:45 +02:00
yelp-tools gnome3: automated update 2018-03-22 07:46:42 +01:00
yelp-xsl gnome3: automated update 2018-03-22 07:46:42 +01:00
zenity gnome3: 3.28.0 → 3.28.1 2018-04-14 13:35:45 +02:00