Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#77225 - Set CAP_SYS_NICE on sway binary

Attached to Project: Community Packages
Opened by Dom DiMaggio (Damino) - Sunday, 22 January 2023, 01:45 GMT
Last edited by Brett Cornwall (ainola) - Saturday, 04 February 2023, 00:00 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Jerome Leclanche (Adys)
Brett Cornwall (ainola)
Maxim Baz (maximbaz)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: /usr/bin/sway needs cap_sys_nice=eip set to avoid avoid stuttering in certain scenarios.

Additional info:
* package version(s)
1:1.8-3

* link to upstream bug report, if any
Support added here: https://github.com/swaywm/sway/pull/6994

Expectation from developer for package maintainers to set stated here: https://github.com/swaywm/sway/pull/6992#pullrequestreview-972760643

Steps to reproduce:
GPU-limited gaming (Final Fantasy XIV via Wine) on one monitor while having moving content open on a secondary monitor (e.g. video playing on Firefox). My game frequently stuttered until I ran `# setcap 'cap_sys_nice=eip' /usr/bin/sway`.

The same could not be observed with the same scenario using GNOME or Plasma Wayland sessions. A quick look into both determined they request SCHED_RR differently from Sway and therefore don't require this.
This task depends upon

Closed by  Brett Cornwall (ainola)
Saturday, 04 February 2023, 00:00 GMT
Reason for closing:  Implemented
Additional comments about closing:  sway-1:1.8-5
Comment by Toolybird (Toolybird) - Sunday, 22 January 2023, 21:53 GMT
If this is something packagers should be doing, they should document it properly, instead of it being buried away in some comment or changelog...
Comment by Brett Cornwall (ainola) - Sunday, 29 January 2023, 07:12 GMT
@maximbaz, this seems reasonable to me. Any thoughts?
Comment by Maxim Baz (maximbaz) - Monday, 30 January 2023, 20:23 GMT
Sounds good to me, please go ahead if you have time to do it :)
Comment by Brett Cornwall (ainola) - Wednesday, 01 February 2023, 05:48 GMT
Damino, I've pushed sway-1:1.8-4 to [community-testing]. I'll do some testing when I have some time but I'd love your feedback as well!
Comment by q rty (q234rty) - Wednesday, 01 February 2023, 09:39 GMT
This needs https://github.com/swaywm/sway/commit/2f2cdd60def006f6d3cbe318f9edd7d68fcb239a otherwise this will break user xkb configs.
Comment by Dom DiMaggio (Damino) - Wednesday, 01 February 2023, 12:31 GMT
sway-1:1.8-4 is working for my use case now, thank you! Unsure about q234rty's comment, as it's a feature I don't use.
Comment by Brett Cornwall (ainola) - Thursday, 02 February 2023, 06:25 GMT
Thanks for letting me know about the xkb configs, q234rty! I've pushed sway-1:1.8-5 to [community-testing]. Can you test/verify that this works for you?
Comment by Dom DiMaggio (Damino) - Thursday, 02 February 2023, 12:27 GMT
Just writing to confirm my issue is still resolved with sway-1:1.8-5.
Comment by i0f (I0F) - Friday, 03 February 2023, 09:22 GMT
Right now the community-testing PKGBUILD uses 'setcap cap_sys_nice+ep usr/bin/sway', while in the inital bug report 'eip' is used instead of 'ep'. Is one better than the other?
Comment by q rty (q234rty) - Friday, 03 February 2023, 12:43 GMT
I can confirm that sway-1:1.8-5 works with user xkb configs while sway-1:1.8-4 doesn't.
Comment by Brett Cornwall (ainola) - Friday, 03 February 2023, 17:14 GMT
i0f: Good question! The inheritable set needn't be specified as sway is the binary requiring the capability, not any other spawned processes/children.

Loading...