Bug 732906

Summary: rtkit fails to get realtime scheduling, causing audio drop-outs with pulseaudio
Product: [openSUSE] openSUSE 12.1 Reporter: Holger Arnold <holgerar>
Component: SoundAssignee: Scott Reeves <sreeves>
Status: VERIFIED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: crrodriguez, tiwai, zaitor
Version: Final   
Target Milestone: ---   
Hardware: x86   
OS: SUSE Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Holger Arnold 2011-11-27 11:01:44 UTC
User-Agent:       Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20100101 Firefox/8.0

When playing audio files, I get audio drop-outs or small delays every few seconds.  This becomes even more noticeable when there are other tasks running on the system that schedule activity in regular intervals (example: typing in a text editor that needs to do regular screen updates).

The problem is caused by rtkit-daemon failing to get realtime scheduling for pulseaudio; in /var/log/messages we find:

rtkit-daemon[1241]: Sucessfully called chroot.
rtkit-daemon[1241]: Sucessfully dropped privileges.
rtkit-daemon[1241]: Sucessfully limited resources.
rtkit-daemon[1241]: Running.
rtkit-daemon[1241]: Failed to make ourselves RT: Operation not permitted
rtkit-daemon[1241]: Watchdog thread running.
rtkit-daemon[1241]: Canary thread running.

This bug is also discussed at 
https://bugzilla.redhat.com/show_bug.cgi?id=655321 ;
it seems to be a problem related to systemd and the version of rtkit (0.5) that comes with openSUSE 12.1.

Reproducible: Always

Steps to Reproduce:
Check if your pulseaudio threads have realtime priority.
Actual Results:  
All pulseaudio threads have normal priority.

Expected Results:  
There should be a pulseaudio thread with RT priority.

The problem does not occur with the most recent version 0.10 of rtkit.  As this probably affects most desktop users, is there a chance for an update?  This could also solve other reported audio bugs; for example #671521, #677222, #551777.
Comment 1 Holger Arnold 2011-11-27 11:04:17 UTC
By the way, the rtkit version that comes with openSUSE 12.1 is nearly two years old.  Is this package unmaintained?
Comment 2 Takashi Iwai 2011-11-29 08:45:46 UTC
It's a bit strange that the rt-prio is needed.  Usually it works more or less stably even without rt-prio for simply playbacks with a large buffer.

Anyway, rtkit could be updated.  Scott, could you care?
Comment 3 Holger Arnold 2011-11-29 08:59:00 UTC
(In reply to comment #2)
> It's a bit strange that the rt-prio is needed.  Usually it works more or less
> stably even without rt-prio for simply playbacks with a large buffer.

Pulseaudio (and similar processes) are designed to be scheduled at regular intervals.  If it doesn't have a higher priority than other tasks, it *will* eventually get interrupted at the wrong time.
 
> Anyway, rtkit could be updated.  Scott, could you care?

This sounds good!
Comment 4 Cristian Rodríguez 2011-12-02 04:16:11 UTC
dup

*** This bug has been marked as a duplicate of bug 551777 ***