Phonon and unpleasant noises.

This didn’t happen on 12.3. Different sound sources blended in cleanly without any speaker thumps etc even if for instance I finished up with 2 youtube video’s playing at the same time or if one was just paused. Now all sorts of things cause noises such as I have described even a sound I use play to generate a sound when an email arrives. It plays a wav file ok but the noise at the start when it cuts in is rather unpleasant. Same happens when anything cuts in and sometimes just the noise for no apparent reason.

I use a soundblaster titanium xfi card optically couple to an M Audio 2.1 system. :slight_smile: They have to be optically coupled as wires cause a rather noticeable hum. A bit of a bargain price wise if they can be driven like that. Amazon reviews on them are a bit mixed but I feel that they aren’t far short of being really good.

Might be better to describe the noise as a grunt. An email just arrived. No other sound sources connected. If there was one from a web page it would be worse. Add updates sometimes cause them. The email arriving plays a peal of thunder that fades slowly away. It comes up grunt - good sound - finishes and then another grunt.

I have installed the pulse audio equaliser but don’t think that has made any difference.

Any ideas. It’s rather annoying.

John

For some light relief from some more tedious problems I had another look at this. :’( It looks to be worse.

KDE has a speaker set up facility. Play left and play right. If I go to that section from kde settings and click play left I get grunt good sound. If I then click play right only good sound. If I then click play left again only good sound. This can be repeated over and over with no grunts. If I leave it for a while the initial grunt comes back. If I exit that section and then go back to it the grunt comes back.

It looks like sound capability is dropped for various reason when it may not be needed. There is usually a noise when it is dropped as well. Both noises are pretty loud

It will pay 2 sound sources at the same time but the 2nd one causes a grunt when it comes in and also a noise when it finishes. Usually another grunt.

As I mentioned 12.3 didn’t have the same problem with exactly the same kit. That leaves me thinking it’s either a software problem or something to do with install. I do have 3 sound “cards”. Motherboard, video card and the titanium xfi. I fitted 2 different higher end cards on 12.3 and didn’t have any problems at all with either of them.

Then there is always the possibility something else being wrong could cause this sort of problem but what ?

I just tried installing and using phonon’s vlc back end. It seems this is preferred upstream but not used by some distro’s due to codec patents. It’s made no difference. :wink: There is no play left play right when that is in use.

John

Did you upgrade from 12.3??? if so you probably have some junk left over that may be outdated. I recommend a clean install to clean things up.

I did a clean install. I noticed the upgrade option but didn’t use it. I had backed up what I needed to anyway. The system disk was was formatted. The only problem was home not going to where the imported partitioning said it should. It went to / instead so even the stuff that was on the old /home and below isn’t being used. That home was on a raid array and has gone now so if install created any links something would probably crash now. I’d doubt if it would do that anyway.

Just add that my X setting for a graphics tablet went as well - good sign that there isn’t any old stuff left.

John

I found some old back to 11 opensuse info on testing.

First one that I use to signal emails arriving - play SoundBlast.WAV. That’s how they named it. I get a grunt at the start and another a little after it finishes.

One of the suggested tests


john@dhcppc1:~> speaker-test -Dplug:front -c2 -l5 -twav

speaker-test 1.1.2

Playback device is plug:front
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 256 to 32768
Period size range from 16 to 16384
Using max buffer size 32768
Periods = 4
was set period_size = 8192
was set buffer_size = 32768
 0 - Front Left
 1 - Front Right
Time per period = 2.391157
 0 - Front Left


No grunts. The volume is higher than I have set.

Another suggested test


john@dhcppc1:~> speaker-test -c2 -l5 -twav

speaker-test 1.1.2

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 96 to 1048576
Period size range from 32 to 349526
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
 0 - Front Left
 1 - Front Right
Time per period = 3.021042
 0 - Front Left
 1 - Front Right
Time per period = 3.024350
 0 - Front Left
 1 - Front Right
^CTime per period = 3.026943


Quieter than my volume setting and grunts in and shortly after it’s stopped.

Same with this one


ohn@dhcppc1:~> aplay -vv /usr/share/sounds/alsa/Front_*
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
ALSA <-> PulseAudio PCM I/O Plugin
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 1
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 24000
  period_size  : 6000
  period_time  : 125000
  tstamp_mode  : NONE
  tstamp_type  : GETTIMEOFDAY
  period_step  : 1
  avail_min    : 6000
  period_event : 0
  start_threshold  : 24000
  stop_threshold   : 24000
  silence_threshold: 0
  silence_size : 0
  boundary     : 6755399441055744000
#     +                                            | 11%Playing WAVE '/usr/share/sounds/alsa/Front_Left.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
ALSA <-> PulseAudio PCM I/O Plugin
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 1
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 24000
  period_size  : 6000
  period_time  : 125000
  tstamp_mode  : NONE                                                                                                                           
  tstamp_type  : GETTIMEOFDAY                                                                                                                   
  period_step  : 1                                                                                                                              
  avail_min    : 6000                                                                                                                           
  period_event : 0                                                                                                                              
  start_threshold  : 24000                                                                                                                      
  stop_threshold   : 24000                                                                                                                      
  silence_threshold: 0                                                                                                                          
  silence_size : 0                                                                                                                              
  boundary     : 6755399441055744000                                                                                                            
#                      +                           | 44%Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono                                                                                                                                
ALSA <-> PulseAudio PCM I/O Plugin
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 1
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 24000
  period_size  : 6000
  period_time  : 125000
  tstamp_mode  : NONE
  tstamp_type  : GETTIMEOFDAY
  period_step  : 1
  avail_min    : 6000
  period_event : 0
  start_threshold  : 24000
  stop_threshold   : 24000
  silence_threshold: 0
  silence_size : 0
  boundary     : 6755399441055744000
#+                                                 | 00%


Might be a clue as the card only has a front. No centre, back etc. The no grunt test mentions front. I can vaguely remember KDE suggesting I had surround sound when I hadn’t. Maybe earlier than 12.3, can’t be sure. But what to do to find out if this is the problem?

John

Back in the old days (when pulse audio first started) people would add tsched=0 to the load-module module-udev-detect line in /etc/pulse/default.pa so it reads:

load-module module-udev-detect tsched=0

But I suspect that is not for recent pulse audio - although I guess you could try, reboot, test, and if it does not work remove it.

Basically - with today’s pulse audio you should not be hearing such behaviour.

I agree but an interesting file. I wonder about autoconfig but more on that later.

I suspect I have found out what the problem is.

Anything using alsa directly is fine - if people do that though knock the speaker volume way back at the speakers. The desktop volume is bypassed. I then used yast sound. It also produces perfect sound via the play test sound. The master volume works as expected so does the digital one. The iec958 one has no effect what so ever. KDE doesn’t offer digital only iec958. Maybe the 2 types behave differently.

The configuration may be strange going on other sample outputs.


john@dhcppc1:~> cat /proc/asound/devices
  2:  0]   : control
  3:  0- 0]: digital audio playback
  4:  0- 0]: digital audio capture
  5:  0- 1]: digital audio playback
  6:  0- 2]: digital audio playback
  7:  0- 3]: digital audio playback
  8:  0- 4]: digital audio playback
  9:  1]   : control
 10:  1- 0]: digital audio playback
 11:  1- 0]: digital audio capture
 12:  1- 2]: digital audio capture
 13:  1- 0]: hardware dependent
 14:  2]   : control
 15:  2- 3]: digital audio playback
 16:  2- 7]: digital audio playback
 17:  2- 0]: hardware dependent
 33:        : timer


