This forum has been archived. All content is frozen. Please use KDE Discuss instead.

sound problems while using ktorrent

Tags: None
(comma "," separated)
jmleger
Registered Member
Posts
2
Karma
0

sound problems while using ktorrent

Sun Jul 13, 2008 2:41 pm
Hi,

Is it possible to shut down any sound usage in ktorrent ? I love this program but I certainly don't want it to use sound.

I'm using ktorrent 2.2.5 over kde 3.5.9 (kubuntu). I've noticed that sometimes ktorrent is blocking my system sound support (error reported by kaffeine : snd_pcm_open failed (16) resource or device busy). Digging a little :

Code: Select all
root:/usr/bin# lsof |grep snd
kmix       6462   calimero   10u      CHR      116,0               12296 /dev/snd/controlC0
ktorrent  30907   calimero   70r      CHR     116,33               12141 /dev/snd/timer
ktorrent  30907   calimero   71u      CHR     116,16               12265 /dev/snd/pcmC0D0p


So, for kaffeine to work as expected, I had to shut down ktorrent.

Of course, finding and fixing the bug in there would be a good idea. But anyway, I'd prefer ktorrent not to use sound at all, because I just don't need or want it to.
George
Moderator
Posts
5421
Karma
1

Sun Jul 13, 2008 4:21 pm
We don't open anything sound related, so the only way this can happen if some KDE library does this.

Anyway, seeing that I only get a line about kmix when doing lsof | grep snd, it probably has something to do with your sound settings in KDE.
jmleger
Registered Member
Posts
2
Karma
0

Mon Jul 21, 2008 9:17 pm
One week later, I think the problem is solved : my guess is ktorrent doesn't use sound explicitely but it may appear to do so through some KDE events. I often happen to click on torrent links on websites and that causes a ktorrent target folder selector modal window to appear.

Somehow, with your help, I managed to get rid of the problem (so far) by erasing some sound-to-event relationships in the KDE settings.

Thank you for your answer, and for kindly providing and constantly improving such a useful piece of software. Myself and other people out there are very grateful for that :D
LiFo2
Registered Member
Posts
1
Karma
0

Same problem here ...

Sun Aug 10, 2008 4:09 pm
Hello,

I got the same problem recently. I think this came after a download finished:

Code: Select all
[colin in ~]$ fuser -v /dev/snd/*
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  colin      2874 F.... kmix
/dev/snd/controlC1:  colin      2874 F.... kmix
/dev/snd/pcmC0D0p:   colin      3348 F.... ktorrent
/dev/snd/timer:      colin      3348 f.... ktorrent


I can't manage to play a sound using alsa:
Code: Select all
[colin in ~]$ mplayer /opt/kde/share/sounds/Kopete_Received.ogg
(...)
[AO_ALSA] alsa-lib: pcm_hw.c:1132:(snd_pcm_hw_open) open /dev/snd/pcmC0D0p failed: Device or resource busy
[AO_ALSA] alsa-lib: pcm_dmix.c:996:(snd_pcm_dmix_open) unable to open slave
[AO_ALSA] Playback open error: Device or resource busy
Could not open/initialize audio device -> no sound.
Audio: no sound
Video: no video


I solved the problem by restarting ktorrent. So I guess finishing a download trigger some function that block the device.

After restarting ktorrent:

Code: Select all
[colin in ~]$ fuser -v /dev/snd/*
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  colin      2874 F.... kmix
/dev/snd/controlC1:  colin      2874 F.... kmix


Regards,
Colin
XmontanaroX
Registered Member
Posts
13
Karma
0
sorry to bring this up again but i still have this problem.

I have no sound notification configured inside ktorrent (3.3 beta1) and this just happened again after finishing a download. It seems to me that it doesn't happen every time but this behaviour has occured for a long time now.

Anyway when i try to play a file i get:
[AO_ALSA] alsa-lib: pcm_hw.c:1325:(snd_pcm_hw_open) open /dev/snd/pcmC0D0p failed: Device or resource busy
George
Moderator
Posts
5421
Karma
1
Notifications are done with dbus calls (to knotify), KT does not open any sound device when it has to do a notification. So unless the media player plugin is hogging the sound device, it isn't KT.
XmontanaroX
Registered Member
Posts
13
Karma
0
i don't have the media player plugin enabled though!

Any idea on how to track the root of the problem?
George
Moderator
Posts
5421
Karma
1
fuser -v /dev/snd/*

That should show all applications using sound devices.
XmontanaroX
Registered Member
Posts
13
Karma
0
oh sorry, i forgot to say that when i had the problem, doing fuser /dev/snd/pcmC0D0p reported ktorrent using the device.

anyway if i do fuser -v /dev/snd* right now (when everything is working fine) it says:

USER PID ACCESS COMMAND
/dev/snd/controlC0: andrea 2871 F.... kmix
andrea 3427 F.... ktorrent

/dev/snd/pcmC0D0p: andrea 3427 F.... ktorrent

/dev/snd/timer: andrea 3427 f.... ktorrent


so it looks that ktorrent uses the device...
George
Moderator
Posts
5421
Karma
1
Doesn't happen here, I only see ktorrent opening a sound device when the media player plugin is loaded.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft