Phonon and unpleasant noises.

Interesting. Clearly, only some hardware systems seem to be impacted (audibly at least). I happened to stumble across this blog which may (or may not) be relevant: fixing-poppingclicking-audio-on-raspberry-pi/

The author apparently tried disabling the ‘module-suspend-on-idle’ PA module, but then found no sound output due to the reasons described…

The problem turned out to be because the audio files I was playing were mono with a sampling rate of 16,000 Hz or 48,000 Hz, and the default audio input format for the ALSA driver was stereo (with a 48,000 Hz sampling rate). When the audio was being played, PulseAudio had to change the input format to match, even if the only change was stereo to mono. This format change involves resetting the driver and so causes a pop as it is deactivated and re-activated even if module-suspend-on-idle has not suspended the driver. Once audio playback is finished, the original audio format is restored, leading to a pop then too.

What is worse is that if module-suspend-on-idle is disabled there’s no audio output. When PulseAudio switches the format, the driver is suspended but never resumes. There are some comments in the PulseAudio source which suggest that module-suspend-on-idle is assumed to be available and is responsible for resuming drivers on a format change. Therefore the work-around for the popping, of disabling module-suspend-on-idle, isn’t suitable when the audio input format is not stereo at 48,000 Hz.

Rather than disabling module-suspend-on-idle, the work-around I arrived on was to set a very long idle timeout. This is done by appending timeout=604800 to the line starting with load-module module-suspend-on-idle in /etc/pulse/ Now, when there was a format change, the driver is still resumed but the driver will not be suspended until a week (604,800 seconds) after the last audio has been played.

Anyway, I’ll let you read the article and see if that matches your experience (albeit different hardware).

I haven’t quoted deano but not many posts so this should be clear.

I haven’t had any loss of sound when I commented out the line

### Honour intended role device property
load-module module-intended-roles

### Automatically suspend sinks/sources that become idle for too long
##  load-module module-suspend-on-idle                                Don't allow  it to drop out ###################

### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
load-module module-console-kit
load-module module-systemd-login

I thought the last part of that I included was interesting. Might explain it but I do have the module about and wouldn’t have thought it would be set up like that. Also why have both this and an idle timer.

I was confused for a while because I was making changed to /etc/pulse/ not home/config… user settings do over ride.

I’ll try and summarise briefly.

I’m pretty sure alsa doesn’t do anything any more on leap 42.2. For instance if I use it’s mixer the volume controls can’t change it. All it can do if bought down to zero is mute sound - it’s probably telling pulse to mute it so over rides phonon.

I wouldn’t describe the noise as a pop and the 2nd noise after something has played is sometime after the sound has ended. I’ve not timed it but it’s many many seconds. Sit and wait when testing, go put the kettle on etc.

The music sources I have tested have been left-right in phonon, test in phonon, test in yast, youtube and my soundblaster wav file that I use to signal that an email has arrived. The soundblaster file must be at least 15 years old, it came with a card I bought then that’s long since gone. I’d assume that the sounds built into kde are what ever sample rate they think it needs to be and it wouldn’t be a good idea to release something that couldn’t cope with youtube sound. My impression anyway is that the card provides the sample rate. This is from the spec. It’s sure to be able to play anything it can record.

Professional Digital
Audio Processing

24-bit Analog-to-Digital conversion of analog inputs at up to 96 kHz sample rate 24-bit Digital-to-Analog conversion of digital sources at up to 96 kHz to analog 7.1 speaker output 24-bit Digital-to-Analog conversion of stereo digital sources at up to 192 kHz to stereo output 16-bit to 24-bit recording sampling rates: 8, 11.025, 16, 22.05, 32, 44.1, 48 and 96 kHz ASIO 2.0 support at 16-bit/44.1kHz, 16-bit/48kHz, 24-bit/44.1kHz, 24-bit/48kHz and 24-bit/96kHz Supports Sony/Philips Digital Interface (S/PDIF) format of up to 24-bit/96 kHz quality S/PDIF output at selectable sampling rate of 44.1, 48 or 96 kHz S/PDIF output not available during playback of protected digital audio content authored with DRM (Digital Rights Management) technology ASIO 2.0 with direct monitoring Accelerated ASIO for ultra low latency Enhanced SoundFont support of up to 24-bit resolution

I have wondered if s/pdif needs different handling to iec958. If so it wont be the only card about that needs it.

The web page aspect is interesting. When I followed oldcpu’s idea and logged in the sound was more like a machine gun suggesting it was testing to see if sound would be needed on any of the tabs in a browser window I had left open. I’m pretty sure that the same thing is still happening after the change - longer grunt. If I log in to a blank desktop I’ll probably just get the usual grunt.

I was also getting grunts for no apparent reason. This seemed to be down to sound coming up due to some web pages content and later timing out when I viewed another tab. The unixmen site seemed to be causing that. No apparent sound though. I suspect some of their pages may include a sound that isn’t supported or the browser is blocking.

;)A one week idle time out isn’t all that different to what I have done. If it’s a ras pi chances are that it’s running a special version of ubuntu. It’s also odd that sound went once the idle timer wasn’t loaded. It does seem to be a configuration option.


One thing to add for if some one is searching for sound problems is that this card can take surround sound via the optical link. I wouldn’t expect phonon to detect all of it’s possibilities but pavucontrol does allow some of those standards to be set up. No idea if it works though as I have nothing to test it with.

Another niggling thought. Situations where 2 aux volumes are offered - YAST and when I booted up Knoppix. One for iec985 and another for digital. In both cases the iec one didn’t do anything. The digital one did. This might indicate that there are 2 standards that can use an optical link and that phonon is linking into the correct one but not handling it properly. There are other standards in this area such as one that doesn’t interfere with digital rights protected sound. This also happens in with alsa mixer. It can’t control volume but setting it to zero does mute it - the digital control. The iec one doesn’t do anything. Master neither.

:’(Right old mess. :slight_smile:


:OI just created another kde user to install xfce into. Hasn’t worked out as I want it to but it’s interesting that the sound set up is different to an install from scratch. This time no grunt at the start of a sound playing but there is a weaker sound when the idle timer runs out. No in the user config directory, just a number of sink and source files. It did have grunts when I logged in.