Alsa complains if anything other than the 0-x’s are used. 0-0 plays ok and 0-4 does but can’t get the correct sample rate so sounds awful. The card has an optical output, line, mic and analogue stereo out. The other 0.x don’t generate any sound but there aren’t any error messages. I suspect it doesn’t have optical capture but not sure.

John

Just in case the following is helpful…
https://bbs.archlinux.org/viewtopic.php?id=164959
In particular posts #2 and #4 (user Kn3cHt)

YaST plays sound with administrator (root) permissions. Try adding your regular user to group audio, reboot and test. If that makes no difference then remove the group audio from your regular user.

If you need guidance to explain how to do this let us know.
.

I suspect this may be the cause of the problem

This doesn’t show it. Just clean sound comes out

speaker-test -Dplug:front -c2 -l5 -twav

These 2 have the grunts with clean sound in between

speaker-test -c2 -l5 -twav
aplay -vv /usr/share/sounds/alsa/Front

Those are quieter than the other one as well. I have had something similar a long time ago with other cards - the set up thought it’s surround sound and wasn’t.

On the other hand YAST’s sound test is fine which suggests that were ever it gets in is fine but shows 2 aux volume control. One digital which works and one for iec918 which doesn’t do anything. KDE is only offering me the iec918 option.

I’ve no idea how to make changes to alsa settings. Alsa mixer as it comes up shows one volume control using the default card. If I select the xfi it shows all sorts. If alsa used it’s config file I might be able to sort out what is going on but it leaves settings to udev and masses of directories and the don’t provide an useful info really. I traced things back following a linux journal tutorial. Not much help really


