Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2823

Launch process with realtime scheduling without root in WSL2

$
0
0

Running Ubuntu 20.04 from within WSL2 I would like to be able to use realtime scheduling as a normal audio group member. Ultimately this is for JACK. Everything works as root but this is not ideal.

I have

$ cat /etc/security/limits.d/audio.conf# Provided by the jackd package.## Changes to this file will be preserved.## If you want to enable/disable realtime permissions, run##    dpkg-reconfigure -p high jackd@audio   -  rtprio     95@audio   -  memlock    unlimited#@audio   -  nice      -19

Using the configuration checker at https://github.com/raboof/realtimeconfigquickscan I see that I am unable to 'prioritise processes with chrt'. So to debug the problem I'm trying something simple...

With my normal user I try

$ chrt -f 80 echo successchrt: failed to set pid 0's policy: Operation not permitted

But as root I get

# chrt -f 80 echo successsuccess

I wondered if this was due to group RT scheduling. I have

$ cat /proc/sys/kernel/sched_rt_period_us1000000$ cat /proc/sys/kernel/sched_rt_runtime_us950000

which I think are the default values. The same settings work OK on a native install of Ubuntu 18.04 I have running on a different machine.

Nevertheless, I've seen a few places suggest doing

sysctl -w kernel.sched_rt_runtime_us=-1

to effectively turn it off. But this didn't work.

When I first started down this path I didn't really expect JACK to work in WSL2 but the fact that realtime scheduling works as root makes me hopeful this is a configuration/permissions issue rather than a limitation of WSL2. What should I try next?


Viewing all articles
Browse latest Browse all 2823

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>