1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

gnu: xorg-server: Apply tearfree patch for modesetting driver.

Much of the modern Linux video stack depends on using kernel modesetting (KMS)
drivers.  Because of this, not much effort has been put into the legacy stuff,
which have grown less supported and more buggy.  Unfortunately, the
modesetting Xorg driver didn’t initially have support for tear-free
video (which most legacy drivers did), requiring additional software -- a
compositor -- to fix this.  Sadly, there’s no good option for a compositor --
they all require hardware-specific tweaking and tuning, and tend to be quite
buggy.

Support for a "TearFree" option merged in 2022[1], but there hasn’t been an
Xorg release since it was merged.

This PR applies the patch from that MR to the last release.  It required a
one-character edit to apply cleanly, necesitating inclusion in the Guix repo.

I tested this on bare metal and it appears to work well.

[1]: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1006

* gnu/local.mk (dist_patch_DATA): Add patch.
* gnu/packages/patches/xorg-server-tearfree-modesetting.patch: New file.
* gnu/packages/xorg.scm (xorg-server): Apply modesetting tearfree patch.

Change-Id: I60a705b35cb51bfd7de79aba406bc4b7b3934e48
This commit is contained in:
Ian Eure
2026-03-27 20:49:08 -07:00
parent 9902687907
commit dd080e7fda
3 changed files with 1414 additions and 5 deletions

View File

@@ -2606,6 +2606,7 @@ dist_patch_DATA = \
%D%/packages/patches/xiphos-glib.patch \
%D%/packages/patches/xlispstat-fix-compilation-with-modern-gcc.patch \
%D%/packages/patches/xmonad-dynamic-linking.patch \
%D%/packages/patches/xorg-server-tearfree-modesetting.patch \
%D%/packages/patches/xplanet-1.3.1-cxx11-eof.patch \
%D%/packages/patches/xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch \
%D%/packages/patches/xplanet-1.3.1-libimage_gif.c.patch \

File diff suppressed because it is too large Load Diff

View File

@@ -5216,19 +5216,22 @@ by the Xorg server.")
(base32
"06dm3bxb1xgzn994wfk8a1irajhms78k1f14c2p5nr1zbdafbjy0"))
(patches
(list
(cons
;; See:
;; https://lists.fedoraproject.org/archives/list/devel@lists.
;; fedoraproject.org/message/JU655YB7AM4OOEQ4MOMCRHJTYJ76VFOK/
(origin
(method url-fetch)
(uri (string-append
"http://pkgs.fedoraproject.org/cgit/rpms/xorg-x11-server.git"
"/plain/06_use-intel-only-on-pre-gen4.diff"))
"https://src.fedoraproject.org/rpms/xorg-x11-server/raw/"
"ee515e44b07e37689abf48cf2fffb41578f3bc1d/f/"
"06_use-intel-only-on-pre-gen4.diff"))
(sha256
(base32
"0mm70y058r8s9y9jiv7q2myv0ycnaw3iqzm7d274410s0ik38w7q"))
(file-name "xorg-server-use-intel-only-on-pre-gen4.diff"))))))
(file-name "xorg-server-use-intel-only-on-pre-gen4.diff"))
;; https://codeberg.org/guix/guix/issues/1006
(search-patches "xorg-server-tearfree-modesetting.patch")))))
(build-system gnu-build-system)
(propagated-inputs
;; The following libraries are required by xorg-server.pc.
@@ -5341,7 +5344,9 @@ draggable titlebars and borders.")
"/xserver/xorg-server-" version ".tar.xz"))
(sha256
(base32
"12g0g9ksswzx1kgn23gvrpa570fnpkdkmw1dfqjjg4422a884744")))))))
"12g0g9ksswzx1kgn23gvrpa570fnpkdkmw1dfqjjg4422a884744"))
;; Exclude the modesetting tearfree patch, it doesn't apply to 21.1.15.
(patches (list-head (origin-patches (package-source xorg-server)) 1)))))))
;;; XXX: Not really at home, but unless we break the inheritance between
;;; tigervnc-server and xorg-server, it must live here to avoid cyclic module