Notification Sounds Not Working in Linux

Forums » Opera for Windows/Mac/Linux » Opera for *nix - Linux/FreeBSD

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

4. May 2010, 07:08:28

Notification Sounds Not Working in Linux

I've verified this in 10.10 and in 10.53 -- the QT4 i386 builds. If I set a particular notification to a wav file, the test button doesn't produce the sound and performing the action does not produce the sound.

I'm using Debian (lenny) and my desktop environment is Gnome. Also, I had to install the pulseaudio package to get Gnome system sounds working, which got me excited, but then Opera's sounds didn't work.

I'm loving the latest release and have been using M2 as my daily mail client in Windows for several years now, but the notification sound for a new email is a must-have feature. I hope I'm just missing some sort of configuration setting somewhere, as I would love to run it 24x7 on my Linux server.

Thanks in advance.

4. May 2010, 07:57:53

It works for me in Debian Squeeze both with ALSA and PulseAudio.

Make sure you do specify a sound file! It does not have a sound file by default.

If you dont have one (.wav i think) , look around for example in /usr/share/sounds and its subfolders for something suitable.

4. May 2010, 10:35:06 (edited)

GomJabbar

Posts: 733

I just tested it, and it doesn't seem to be working here either. I chose the file /usr/share/sounds/freedesktop/stereo/goksound2.wav for the test. The file does play fine by itself.

This is in Fedora 12 Gnome.
Version 10.10
Build 4742
Platform Linux
System i686, 2.6.32.11-99.fc12.i686
Qt library 4.6.2
Java Java Runtime Environment installed

4. May 2010, 10:44:23

Select the .wav file, restart Opera, test the sound. It works for me this way. But on the first selection it doesnt, only if i restart Opera.

4. May 2010, 15:06:10

GomJabbar

Posts: 733

Same build and sound is working fine in Mandriva 2010 KDE. I am having some other problems with Opera on Fedora 12 Gnome. Might have a corrupted configuration file somewhere.

5. May 2010, 03:26:58

I got it working, sort of. I did a reboot and then all the sounds started working in Opera. However, if I try to play an mp3 in Gnome Movie player, the Opera notification sounds stop working from then on. The Gnome System Sounds still work, but Opera doesn't. If I restart Opera, they start working again.

What gives?

5. May 2010, 05:14:55 (edited)

GomJabbar

Posts: 733

You know, it's interesting because I noticed sometime back that Opera breaks the volume control on my remote control when Opera is open. The remote control works alright for the other keys, but volume up, volume down and mute do not work when Opera is open.

EDIT: I just logged into Mandriva 2010 KDE and the volume buttons of the remote control work fine there on VLC with Opera open. The remote control volume buttons don't control the volume of a flash player music stream in Opera, but I am not surprised given the nature of LIRC. I guess Opera breaking the remote control volume buttons is only a Fedora 12 Gnome problem for me.

8. May 2010, 07:20:54

I think I figured this out -- audio configuration in Linux is just a complete convoluted disaster.

Basically, what is happening is Opera uses the older OSS API (via the /dev/dsp device) to play the notification sounds. OSS does not support multiple applications playing sound at the same time. Since this is completely lame, now we have ALSA, which is a completely different audio API, which does support multiple applications playing sound at the same time. It is also backwards compatible with the OSS API. This means Opera will open up /dev/dsp and issue its usual OSS calls to play wav files, but the ALSA driver is who is handling those calls (not an OSS driver) and since it doesn't suck, it will let other applications that depend on the older OSS API open up the same device at the same time. NOTE: You must have dmix configured with ALSA for this to work. You also need to launch the Application that uses the OSS API via the aoss script i.e. /usr/bin/aoss /usr/bin/opera. Well, you might not need dmix if your soundcard supports onboard/hardware mixing, I'm not sure. dmix is the plugin/library provided by ALSA to mix the simultaneous sound data in software. Luckily it seems to be configured on my Debian install by default. I'm not quite sure what the aoss script does, but you need to launch Opera with it because if you don't and you launch another sound application, Opera won't be able to play sound from then on.

