Commit Graph

1525 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
3ca1571d89
Merge pull request #42797 from jtojnar/tracker-update
gnome3.tracker update
2018-06-30 06:06:35 +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
eee6565783
gspell: move to top-level 2018-06-29 18:41:59 +02:00
Jan Tojnar
843a1cdcae
gnome3.evolution: 3.28.2 → 3.28.3 2018-06-20 02:06:48 +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
7ba1016f91
gnome3.gnome-documents: 3.28.0 → 3.28.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
Orivej Desh
8414fa2d6b Revert "vinagre: disable format hardening"
This reverts commit f34b498bd2.

It did not fix the build error in https://hydra.nixos.org/build/75464534/nixlog,
but #41449 did.
2018-06-04 22:37:07 +00:00
Daiderd Jordan
0b458a4129
Merge pull request #41449 from flokli/vinagre-build
gnome3.vinagre: fix build
2018-06-04 21:32:20 +02:00
Matthew Justin Bauer
f34b498bd2
vinagre: disable format hardening
https://hydra.nixos.org/build/75464534/nixlog/1
2018-06-04 14:52:32 -04:00
Florian Klink
67eaab86b4 gnome3.vinagre: fix build
Currently, vinagre fails to build with the following message:

vinagre/vinagre-utils.c: In function 'vinagre_utils_request_credential':
vinagre/vinagre-utils.c:686:2: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
  _tmp12_ = g_strdup_printf (_tmp10_, _tmp11_);
  ^~~~~~~

vinagre-utils.c seems to be generated from vinagre-utils.vala. I
couldn't find anything weird in here, so let's disable
-Werror=format-nonliteral for now as done elsewhere, too.
2018-06-04 16:24:38 +02:00
Matthew Bauer
8950b14355 libpeas: supports darwin 2018-05-31 12:34:15 -04:00
Jan Tojnar
59f86ab48d
gnome3: remove gtk2 from the attribute set 2018-05-29 15:44:36 +02:00
Jan Tojnar
adcfd39bb9
gnome3.libcroco: fix patch url 2018-05-29 10:56:23 +02:00
Jan Tojnar
c087482770
gnome3.nemiver: fix patch url 2018-05-29 10:34:17 +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
Jan Tojnar
8d9496cb73
gnome3.gnome-music: 3.28.2 → 3.28.2.1 2018-05-19 17:34:09 +02:00
Jan Tojnar
3929be8495
gnome3.gnome-getting-started-docs: 3.28.1 → 3.28.2 2018-05-19 17:34:09 +02:00
Jan Tojnar
683d397dd8
gnome3.gnome-boxes: 3.28.3 → 3.28.4 2018-05-19 17:34:08 +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
Matthew Bauer
c605d171bb treewide: remove lintl references
libintl should be used directly, not through NIX_LDFLAGS.
2018-05-16 01:02:31 -05: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