$ ulimit -r
0
$ /usr/bin/chrt -f 8 true
chrt: failed to set pid 0's policy: Operation not permitted
sudo -s
cat > /etc/security/limits.d/99-audio.conf << EOF
@audio - rtprio 20
@audio - memlock unlimited
#@audio - nice -19
EOF
ulimit -r is now 20, which is correct.chrt -f 8 true fails, so I looked in kernel config:grep -E 'CONFIG_(CGROUPS|CGROUP_SCHED|RT_GROUP_SCHED|PREEMPT_RT)=|# CONFIG_(CGROUPS|CGROUP_SCHED|RT_GROUP_SCHED|PREEMPT_RT) is not set' "/boot/config-$(uname -r)"
CONFIG_CGROUPS=y
CONFIG_CGROUP_SCHED=y
CONFIG_RT_GROUP_SCHED=y
QuoteCONFIG_RT_GROUP_SCHED=y. With that option, a task in any cgroup other than the root cgroup can only use realtime scheduling if that cgroup has cpu.rt_runtime_us > 0. systemd puts your login session in user.slice/user-1000.slice/session-N.scope, and those cgroups default to 0. The kernel then returns EPERM even though rtprio is 20 in limits.conf
scripts/config --disable RT_GROUP_SCHED
make olddefconfig
grep RT_GROUP_SCHED .config # should show "is not set"

Bus 004 Device 002: ID 08bb:2902 Texas Instruments PCM2902 Audio Codec
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 04b3:310c IBM Corp. Wheel Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 29571559e434..68a2d28226d2 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -593,8 +593,8 @@ ehci0: usb@1c1a000 {
<&ccu CLK_USB_OHCI0>;
resets = <&ccu RST_BUS_OHCI0>,
<&ccu RST_BUS_EHCI0>;
- phys = <&usbphy 0>;
- phy-names = "usb";
+ /* phys = <&usbphy 0>; */
+ /* phy-names = "usb"; */
status = "disabled";
};
@@ -605,8 +605,8 @@ ohci0: usb@1c1a400 {
clocks = <&ccu CLK_BUS_OHCI0>,
<&ccu CLK_USB_OHCI0>;
resets = <&ccu RST_BUS_OHCI0>;
- phys = <&usbphy 0>;
- phy-names = "usb";
+ /* phys = <&usbphy 0>; */
+ /* phy-names = "usb"; */
status = "disabled";
};