Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
opera grabs the sound system on kde (Solved)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
reup
Guru
Guru


Joined: 13 May 2005
Posts: 419
Location: Nederland

PostPosted: Mon Oct 08, 2012 12:24 pm    Post subject: opera grabs the sound system on kde (Solved) Reply with quote

hello all

I have 3 Gentoo at home all using KDE but having as well other WM installed as backup in case a kde upgrade would go wrong (as it does very often)

one think I noticed is that on all my systems, opera, and opera only, will grab the sound and stop other software from using it

ex : I open opera on youtube (html5 ?) or some video system (flash) and then I try to run a movie with VLS and go to youtube with firefox and play mp3 with clementine

I will only have the sound from opera, if I change page on opera and go to a site with no sound or video, I still cannot hear anything from the other software. until I close opera then reload all other software. then I will hear simultaneously VLS, Firefox and Clementine.

it could be fix by removing opera and using another browser, unfortunately, I do not like changing softwares only because they do not work as intended

any help appreciated


reup
_________________
reup

"Don't wiggle the tail of the frog in the oil of the frying peanuts"


Last edited by reup on Fri Oct 12, 2012 11:15 am; edited 2 times in total
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Mon Oct 08, 2012 5:25 pm    Post subject: Reply with quote

Opera is closed source. You would likely have to go to an Opera
development forum for an answer.

But how many users want to input sound from multiple different
programs at the same time into the kernel's sound system?
The Opera developers are not likely to take this seriously as a bug.

On the other hand, Opera should not leave the kernel's sound
infrastructure locked for itself when Opera or some Opera plug-in
is not actually playing sound (or video with sound), but perhaps
the Opera developers view that as policy rather than as a software
development error ("Web page sounds take precedence over other
sound, so we reserve exclusive access to the sound system when
we start up.")

Perhaps there is an Opera configuration setting to turn that
policy on or off ("I do not want my audio stream from another
program preempted by Opera when it starts up or when it encounters
a URL with an a/v mime type in a www page.") You could ask on an
Opera user's forum. Perhaps some regular user of Opera reading
the forum will know if such a configuration setting exists.
_________________
TIA
Back to top
View user's profile Send private message
jrussia
Tux's lil' helper
Tux's lil' helper


Joined: 29 Aug 2012
Posts: 89
Location: Chicago

PostPosted: Tue Oct 09, 2012 6:25 am    Post subject: Reply with quote

wcg wrote:

But how many users want to input sound from multiple different
programs at the same time into the kernel's sound system?
The Opera developers are not likely to take this seriously as a bug.


Not to get too far off topic, but did you really think this through? Nobody has Skype open and music playing, pause music to watch a youtube video? And a disc burning in the background beeps when it finishes?


Anyways, wish I could help the OP. Good luck.
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Tue Oct 09, 2012 10:26 am    Post subject: Reply with quote

Its not what I think is reasonable that matters, it is what
the Opera developers think (or thought at one time).

I think it could be a legacy configuration from some Windows
BSOD, too, where some version of Windows crashed if anything
used the audio system without locking out access from other
processes. After fixing Opera for that version of Windows,
the developers abstracted it into higher level code in Opera,
so that they could use different lower-level code to reserve
exclusive access to the audio device in different versions
of Windows. (They would not have known when this would
be fixed in Windows, if ever, and what other systems that
Opera was ported to might have the same problem.)

Remember Win9x? It always had "walk and chew gum at
the same time" problems. It would not surprise me if this
code originated in the development of Opera running on Win9x.

That code is probably still in Opera, even on platforms where concurrent
access to the audio device does not crash the system (like linux).

I still think the OP needs to go to the Opera forums to find out
whether this "feature" can be turned on or off, and if so, how
exactly.
_________________
TIA
Back to top
View user's profile Send private message
reup
Guru
Guru


Joined: 13 May 2005
Posts: 419
Location: Nederland

PostPosted: Wed Oct 10, 2012 12:20 pm    Post subject: Reply with quote

sorry all, I was away for 30 hours

I understand that it would be stupid to have multiple sound running at once, but imagine, you open opera, watch a video, the video is finished, you minimize opera and start to listen music.... except that it works only if you close opera, not only the tab you used for watching the video, but all tabs and the main opera window

I do not try to start a wild chase on opera bugs, I found weird that one browser could highjack the sound system entirely

I was hopping that someone had a hint or encountered this issue before
_________________
reup

"Don't wiggle the tail of the frog in the oil of the frying peanuts"
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Wed Oct 10, 2012 1:51 pm    Post subject: Reply with quote

I am not saying that one would want it to do this, only that the Opera
developers may have had a good reason at one time for having
Opera reserve exclusive access to the audio device. Failure to
disable that functionality for Opera on linux is perhaps a code
maintenance oversight.

The important questions, imho, are whether you can set a configuration
switch in Opera's preferences to prevent it from doing this, if not
will they fix the linux port, etc.
_________________
TIA
Back to top
View user's profile Send private message
reup
Guru
Guru


Joined: 13 May 2005
Posts: 419
Location: Nederland

PostPosted: Wed Oct 10, 2012 1:55 pm    Post subject: Reply with quote

thanks WCG and JRUSSIA for the replies.

I will close this topic as this is obviously not a gentoo issue
_________________
reup

"Don't wiggle the tail of the frog in the oil of the frying peanuts"
Back to top
View user's profile Send private message
Kidov
n00b
n00b


Joined: 20 Jul 2006
Posts: 56
Location: Finland

PostPosted: Thu Oct 11, 2012 3:45 pm    Post subject: Reply with quote

I'm using KDE4 as well and in my system Opera, Firefox and VLC player can all play audio simultaneously.
Back to top
View user's profile Send private message
reup
Guru
Guru


Joined: 13 May 2005
Posts: 419
Location: Nederland

PostPosted: Thu Oct 11, 2012 4:05 pm    Post subject: Reply with quote

thanks for the info Kidov

I think I will conduct some other experiment now, like to see if this is working with gnome or lxde

maybe my sound card has some wrong settings.
_________________
reup

"Don't wiggle the tail of the frog in the oil of the frying peanuts"
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4565

PostPosted: Fri Oct 12, 2012 7:37 am    Post subject: Reply with quote

Do you have pulseaudio running?
Do you have dmix enabled for your default device?
Does your phonon-backend use that default device?
Back to top
View user's profile Send private message
reup
Guru
Guru


Joined: 13 May 2005
Posts: 419
Location: Nederland

PostPosted: Fri Oct 12, 2012 8:50 am    Post subject: Reply with quote

I use gstreamer as phonon backend, pulseaudio does not even appear as a choice. In fact, I read on the forum from many people that pulseaudio was more a problem than a solution, that is why I moved out from using it

however, pulseaudio is running :

Code:
ps aux | grep pulse
myusername      3018  0.0  0.2 427116  8396 ?        Sl   10:30   0:00 /usr/bin/pulseaudio --start --log-target=syslog


for dmix, I found this on dmix:alsa wiki :
Quote:
NOTE: For ALSA 1.0.9rc2 and higher you don't need to setup dmix for analogue output. Dmix is enabled by default for soundcards which don't support hardware mixing. You still need to set it up for digital outputs


I use ALSA higher than 1.0.9rc2
Code:

~ $ eix media-libs/alsa-lib
[I] media-libs/alsa-lib
     Installed versions:  1.0.25-r1(10:28:30 AM 08/07/2012)(python -alisp -debug -doc)


now I am going to follow the guide from dmix:alsa wiki and see how to set dmix form my default device as suggested by Franzf
_________________
reup

"Don't wiggle the tail of the frog in the oil of the frying peanuts"
Back to top
View user's profile Send private message
reup
Guru
Guru


Joined: 13 May 2005
Posts: 419
Location: Nederland

PostPosted: Fri Oct 12, 2012 9:25 am    Post subject: Reply with quote

I loose the sound on all my browsers (opera, firefox...) if I use vlc or/and clementine at the same time. in fact, if I start vlc before flashplayer, I do not get sound in flashplayer. if I start flashplayer before vlc, I do not get sound on vlc. it even does not appear in the volume control as a channel

I think I need to restart my sound installation from scratch, I did too many modification to keep tract of what does what
_________________
reup

"Don't wiggle the tail of the frog in the oil of the frying peanuts"
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4565

PostPosted: Fri Oct 12, 2012 11:12 am    Post subject: Reply with quote

Probably it is enough to set a different ("default", "standard", ...) sound device in vlc (settings->audio).
To get rid of pulseaudio you need to set USE="-pulseaudio" - and hope that there is no application (mostly gnome....) that hard depends on pulseaudio.
Before removing pulseaudio you can try to kill pulse, and remove ~/.pulse dir.
Back to top
View user's profile Send private message
reup
Guru
Guru


Joined: 13 May 2005
Posts: 419
Location: Nederland

PostPosted: Fri Oct 12, 2012 11:15 am    Post subject: Reply with quote

solved

I followed again the gentoo wiki on pulseaudio and found the part about pulseaudio and flashplayer
Quote:
Flash/other ALSA users not giving sound


strangely, I set KDE to use gstreamer, but the pulseaudio sound system seems to be enable systemwide

now I do not have to close my browser to be able to play music
_________________
reup

"Don't wiggle the tail of the frog in the oil of the frying peanuts"
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4565

PostPosted: Fri Oct 12, 2012 11:19 am    Post subject: Reply with quote

reup wrote:
solved

great :)

Quote:
strangely, I set KDE to use gstreamer, but the pulseaudio sound system seems to be enable systemwide

pulseaudio is just a sound daemon, not a multimedia framework. It is another layer above alsa/oss/.... It was invented to be the "linux audio system done right (TM)"...
gstreamer/vlc/xine offer an API to be used by developers to simply play audio/video - multimedia frameworks. They can use pulseaudio for audio - or directly alsa/oss/... :)
Back to top
View user's profile Send private message
reup
Guru
Guru


