diff --git a/files/0001-Solus-Ensure-we-don-t-enable-rootless-xorg-on-nvidia.patch b/files/0001-Solus-Ensure-we-don-t-enable-rootless-xorg-on-nvidia.patch new file mode 100644 --- /dev/null +++ b/files/0001-Solus-Ensure-we-don-t-enable-rootless-xorg-on-nvidia.patch @@ -0,0 +1,48 @@ +From 977208bc7ea94d66799080b4ec8e28eb2fa52706 Mon Sep 17 00:00:00 2001 +From: Joey Riches +Date: Tue, 18 Jul 2023 15:23:53 +0100 +Subject: [PATCH 1/1] Solus: Ensure we don't enable rootless xorg on nvidia-drm + +The wrapper code assumes that if a driver supports KMS, then rootless xorg +will work. Unfortunately with the nvidia-drm driver (the KMS equivalent +of nvidia) this doesn't seem to be the case. + +True as of: Nvidia 535.54.03. +--- + hw/xfree86/xorg-wrapper.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/hw/xfree86/xorg-wrapper.c b/hw/xfree86/xorg-wrapper.c +index c5e4a278b..83998481c 100644 +--- a/hw/xfree86/xorg-wrapper.c ++++ b/hw/xfree86/xorg-wrapper.c +@@ -231,6 +231,13 @@ int main(int argc, char *argv[]) + } + + #ifdef WITH_LIBDRM ++ char driver_name[64] = {0}; ++ struct drm_version ver = { ++ .name = driver_name, ++ .name_len = 63, ++ }; ++ int info; ++ + /* Detect if we need root rights, except when overriden by the config */ + if (needs_root_rights == -1) { + for (i = 0; i < 16; i++) { +@@ -243,7 +250,11 @@ int main(int argc, char *argv[]) + + memset(&res, 0, sizeof(struct drm_mode_card_res)); + r = ioctl(fd, DRM_IOCTL_MODE_GETRESOURCES, &res); +- if (r == 0) ++ ++ /* HACKS! rootless xorg doesn't work with nvidia-drm (tested 535.54.03) */ ++ info = ioctl(fd, DRM_IOCTL_VERSION, &ver); ++ ++ if (r == 0 && strncmp(driver_name, "nvidia-drm", strlen("nvidia-drm")) != 0) + kms_cards++; + + close(fd); +-- +2.40.1 + diff --git a/files/series b/files/series --- a/files/series +++ b/files/series @@ -19,3 +19,4 @@ security/CVE-2022-46344-2.patch security/CVE-2023-0494.patch security/CVE-2023-1393.patch +0001-Solus-Ensure-we-don-t-enable-rootless-xorg-on-nvidia.patch diff --git a/package.yml b/package.yml --- a/package.yml +++ b/package.yml @@ -1,6 +1,6 @@ name : xorg-server version : 1.20.14 -release : 89 +release : 90 source : - https://xorg.freedesktop.org/archive/individual/xserver/xorg-server-1.20.14.tar.xz : 5cc5b70b9be89443e2594b93656c60bd5e82cd7f01deb4ce4faf81dcf546a16b homepage : https://xorg.freedesktop.org/wiki/ diff --git a/pspec_x86_64.xml b/pspec_x86_64.xml --- a/pspec_x86_64.xml +++ b/pspec_x86_64.xml @@ -3,8 +3,8 @@ xorg-server https://xorg.freedesktop.org/wiki/ - Thomas Staudinger - Staudi.Kaos@gmail.com + Joey Riches + josephriches@gmail.com MIT xorg.server @@ -67,7 +67,7 @@ programming.devel - xorg-server + xorg-server /usr/include/xorg/BT.h @@ -248,12 +248,12 @@ - - 2023-04-08 + + 2023-07-18 1.20.14 Packaging update - Thomas Staudinger - Staudi.Kaos@gmail.com + Joey Riches + josephriches@gmail.com \ No newline at end of file