From ae0cfe80c45812c9816cfa85385fe349089f60c5 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Tue, 23 Aug 2022 18:14:00 +0100 Subject: [PATCH] nixos/xserver: remove useGlamor option This option is based on a recommendation from a page last updated in 2014 (see https://www.freedesktop.org/wiki/Software/Glamor/), and it is not necessary anymore. Also, it did the wrong thing: it forced DRI2, but Glamor should also work with DRI3, that is a better option most of the time. So let's remove this option, folks that still want to force this manually can do so in other ways. --- .../manual/configuration/x-windows.chapter.md | 1 - .../configuration/x-windows.chapter.xml | 1 - nixos/modules/services/x11/xserver.nix | 21 +++---------------- 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/nixos/doc/manual/configuration/x-windows.chapter.md b/nixos/doc/manual/configuration/x-windows.chapter.md index 2c80b786b267..27d117238807 100644 --- a/nixos/doc/manual/configuration/x-windows.chapter.md +++ b/nixos/doc/manual/configuration/x-windows.chapter.md @@ -120,7 +120,6 @@ to set one. The recommended configuration for modern systems is: ```nix services.xserver.videoDrivers = [ "modesetting" ]; -services.xserver.useGlamor = true; ``` If you experience screen tearing no matter what, this configuration was diff --git a/nixos/doc/manual/from_md/configuration/x-windows.chapter.xml b/nixos/doc/manual/from_md/configuration/x-windows.chapter.xml index 274d0d817bc1..c17e98983b27 100644 --- a/nixos/doc/manual/from_md/configuration/x-windows.chapter.xml +++ b/nixos/doc/manual/from_md/configuration/x-windows.chapter.xml @@ -133,7 +133,6 @@ services.xserver.displayManager.autoLogin.user = "alice"; services.xserver.videoDrivers = [ "modesetting" ]; -services.xserver.useGlamor = true; If you experience screen tearing no matter what, this diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index dc48f3ac030a..026f078daf6d 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -151,8 +151,10 @@ in (mkRemovedOptionModule [ "services" "xserver" "startDbusSession" ] "The user D-Bus session is now always socket activated and this option can safely be removed.") - (mkRemovedOptionModule ["services" "xserver" "useXFS" ] + (mkRemovedOptionModule [ "services" "xserver" "useXFS" ] "Use services.xserver.fontPath instead of useXFS") + (mkRemovedOptionModule [ "services" "xserver" "useGlamor" ] + "Option services.xserver.useGlamor was removed because it is unnecessary. Drivers that uses Glamor will use it automatically.") ]; @@ -555,15 +557,6 @@ in ''; }; - useGlamor = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc '' - Whether to use the Glamor module for 2D acceleration, - if possible. - ''; - }; - enableCtrlAltBackspace = mkOption { type = types.bool; default = false; @@ -794,13 +787,6 @@ in '')} EndSection - ${if cfg.useGlamor then '' - Section "Module" - Load "dri2" - Load "glamoregl" - EndSection - '' else ""} - # For each supported driver, add a "Device" and "Screen" # section. ${flip concatMapStrings cfg.drivers (driver: '' @@ -808,7 +794,6 @@ in Section "Device" Identifier "Device-${driver.name}[0]" Driver "${driver.driverName or driver.name}" - ${if cfg.useGlamor then ''Option "AccelMethod" "glamor"'' else ""} ${indent cfg.deviceSection} ${indent (driver.deviceSection or "")} ${indent xrandrDeviceSection}