Skip to content

Commit

Permalink
[Backport release-24.11] nixos/doc: update the status of Intel Graphi…
Browse files Browse the repository at this point in the history
…cs (#369734)
  • Loading branch information
rnhmjoj authored Dec 31, 2024
2 parents 238e34f + b468b0f commit edf04b7
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 80 deletions.
50 changes: 18 additions & 32 deletions nixos/doc/manual/configuration/x-windows.chapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,48 +116,34 @@ using lightdm for a user `alice`:

## Intel Graphics drivers {#sec-x11--graphics-cards-intel}

There are two choices for Intel Graphics drivers in X.org: `modesetting`
(included in the xorg-server itself) and `intel` (provided by the
package xf86-video-intel).

The default and recommended is `modesetting`. It is a generic driver
which uses the kernel [mode
setting](https://en.wikipedia.org/wiki/Mode_setting) (KMS) mechanism. It
The default and recommended driver for Intel Graphics in X.org is `modesetting`
(included in the xorg-server package itself).
This is a generic driver which uses the kernel [mode
setting](https://en.wikipedia.org/wiki/Mode_setting) (KMS) mechanism, it
supports Glamor (2D graphics acceleration via OpenGL) and is actively
maintained but may perform worse in some cases (like in old chipsets).

The second driver, `intel`, is specific to Intel GPUs, but not
recommended by most distributions: it lacks several modern features (for
example, it doesn't support Glamor) and the package hasn't been
officially updated since 2015.

The results vary depending on the hardware, so you may have to try both
drivers. Use the option
[](#opt-services.xserver.videoDrivers)
to set one. The recommended configuration for modern systems is:
maintained, it may perform worse in some cases (like in old chipsets).

```nix
{
services.xserver.videoDrivers = [ "modesetting" ];
}
```
::: {.note}
The `modesetting` driver doesn't currently provide a `TearFree` option (this
will become available in an upcoming X.org release), So, without using a
compositor (for example, see [](#opt-services.picom.enable)) you will
experience screen tearing.
:::

If you experience screen tearing no matter what, this configuration was
reported to resolve the issue:
There also used to be a second driver, `intel` (provided by the
xf86-video-intel package), specific to older Intel iGPUs from generation 2 to
9.
This driver hasn't been maintained in years and was removed in NixOS 24.11
after it stopped working. If you chipset is too old to be supported by
`modesetting` and have no other choice you may try an unsupported NixOS version
(reportedly working up to NixOS 24.05) and set

```nix
{
services.xserver.videoDrivers = [ "intel" ];
services.xserver.deviceSection = ''
Option "DRI" "2"
Option "TearFree" "true"
'';
}
```

Note that this will likely downgrade the performance compared to
`modesetting` or `intel` with DRI 3 (default).

## Proprietary NVIDIA drivers {#sec-x11-graphics-cards-nvidia}

NVIDIA provides a proprietary driver for its graphics cards that has
Expand Down
3 changes: 3 additions & 0 deletions nixos/doc/manual/release-notes/rl-2411.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@

- The NVIDIA driver no longer defaults to the proprietary kernel module with versions >= 560. You will need to manually set `hardware.nvidia.open` to select the proprietary or open modules.

- The `intel` driver for the X server (`services.xserver.videoDrives = [ "intel" ]`) is no longer functional due to incompatibilities with the latest Mesa version.
All users are strongly encouraged to switch to the generic `modesetting` driver (the default one) whenever possible, for more information see the manual chapter on [Intel Graphics](#sec-x11--graphics-cards-intel) and issue [#342763](https://github.com/NixOS/nixpkgs/issues/342763).

- The `(buildPythonPackage { ... }).override` and `(buildPythonPackage { ... }).overrideDerivation` attributes is now deprecated and removed in favour of `overridePythonAttrs` and `lib.overrideDerivation`.
This change does not affect the override interface of most Python packages, as [`<pkg>.override`](https://nixos.org/manual/nixpkgs/unstable/#sec-pkg-override) provided by `callPackage` shadows such a locally-defined `override` attribute.
The `<pkg>.overrideDerivation` attribute of Python packages called with `callPackage` will also remain available after this change.
Expand Down
24 changes: 4 additions & 20 deletions pkgs/servers/x11/xorg/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1021,26 +1021,10 @@ self: super:
meta = attrs.meta // { mainProgram = "xinit"; };
});

xf86videointel = super.xf86videointel.overrideAttrs (attrs: {
# the update script only works with released tarballs :-/
name = "xf86-video-intel-2021-01-15";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
group = "xorg";
owner = "driver";
repo = "xf86-video-intel";
rev = "31486f40f8e8f8923ca0799aea84b58799754564";
sha256 = "sha256-nqT9VZDb2kAC72ot9UCdwEkM1uuP9NriJePulzrdZlM=";
};
buildInputs = attrs.buildInputs ++ [ xorg.libXScrnSaver xorg.libXv xorg.pixman xorg.utilmacros ];
nativeBuildInputs = attrs.nativeBuildInputs ++ [autoreconfHook ];
configureFlags = [ "--with-default-dri=3" "--enable-tools" ];
patches = [ ./use_crocus_and_iris.patch ];

meta = attrs.meta // {
platforms = ["i686-linux" "x86_64-linux"];
};
});
xf86videointel = throw ''
xf86videointel has been removed as the package is unmaintained and the driver is no longer functional.
Please remove "intel" from `services.xserver.videoDrivers` and switch to the "modesetting" driver.
''; # Added 2024-12-16;

xf86videoopenchrome = super.xf86videoopenchrome.overrideAttrs (attrs: {
buildInputs = attrs.buildInputs ++ [ xorg.libXv ];
Expand Down
28 changes: 0 additions & 28 deletions pkgs/servers/x11/xorg/use_crocus_and_iris.patch

This file was deleted.

0 comments on commit edf04b7

Please sign in to comment.