5.4.0-24.28 does not seem to apply rtprio, whereas -21 does.

Bug #1873315 reported by Daniel Holbach
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Impact:

Software that requires RT priority is not working anymore since we turned on RT_GROUP_SCHED:

commit 9b039fc517876d312e7fa0955571101a299c91f5
Author: Seth Forshee <email address hidden>
Date: Mon Apr 6 07:11:44 2020 -0500

UBUNTU: [Config] CONFIG_RT_GROUP_SCHED=y

This is wanted by docker, and the original reason for disabling
it no longer applied. Performance testing shows no noticible
impact when the option is enabled.

We already hit this issue in the past (see https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1284731), but nowadays reverting RT_GROUP_SCHED back to off would regress Docker and since RT privileges are usually required by audio/multimedia software, it probably make sense to revert this change only for -lowlatency (and keep the rest as is) and encourage people to use -lowlatency if they hit this problem.

Fix:

Apply the attached patch

Regression potential:

None, only -lowlatency is impacted, -generic doesn't change.

--

I'm using the xwax package on a Dell XPS 13 (9370) 20.04, which requires rtprio privileges:

[daniel@reef ~ ]$ sudo cat /etc/security/limits.d/audio.conf
@audio - rtprio 99
[daniel@reef ~ ]$

This worked fine for the past releases of Ubuntu up until the move from linux-image-5.4.0-21-generic to linux-image-5.4.0-24-generic.

Today I'm seeing:

Launching realtime thread to handle devices...
sched_setscheduler: Operation not permitted
Failed to get realtime priorities

Booting the previous kernel makes it work.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: linux-image-5.4.0-24-generic 5.4.0-24.28
ProcVersionSignature: Ubuntu 5.4.0-24.28-generic 5.4.30
Uname: Linux 5.4.0-24-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: daniel 2905 F.... pulseaudio
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Thu Apr 16 18:57:21 2020
InstallationDate: Installed on 2018-04-14 (733 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Alpha amd64 (20180409)
Lsusb:
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 003: ID 0489:e0a2 Foxconn / Hon Hai
 Bus 001 Device 002: ID 0bda:58f4 Realtek Semiconductor Corp. Integrated_Webcam_HD
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: Dell Inc. XPS 13 9370
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.4.0-24-generic root=UUID=0af0a12d-3b1e-4708-89c4-73f666ddc618 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-5.4.0-24-generic N/A
 linux-backports-modules-5.4.0-24-generic N/A
 linux-firmware 1.187
SourcePackage: linux
UpgradeStatus: Upgraded to focal on 2020-03-08 (39 days ago)
dmi.bios.date: 02/21/2018
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 1.2.1
dmi.board.name: 0F6P3V
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 9
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr1.2.1:bd02/21/2018:svnDellInc.:pnXPS139370:pvr:rvnDellInc.:rn0F6P3V:rvrA00:cvnDellInc.:ct9:cvr:
dmi.product.family: XPS
dmi.product.name: XPS 13 9370
dmi.product.sku: 07E6
dmi.sys.vendor: Dell Inc.

Revision history for this message
Daniel Holbach (dholbach) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Paolo Pisati (p-pisati) wrote :

I've posted some test kernel with the RT_GROUP_SCHED option turned off here:

https://people.canonical.com/~ppisati/lp1873315/

can you test it?

Revision history for this message
Daniel Holbach (dholbach) wrote :

As xwax requires you to have relevant hardware, here's a workaround to try if "rtprio" works for you:

1) sudo apt install jackd1
2) add "@audio - rtprio 99" to /etc/security/limits somewhere
3) make sure you're in the audio group
4) new login/shell
5) run "jackd -d alsa"

Revision history for this message
Daniel Holbach (dholbach) wrote :

It works! Happy times! πŸŽΆπŸ•Ί

Revision history for this message
Daniel Holbach (dholbach) wrote :

Suggested solution (discussed in #ubuntu-kernel on 2020-04-17): revert RT_GROUP_SCHED config change in the lowlatency kernel?

Revision history for this message
Paolo Pisati (p-pisati) wrote :
description: updated
description: updated
description: updated
Paolo Pisati (p-pisati)
description: updated
tags: added: patch
Andrea Righi (arighi)
Changed in linux (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 5.4.0-26.30

---------------
linux (5.4.0-26.30) focal; urgency=medium

  * focal/linux: 5.4.0-26.30 -proposed tracker (LP: #1873882)

  * Packaging resync (LP: #1786013)
    - update dkms package versions

  * swap storms kills interactive use (LP: #1861359)
    - SAUCE: drm/i915: prevent direct writeback from the shrinker

  * 5.4.0-24.28 does not seem to apply rtprio, whereas -21 does. (LP: #1873315)
    - [Config] lowlatency: turn off RT_GROUP_SCHED

  * [RTL810xE] No ethernet connection (LP: #1871182)
    - net: phy: realtek: fix handling of RTL8105e-integrated PHY

 -- Andrea Righi <email address hidden> Mon, 20 Apr 2020 18:33:49 +0200

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
xalt7x (xalt7x) wrote :

Actually this problem could be worked out without disabling of CONFIG_RT_GROUP_SCHED
Jack has separate page for that with simple instructions
https://github.com/jackaudio/jackaudio.github.com/wiki/Cgroups
I guess jack2 maintainers could include those config file(s) into package so user may not even notice this change.

Revision history for this message
Sebastien Bacher (seb128) wrote :

it' also creating issues on the desktop for jackd and pulseaudio/rtkit, see bug #1875665, could the change be reverted in the standard kernel configuration?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.