Dolphin, the GameCube and Wii emulator - Forums

Full Version: [SOLVED] (Linux) No Audio with Certain Backends
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
EDIT: Solution in Post #5.

First post. I just compiled and installed Dolphin on Linux (x64), and video emulation via OpenGL on Linux is just as good as it is on Windows. However, audio emulation is terrible on both the AOSound and Pulse backends. My other options, the OpenAL and ALSA backends, do not work. They appear to load when I start a game, and the emulator runs the game without crashing, but there is no audio.

I know that ALSA works since it is my OS's default audio plugin. Also, libopenal1 and libopenal-dev are installed from my repositories. What could cause these backends not to work?

Attempted solutions: Restart ALSA, Restart PulseAudio, choose different audio plugins in my OS.
What distro are you using? I'm on Slackware x64, and ASound, OpenAL, and ALSA all run fine. When you say the audio is terrible, do you mean it's distorted and scratchy, or something like that?

One possibility is that one of the volume settings has been set to mute. I've not used PulseAudio, but I've read that its mixer might have trouble detecting whether or not ALSA's own mixer is set to mute. I think if you run the command "alsamixer" you should be able to see if anything is muted at all, in which case you can reset the volumes.
(03-20-2012, 08:17 AM)Shonumi Wrote: [ -> ]What distro are you using? I'm on Slackware x64, and ASound, OpenAL, and ALSA all run fine. When you say the audio is terrible, do you mean it's distorted and scratchy, or something like that?

One possibility is that one of the volume settings has been set to mute. I've not used PulseAudio, but I've read that its mixer might have trouble detecting whether or not ALSA's own mixer is set to mute. I think if you run the command "alsamixer" you should be able to see if anything is muted at all, in which case you can reset the volumes.

I am using Linux Mint Debian Edition (x64). My system specs and OS are in my profile.

To clarify, when I use OpenAL, the audio stutters consistently a few times per second, sounding like a machine gun. Using Pulse, the sound is smooth, but it skips about one in three notes in the background music (ex: Super Mario Sunshine, Super Smash Bros: Melee). Also, with Pulse, sound plays with a latency of nearly a second.

I tried alsamixer, and there is nothing displayed but an S/PDIF output whose volume is 0 and cannot be raised. However, using the Multimedia Systems Selector under System/Preferences, I see that ALSA is my default plugin, and, when I click "Test," a sound plays. I do not know why my output devices do not appear under alsamixer, but it could be part of my problem. I should also note that using ALSA now causes Dolphin to freeze upon loading a game.

Final note: Dolphin's sound emulation works great on my Windows partition (using either DSound or OpenAL), so this is not a hardware problem.

EDIT: gnome-alsamixer reports that all audio devices are unmuted and fully turned up. Still, nothing but S/PDIF appears in the terminal alsamixer.
killall -9 pulseaudio && dolphin-emu, and then select ALSA ? If it doesn't help - google for "(insert your audio chip model here) + linux", for alsa configuration, if doesn't help - buy a discrete sound card.
I found the solution. Running Dolphin as a super user enabled me to use both the OpenAL and ALSA backends, both of which work very well for me. ALSA's performance is especially outstanding in that sound plays fluidly even when the framerate is under par. Thank you, Shonumi and ShadowFlash, for your suggestions.

The only thing that would make me more satisfied would be to know which files need their permissions changed or what else might need to be done to allow me to use these backends with my account. However, this is a trivial desire, since running Dolphin as a super user is very easy to do.

In the unlikely event that anyone else ever needs this solution and does not know how to run a program as a super user, simply change the command in your Dolphin menu item to "gksu dolphin-emu." You may need to enter your password when launching Dolphin using this menu item.
Don't run such an application as root, it will scramble all the permission bits.
Instead, verify that you're, for example, in the "audio" group.
(03-21-2012, 07:25 AM)scummos Wrote: [ -> ]Don't run such an application as root, it will scramble all the permission bits.
Instead, verify that you're, for example, in the "audio" group.

Thank you for the suggestion. However, I ensured that I am in the "audio," "pulse," and "pulse-access" groups, and it did not change my situation. I know that it is frowned upon to use super user privileges to run applications, but I believe it to be safe. Unless this will change the permissions of any file outside of Dolphin's configuration files, memory card files, etc., I fail to see the problem. I also fail to see another solution to my original problem, although any other suggestions would be appreciated.
Try to run the application through strace, and check for any permission denied errors, maybe... not sure if that will work, but it's worth trying.

Of course it won't instantly blow up your computer if you run dolphin as root ;P
In Windows XP, every application runs as root, and the users of that OS are still alive. However, this is a rough workaround which comes with a number of problems; at the very least, you'll have to enter your password every time and a different widget style will be used to display UI elements. Save games and configuration files are not written into your home directory, but to ~root (usually /root) which is very inconvenient (as you'll need the root password to even read them). Also, if the application misbehaves (which is, granted, unlikely) it might (theoretically) screw up some system files (overwrite global configuration files, ...).
In other words, yes, in most cases it'll just work, but don't run applications as root if you can avoid it in any way.
(03-21-2012, 09:21 AM)scummos Wrote: [ -> ]Try to run the application through strace, and check for any permission denied errors, maybe... not sure if that will work, but it's worth trying.

Of course it won't instantly blow up your computer if you run dolphin as root ;P
In Windows XP, every application runs as root, and the users of that OS are still alive. However, this is a rough workaround which comes with a number of problems; at the very least, you'll have to enter your password every time and a different widget style will be used to display UI elements. Save games and configuration files are not written into your home directory, but to ~root (usually /root) which is very inconvenient (as you'll need the root password to even read them). Also, if the application misbehaves (which is, granted, unlikely) it might (theoretically) screw up some system files (overwrite global configuration files, ...).
In other words, yes, in most cases it'll just work, but don't run applications as root if you can avoid it in any way.

I do not plan to, and, if I could find another solution, I would apply it.