Sound Problem ############################################################

# PCI lspci -tv
 +-1c.6-[07]----00.0  Creative Labs EMU20k2 [X-Fi Titanium Series]
 
 # cat /proc/asound/cards
 0 [XFi            ]: SB-XFi - Creative X-Fi
                      Creative X-Fi 20K2 SB1270


# modinfo snd_ctxfi
filename:       /lib/modules/4.4.49-16-default/kernel/sound/pci/ctxfi/snd-ctxfi.ko
license:        GPL v2
description:    X-Fi driver version 1.03
author:         Creative Technology Ltd
srcversion:     86E102FDE08C1472FF6C37C
alias:          pci:v00001102d0000000Bsv*sd*bc*sc*i*
alias:          pci:v00001102d00000005sv*sd*bc*sc*i*
depends:        snd-pcm,snd
intree:         Y
vermagic:       4.4.49-16-default SMP mod_unload modversions 
signer:         openSUSE Secure Boot Signkey
sig_key:        03:32:FA:9C:BF:0D:88:BF:21:92:4B:0D:E8:2A:09:A5:4D:5D:EF:C8
sig_hashalgo:   sha256
parm:           use_system_timer:Force to use system-timer (bool)
parm:           reference_rate:Reference rate (default=48000) (uint)
parm:           multiple:Rate multiplier (default=2) (uint)
parm:           index:Index value for Creative X-Fi driver (array of int)
parm:           id:ID string for Creative X-Fi driver (array of charp)
parm:           enable:Enable Creative X-Fi driver (array of bool)
parm:           subsystem:Override subsystem ID for Creative X-Fi driver (array of int)

# lsmod | grep snd
snd_hda_codec_hdmi     57344  1 
snd_hda_codec_realtek    94208  1 
snd_hda_codec_generic    81920  1 snd_hda_codec_realtek
snd_hda_intel          40960  2 
snd_hda_codec         147456  4 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel
snd_hda_core           73728  5 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
snd_ctxfi             118784  2 
snd_hwdep              16384  1 snd_hda_codec
snd_pcm               135168  5 snd_ctxfi,snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_core
snd_timer              36864  1 snd_pcm
snd                    90112  17 snd_hda_codec_realtek,snd_ctxfi,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
soundcore              16384  1 snd
 

This mentioned a utility called alsaconf. It is on my system but I can’t run it even as root. I’ve bug reported the problem but haven’t heard anything back as yet. I should have mentioned that I am using an optical connection. I can try analogue and will but there will be a very audible hum. A problem with these particular maudio speakers.

I will try tsched but it seems to relate to poor timing. There is nothing at all wrong with the audio that comes out, just a problem when it starts and some time after it stops. Those noises aren’t corrupted audio. The conf file mentions something that looks to provide the drop out after a delay. The Xfi range are what the name suggests, very low distortion and noise etc. One of the reasons I bought it was for spectral analysis. It was pretty good at that on 12.3. I has a very high dynamic range and a decently high sample rate and I think a large buffer. This is it

http://en.europe.creative.com/p/sound-blaster/sound-blaster-x-fi-titanium-hd

The optical output is a dual purpose socket.

The latency aspect the arch link mentioned might have some effect but I have a strong suspicion that a digital feed needs to be different to a iec958 one or config is messed up some how.

John

I’m heading off to another continent in less than 48-hours so I won’t be replying to this thread while in transit and then while waiting to get internet access again.

Post when you finally try my suggestions (tsched … and also adding user to group audio) as it appears you have not deemed them worthy to try. I’ll try and provide input after I learn the result of those.

Good luck.

