Commit Graph

464 Commits

Author SHA1 Message Date
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
Jan Tojnar
6589358664
gnome3.tracker-miners: 2.0.4 → 2.0.5 2018-06-30 02:31:10 +02:00
Jan Tojnar
236d92af11
gnome3.tracker: 2.0.3 → 2.0.4 2018-06-30 02:23:25 +02:00
Jan Tojnar
48fd0e6f20
evolution-data-server: 3.28.2 → 3.28.3 2018-06-20 02:06:47 +02:00
Jan Tojnar
69384eb47f
gnome3.totem: 3.26.0 → 3.26.1 2018-06-18 05:03:40 +02:00
Jan Tojnar
7de340761d
gnome3.grilo: clean up 2018-06-18 05:03:38 +02:00
Jan Tojnar
6a916d029e
gnome3.libgweather: 3.28.1 → 3.28.2 2018-06-14 18:26:50 +02:00
Jan Tojnar
e2f9304606
gnome3.totem-pl-parser: 3.26.0 → 3.26.1 2018-06-14 18:16:28 +02:00
Jan Tojnar
42a08e62f5
gnome3.epiphany: 3.28.2.1 → 3.28.3.1 2018-06-13 20:15:05 +02:00
Jan Tojnar
05b9e9f011
gnome3.totem: fix build
Hopefully a proper fix for be17bccf38
2018-06-09 19:08:19 +02:00
Jan Tojnar
f5150da8f9
Merge pull request #41556 from jtojnar/gnome3-update
gnome3 update
2018-06-06 15:07:43 +02:00
Jan Tojnar
027180ab03
gnome3.vte: 0.52.1 → 0.52.2 2018-06-06 12:43:30 +02:00
Jan Tojnar
fba07434d1
gnome3.gnome-terminal: 3.28.1 → 3.28.2 2018-06-06 11:41:09 +02:00
Jan Tojnar
933383ceb8
gnome3.gnome-disk-utility: 3.28.2 → 3.28.3 2018-06-06 11:40:49 +02:00
Jan Tojnar
e12afbe115
gnome3.gnome-control-center: 3.28.1 → 3.28.2 2018-06-06 11:40:31 +02:00
Jan Tojnar
26aca3bee1
gnome3.geocode-glib: 3.25.4.1 → 3.26.0 2018-06-06 11:40:17 +02:00
Jan Tojnar
17a8d7f5a4
gnome3.gdm: 3.28.1 → 3.28.2 2018-06-06 11:39:22 +02:00
Jan Tojnar
f65cee3b9c
gnome3.epiphany: 3.28.1.1 → 3.28.2.1 2018-06-06 11:39:01 +02:00
Matthew Bauer
8950b14355 libpeas: supports darwin 2018-05-31 12:34:15 -04:00
Jan Tojnar
adcfd39bb9
gnome3.libcroco: fix patch url 2018-05-29 10:56:23 +02:00
Vladimír Čunát
392e6de7d0
Merge branch 'master' into staging 2018-05-20 13:20:53 +02:00
Jan Tojnar
e96ec37c00
gnome3.gnome-user-docs: 3.28.1 → 3.28.2 2018-05-19 17:34:10 +02:00
Jan Tojnar
e7923b9e26
gnome3.gnome-system-monitor: 3.28.1 → 3.28.2 2018-05-19 17:34:10 +02:00
Jan Tojnar
0cc8b413da
gnome3.gnome-software: 3.28.1 → 3.28.2 2018-05-19 17:34:09 +02:00
Jan Tojnar
347c1c82bb
gnome3.gnome-disk-utility: 3.28.1 → 3.28.2 2018-05-19 17:34:09 +02:00
Jan Tojnar
eda0044379
gnome3.gnome-desktop: 3.28.1 → 3.28.2 2018-05-19 17:34:09 +02:00
John Ericson
ddbe9191ef Merge remote-tracking branch 'upstream/master' into staging
Keep the dontCheck because the test suite fails, get rid of the LDFLAGS
hack because we don't need it!
2018-05-16 15:16:08 -04:00
Jan Tojnar
75cc398b97
Merge pull request #39615 from jtojnar/gdm-wayland
GDM wayland improvements
2018-05-16 16:39:12 +02:00
Jan Tojnar
3bfa8563d1
gnome3.gdm: fix wayland detection
Apparently, wayland session were not used at all until now.
2018-05-16 16:25:21 +02:00
Jan Tojnar
6f23e142cb
gnome3.gdm: clean up 2018-05-16 16:25:20 +02:00
Tuomas Tynkkynen
6b6a575748 Merge remote-tracking branch 'upstream/master' into staging
Conflicts:
	pkgs/tools/networking/telnet/default.nix
	pkgs/top-level/aliases.nix
