Date: Wednesday, February 1, 2023 @ 05:44:23
  Author: ainola
Revision: 1391627

Add CAP_SYS_NICE to sway binary

Support for sway to set SCHED_RR was added to improve desktop
responsiveness/stuttering [1]. Upstream advises setting the capability on the
binary [2].

Fixes FS#77225

[1] https://github.com/swaywm/sway/pull/6994
[2] https://github.com/swaywm/sway/pull/6992#pullrequestreview-972760643

Modified:
  sway/trunk/PKGBUILD
  sway/trunk/sway.install

--------------+
 PKGBUILD     |    2 +-
 sway.install |   14 +++-----------
 2 files changed, 4 insertions(+), 12 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2023-02-01 05:43:09 UTC (rev 1391626)
+++ PKGBUILD    2023-02-01 05:44:23 UTC (rev 1391627)
@@ -5,7 +5,7 @@
 pkgname=sway
 pkgver=1.8
 epoch=1
-pkgrel=3
+pkgrel=4
 pkgdesc='Tiling Wayland compositor and replacement for the i3 window manager'
 arch=(x86_64)
 url='https://swaywm.org/'

Modified: sway.install
===================================================================
--- sway.install        2023-02-01 05:43:09 UTC (rev 1391626)
+++ sway.install        2023-02-01 05:44:23 UTC (rev 1391627)
@@ -14,18 +14,10 @@
 Either option should provide the same functionality/stability. Refer to the
 Sway wiki page for information.
 EOD
+
+    setcap cap_sys_nice+ep usr/bin/sway
 }
 
 post_upgrade() {
-cat << EOD
-Sway's necessary privileges can now be obtained through seatd as well as the
-incumbent polkit package. As such, polkit has been relegated to an optional
-dependency.
-
-Note that using seatd instead of polkit means that a user must be a part of the
-"seat" group: Otherwise, the user will not be able to achieve the appropriate
-privileged actions.
-
-For more information, refer to the Sway wiki page.
-EOD
+    setcap cap_sys_nice+ep usr/bin/sway
 }

Reply via email to