Am Sonntag, 2. April 2006 15:23 schrieb Mike Hearn:
On Sun, 02 Apr 2006 03:49:39 +0200, Willie Sippel wrote:
Just tested Mike's patch with realtime-lsm. Running Wine as regular user now gives perfect audio with no stutter for every application I tried so far. So yes, realtime-lsm actually does the trick - me happy! ;)
Wonderful!
I load realtime-lsm with "gid=18 mlock=1 allcaps=1" (gid 18 is audio), and set wineserver to root:audio. Easy solution, great results!
I'm not sure it counts as easy. At least Fedora and SUSE already have an LSM module loaded, for SELinux and AppArmor respectively. Some solution based on making wineserver suid root might work but I didn't get anywhere when I played with that.
I might be wrong, but isn't a suid root winewrapper much more dangerous compared to the realtime-lsm solution? All realtime-lsm does is allowing mlock and realtime privileges for a given user or group, while a suid root wineserver would also have access to root-only files and device nodes, no?
Also, it seems realtime-lsm is part of the mm kernel, which means there's a chance it will end up in mainline in the near future, while SCHED_ISO will probably take longer or wont be included at all.
Anyway, a solution that tries to always use the best possible way seems to be the best option (try SCHED_FIFO, fallback to SCHED_ISO, fallback to default)...