It’s just that I like to have a poke around to see what’s going on. :’( Within reason. I’m currently using the sound card in Knoppix running from a usb stick. It’s fine on that but no luck on discovering it’s alsa settings. It’s conf directory is empty. It appears to be using a mix of alsa and gnome items. My wife needs me now so need to exit this and then I’ll try the tsched etc. Maybe try and find Knoppix methods again later. Knppix needed alsa tools loading to get the sound to work and maybe a self configure utility that announces that a sequence has been started via sound. KDE could make sounds from within itself but has the problem and had selected the wrong card setting. Also only offered iec958. I was using Knoppix’s lxde desktop. It can boot to kde. The alsa mixer shown on lxde shows digital and iec958 separately. The iec958 doesn’t do anything, just like yast.

:shame:I must have miss posted this last night.

John

I’ve tried with and without tsched=0 and noted when what I have called grunts occur.

Power on - to be expected I suppose.
When leap boots, does it twice, maybe a 3rd time when tsched=0. I don’t think I missed one without it.
On login 2, the last one is sound dropping out.
When a youtube page is loaded + drop out noise when closed.
Sound blends ok from 2 sources - something has changed on that aspect with or without tsched.
KDE settings test left and right channels behaviour.

Other than one extra grunt with tsched=0 no difference at all. I was a member of the audio group. I don’t recollect adding myself to that so maybe a default. I did add lp, www.

While playing with phonon settings I lost all of the sound cards. They were all greyed out and 2 dummies appeared. Had to reboot to get any sound back. All I had done was try a different output setting and it seems to have messed it up. I didn’t apply it though. Maybe this explains why 2 sound sources blend without any extra noises now. They did occur when the 2nd sound came in and finished. I hadn’t tried that for some time however.

For some reason alsaconf now runs in user mode. It can’t detect any sound cards though so just exits.

John

Recollecting a comment on arch - sound running system wide has security problems so set up on a user basis and make changes to ~/ect/ I just added tsched to the file in ~config/etc. It broke kde settings multimedia and caused something more like a machine gun sound when the desktop came up.

Also no sound. Changed the file again and rebooted and things back to normal :wink: but 3 grunts when the desktop came up, probably due to my email checking mail. I lost count of the grunts when tsched was included.

The kde multimedia front left front right is the quickest way of checking for the noises and shows that once sound is up and running all is ok. It’s not once it’s dropped out and can do for different reasons, closing that window for instance. However it doesn’t anticipate that sound may be needed so only grunts when a button is pressed and the drop out grunts are there too.

Having run alsa mixer I now have it on the desktop as well. It can show digital and iec958 aux volumes. also master. Master, iec958 and front don’t do anything. Neither does digital unless low enough to mute and it does.

:|I’m trying not to think that the alsa mixer could have the same eye candy gloss as phonon. I managed to do that when kde3 hit the bin. It’s getting harder again.

John

Noticing mention of an audio test script in another thread this is a link to output from mine.

http://www.alsa-project.org/db/?f=8f00b2c3f183dbb6347a7fd30feed5526e32d320

The hdmi video card and intel on board sound controllers are turned off via phonon. Also tried removing them via yast but auto config’s them later which I assume puts them back to how the install had them.

I still have my 12.5 ~/home/ sound configuration files but they are nothing like leap’s.

John

I suppose you could try changing the “auto-mute mode” to ‘speaker only’ instead of “line-out speaker” but I do not believe that the issue. Its only a speculative suggestion and me not understanding why you have chose “Line-out speaker” for that setting ?


Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Speaker Only' 'Line Out Speaker'
  Item0: 'Line Out Speaker' 

I don’t have any further configuration recommendations.

One thing you could check is hardware. I recall (years) back where if one’s PC’s electrical grounding was poor one could encounter this.

Does your PC have a proper 3-pronged plug with proper grounding where you plug it in ? Honestly I do not believe that the cause but its worth checking. In the old days if it was a 2-pronged plug sometimes one needed to reverse the plug 180-deg.

I have no further suggestions (hardware nor configuration) after that.

I’m heading off to another continent in a few hours and it could be days before I have internet access again. Good luck.

:’(Looks like I need luck.

I haven’t configured it like that. It’s just happened. I’ve no idea how to change it. Alsa seems to be chopped off by phonon at some level. Eg the alsa mixer. No volume control does anything including the iec958 one. The digital channel one does but only mutes when the volume is set to zero. Otherwise it doesn’t have any effect at all. Utilities such as alsaconfig can’t do anything. It just exits as it can’t find any cards.

I can try an extension lead into another socket on a different ring main but 12.3 was running on the same socket without any problem as was Knoppix. Also the sound test from YAST is fine. The only odd thing there is that it shows 2 aux volume controls - ice985 which does nothing and digital which works as expected. My feeling is that phonon should be offering me a digital option and isn’t, just iec985. That’s clutching at straws really. However when that volume control is present all is ok. I can’t remember the actual phonon settings from 12.3. It was sorted out when I installed and the titanium fitted not long after.

I’m wondering if there is some way of bypassing phonon completely. Maybe just leaving alsa controls - I can live without the eye candy.

I’m reluctant to buy another card as it may have the same problem. The other aspect is that bought directly from Creative the card is very well priced compared with others of a similar spec. In some respects it’s better than some of the famous ones which usually have midi facilities which I don’t need.

John

Noticing mention of a pulse volume control in another thread I just installed that. I thought I had found a fix but the problem went away because audio is never dropped while it’s active - unlike kde’s phonon set up.

I’ve found an unhappy fix. Commenting out the drop on idle module load in my user default.pa in .config/etc/pulse. I also rechecked adding tsched=0 there as well - lots of noises. Adding this to the /etc/pulse one doesn’t do anything so the user version must be being obeyed.

There is a note in the file in this area about loading module-console-kit.so if autoexit is set. Something wrong in that area might cause problems but a system wide search for autoexit didn’t find any signs of it other than in the comment. The file is present on my system but lsmod doesn’t show it. Might not be a kernel load either I suppose.

The increase in cpu load via ksysguard with sound up all of the time is next to undetectable - no signs of one at all really. Now I just get a speaker thump when I log in to the desktop.

In terms of changing the item oldcpu mentioned maybe but I can’t find any mechanism for changing it. I’d echo oldcpu’s comments about linux’s sound but on a slightly different manner. I have done a number of system searches looking for various words in files that can take over an hour each. There are bits and pieces all over the place and in some case it’s not entirely clear that they are actually active. I’ve never found sorting the controls out too much of a problem but anything deeper is a nightmare. As there hasn’t been much help - thanks to those that did, many must be in the same situation.

:)I can speed up searches a bit now by using the index - that will allow me to exclude problem directories using kfind so one good thing came of the experience.

John

I think you mentioned if run via root the is no problem???

try another user.

If that works clear out all pulse files from your ~./.cache

May be bad cache file

Not all players use phonon only ones tied close to KDE so I don’t really think that is where the problem is

Not really. I’m 100% sure that the noises are due to the pulse idle timer. Being in root has nothing to do with it. The difference there is that pulse doesn’t time out in yast. I’m not root when I use kde -settings - multimedia. There is a speaker set up utility in it to check if the left and right speakers are connected correctly. If I go into that and click play left I get grunt followed by good sound, If I then click play right, only good sound, click play left again and only good sound. I can go back and forth as often as I like and no more grunts. If I stop for a while eventually there will be another usually more subdued grunt due to the idle timer running out. Click play right or left then and grunt followed by good sound and can go back and forth or repeat either one of them and no more grunts. Wait for it to time out and the grunt is back again. It’s nothing to do with caches just something due to dropping pulse when the idle timer runs out.

Some one on the kde mailing list suggested muting the analogue output as I only use the optical one. No way to do that with phonon but it can be done with pavucontrol. I tried it as it will retain muted analogue with the optical output working. That prevented kde from playing anything. One interesting aspect of using that is that each time a major setting is changed there grunts come out of the speakers - probably because it disables itself before making the change and then comes up again.

I’ve bug reported it. Sometimes that results in an email with some suggestions but none so far. I’ve also appended the fix I’ve used to get rid of it. All I have to now is put up with varying degrees of a grunt when I log into my desktop. :slight_smile: I need to check this at some point but my impression is that when I log in the size of the grunt depends on how many tabs I have in a browser that I left up when I logged out. The most irritating aspect was opening or refreshing many web pages causing grunts even when there doesn’t seem to be any sound sources on them.

I did wonder about the differing aux volume controls in say yast but suspect that’s a red herring. The KDE volume control works. If it wasn’t hooked up correctly it wouldn’t work.

The other thing I have noticed is that there isn’t much point in playing with alsa utilities. They generally don’t do anything any more.

:OI’ve also noticed that another sound test button in kde phonon settings comes and goes when settings are changed. When there that one grunts too if pulse has timed out.

John