From 13aac3dad47dd8bde1ece36b78c24db292d262e3 Mon Sep 17 00:00:00 2001 From: Brett Cornwall Date: Wed, 1 Feb 2023 05:44:23 +0000 Subject: [PATCH] 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 --- PKGBUILD | 2 +- sway.install | 14 +++----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 2c3bb9a..0e8a8ce 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -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/' diff --git a/sway.install b/sway.install index ef4fe01..1eff5bc 100644 --- a/sway.install +++ b/sway.install @@ -14,18 +14,10 @@ of the two available options (In alphabetical, not recommended, order): 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 }