2018-05-16 03:09:33 +03:00
Yegor Timoshenko
edbce18903
tracker-miners: switch to meson, some tweaks (#39534) 2018-05-15 20:55:40 +03:00
Jan Tojnar
1092a24307
Merge pull request #40460 from hedning/gnome-shell-3.28.2
gnome3.gnome-shell: 3.28.1 -> 3.28.2
2018-05-15 14:26:49 +02:00
Jan Tojnar
d5060ac3a7
Merge pull request #33371 from jtojnar/flatpak
Flatpak
2018-05-15 14:19:33 +02:00
Jan Tojnar
2fc8b83282
gnome3.gnome-software: build with flatpak support 2018-05-15 13:28:30 +02:00
Tor Hedin Brønner
989fd880a1 gnome3.gnome-shell: 3.28.1 -> 3.28.2 2018-05-13 23:15:39 +02:00
Frederik Rietdijk
658b7c3f2e Merge master into staging 2018-05-13 12:13:25 +02:00
Jan Tojnar
0e57b81b2d
gnome3.gnome-shell: fix libgnomekdb path 2018-05-12 22:58:04 +02:00
Matthew Bauer
6748534d83 Merge remote-tracking branch 'upstream/master' into staging 2018-05-08 09:36:00 -05:00
Jan Tojnar
85a0cd915b
Merge pull request #40155 from jtojnar/gnome-3.28.2
GNOME Updates
2018-05-08 04:42:29 +02:00
Jan Tojnar
c477acec9e
gnome3.mutter: 3.28.0 → 3.28.1 2018-05-08 03:31:57 +02:00
Jan Tojnar
df80580521
gnome3.gnome-shell: 3.28.0 → 3.28.1 2018-05-08 03:31:56 +02:00
Jan Tojnar
2b1db53296
gnome3.gnome-shell-extensions: 3.28.0 → 3.28.1 2018-05-08 02:47:43 +02:00
Jan Tojnar
fef1129d4e
gnome3.gnome-keyring: 3.28.0.2 → 3.28.2 2018-05-08 02:37:35 +02:00
Jan Tojnar
6465aaac06
gnome3.gnome-contacts: 3.28.1 → 3.28.2 2018-05-08 02:37:17 +02:00
Jan Tojnar
6353a952ce
gnome3.gjs: 1.52.2 → 1.52.3 2018-05-08 02:36:57 +02:00
Jan Tojnar
44e49b9e45
evolution-data-server: 3.28.1 → 3.28.2 2018-05-08 02:36:37 +02:00
Jan Tojnar
ffda669690
gnome3.eog: 3.28.1 → 3.28.2 2018-05-08 02:36:21 +02:00
Jan Tojnar
300af66777
gnome3.gdm: fix session chooser
We are patching GDM to respect GDM_SESSIONS_DIR environment
variable, which we are setting in the GDM module. Previously, we
only took care of a single code path, the one that handled session
start-up; missing the one obtaining the list of sessions.

This commit patches the second code path, and also whitelists the
GDM_SESSIONS_DIR so that it can be passed to the greeter.

Fixes #34101
2018-05-06 22:20:56 +02:00
Jan Tojnar
4feaecc23d
evolution-data-server: fix SSL support on non-GNOME platforms 2018-05-05 14:57:18 +02:00