Hopefully this helps someone out. The email notification sound is a great feature. I keep Opera running 24x7 on my server and when I'm working on my laptop or just chilling, I get an aural interrupt. Of course, this necessitates having a good spam filter!

8. May 2010, 08:21:10

With this command line it works with alsa in Debian (alsa-oss package has to be installed):

LD_PRELOAD=/usr/lib/libaoss.so opera

Also it works with pulseaudio without the above command line.
ALSA would be nice though.

11. June 2010, 21:22:36 (edited)

zogoibi

The freelander

Posts: 63

Thank you Texas and Gradinar. I'll try to improve a bit the "understandability" of your posts, for the sake of unexperienced users like me, because I've needed a lot of thinking and experimenting. :-)

I also had this same issue, on a Sidux distro. Here's the result of my experimenting with what you both suggest:

1.- Installing alsa-oss package and adding the following last-but-one line in the Opera starting script (/usr/bin/opera):
export LD_PRELOAD=/usr/lib/libaoss.so, I've got Opera sounds working. It also works if, instead of adding that line, I modify the last one to make it look like this:
exec /usr/bin/aoss /usr/lib/opera/opera "$@" (There must be another similar ways, but the two above work.)

2.- However, installing pulseaudio and NOT using the suggested tweak above, I haven't got it working. Maybe I'm doing something bad (unfortunately Gradinar's post is way too cryptic for beginners), but the thing is that, no matter if I start the pulseaudio daemon manually (/etc/init.d/pulseaudio start), or if I leave this job to the desktop manager (Xfce in my case, Settings-->Sessions and startup). It just doesn't work for me.

And I agree: definitely, it's about time for the Opera developers to forget about OSS and implement ALSA in the browser (instead of many other far-less-important bells and whistles).

Also it would be very much appreciated to ship the browser with a small library of sounds.
Visit my blog: http://freelander.es

30. May 2012, 11:47:16 (edited)

alxobr

Posts: 60

Hi all,

As of Opera version 11.64, this issue has not been solved. The notification files are not played.

I am running Fedora with Pulseaudio which works fine.

In "Tools/ Preferences / Advanced / Notifications", Opera won’t play the wav files when I click on Test.

Changing the wav files handling in "Tools/ Preferences / Advanced / Downloads" does not help.

Playing with LD_PRELOAD in Opera’s starting script /usr/bin/opera does not help and produces errors.

The following works:
1. Install alsa-oss (depends on your distribution):
$> yum install alsa-oss
2. change the last line of Opera’s starting script /usr/bin/opera as suggested above:
exec /usr/bin/aoss /usr/lib/opera/opera "$@"
3. Go to "Tools / Mail and chat accounts", select an account, click "Edit", select the "Incoming" tab and ensure that "Play a sound when new message arrives" is checked and a valid wav file is specified for each concerned account.

The resulting sound is terrible, at least on my system, but at least test and actual notification now both work.

It's hard to understand that this has not been worked on, since sound email notification is essential to people working with email. So many basic sound apps work like a charm with or without sound servers running.

Cheers,

Alexandre

30. May 2012, 12:31:47

alxobr

Posts: 60

When using pulseaudio, I could not manage to get padsp to work.

However I could get the notification messages by starting opera with this command:
$> LD_PRELOAD=libpulsedsp.so opera &

Note that the startup script must not use aoss in this case, last line is:
exec /usr/lib/opera/opera "$@"

The sound is as much wrecked as with aoss however, while Thunderbird performs great on that matter.





20. July 2012, 14:41:34

alxobr

Posts: 60

Using Pulseaudio with Opera 12.00, you have 2 solutions:

1. start opera with this command:
$> LD_PRELOAD=libpulsedsp.so opera &

2. Add the following line before the last line of the startup script /usr/bin/opera
export LD_PRELOAD=libpulsedsp.so

Both work, but the sound is still noisy.

When using the second alternative, keep in mind that the startup script will be overwritten at each update.



Forums » Opera for Windows/Mac/Linux » Opera for *nix - Linux/FreeBSD