Joined: 13 May 2005
Posts: 419
Location: Nederland

PostPosted: Fri Oct 12, 2012 11:32 am    Post subject: Reply with quote

thanks Franzf for the clarifications

I have apply the solution now to my 3 gentoo system and all is well

now I can drop Opera :lol:
_________________
reup

"Don't wiggle the tail of the frog in the oil of the frying peanuts"
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Sat Oct 13, 2012 10:54 am    Post subject: Reply with quote

Is pulseaudio maybe started at boot, as a system daemon?
Code:

rc-update show | grep pulseaudio

_________________
TIA


Last edited by wcg on Wed Oct 17, 2012 1:24 am; edited 1 time in total
Back to top
View user's profile Send private message
reup
Guru
Guru


Joined: 13 May 2005
Posts: 419
Location: Nederland

PostPosted: Sat Oct 13, 2012 11:27 am    Post subject: Reply with quote

nope, I had checked this already, but did it again just in case. the command return nothing, even with the correction (pulseaudio and not pulseaudo :D )

but ps aux | grep pulse still shows the pulseaudio started systemwide and as Deamon (pulseaudio --system -D )

as my personnal issue is solved, I will keep pulseaudio like this. now I am trying to turn my system to a music studio following http://en.gentoo-wiki.com/wiki/Music_studio

I believe I will have to start again from scratch because it needs jack and I use dmix :lol:

I love problems :lol:
_________________
reup

"Don't wiggle the tail of the frog in the oil of the frying peanuts"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum