Javier19 / mupen64plus

Automatically exported from code.google.com/p/mupen64plus
0 stars 0 forks source link

No audio without root permission (or without using sudo) #533

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Describe your system: Ubuntu
 - Operating System (be specific): Ubuntu 12.04
 - Machine type (32-bit or 64-bit): 64-bit
 - Mupen64Plus version: 1.99.5
- Plugins used:

For visual artifacts, give:
 - game name and CRC/MD5 hash (printed on console): Super Mario and Generally all games
- description of the artifact (missing polygons, flashing, wrong colors,
etc) : None

Describe the problem: I don't have sound unless I run mupen64plus as root 
(using sudo). How do I fix this problem ?

Please provide any additional information below.

Original issue reported on code.google.com by xpressra...@gmail.com on 1 Jan 2013 at 5:10

GoogleCodeExporter commented 9 years ago
Can you please post the output when not working and when working. Can you 
please check that you are using the correct SDL audio backend (for example 
pulse when you are using pulseaudio). What plugins are you using? What are your 
volume settings in mupen64plus? Do other programs (for example using sdl audio) 
working when running as non-root? Did you try to remove your configuration in 
~/.config/mupen64plus/?  Are you in all necessary user groups (audio)? Are you 
using extra security layers limiting the capabilities of programs? Are these 
programs configured in a way that the access to audio devices are limited?

Original comment by s...@narfation.org on 1 Jan 2013 at 6:22

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
While sound not working
-----------------------

UI-Console: Cheat codes disabled.
UI-console: using Video plugin: 'Mupen64Plus OpenGL Video Plugin by Rice' 
v1.99.5
UI-console: using Audio plugin: 'Mupen64Plus SDL Audio Plugin' v1.99.5
Input Warning: N64 Controller #1: Disabled, SDL joystick 0 is not available
Input Warning: N64 Controller #2: Disabled, SDL joystick 1 is not available
Input Warning: N64 Controller #3: Disabled, SDL joystick 2 is not available
Input Warning: N64 Controller #4: Disabled, SDL joystick 3 is not available
Input: N64 Controller #1: Forcing default keyboard configuration
Input: Using auto-configuration for device 'Keyboard'
UI-console: using Input plugin: 'Mupen64Plus SDL Input Plugin' v1.99.5
UI-console: using RSP plugin: 'Hacktarux/Azimer High-Level Emulation RSP 
Plugin' v1.99.5
Input Warning: N64 Controller #1: Disabled, SDL joystick 0 is not available
Input Warning: N64 Controller #2: Disabled, SDL joystick 1 is not available
Input Warning: N64 Controller #3: Disabled, SDL joystick 2 is not available
Input Warning: N64 Controller #4: Disabled, SDL joystick 3 is not available
Input: N64 Controller #1: Forcing default keyboard configuration
Input: Using auto-configuration for device 'Keyboard'
Input Warning: No joysticks/controllers found
Input: Mupen64Plus SDL Input Plugin version 1.99.5 initialized.
Video: SSE processing enabled.
Video: Found ROM 'Diddy Kong Racing', CRC e740d45311b01975-45
Video: Initializing OpenGL Device Context.
Core: Setting 32-bit video mode: 640x480
ATTENTION: default value of option force_s3tc_enable overridden by environment.
Video Warning: Failed to set GL_DEPTH_SIZE to 16. (it's 24)
Video: Using OpenGL: Intel Open Source Technology Center - Mesa DRI Intel(R) 
Sandybridge Mobile  : 3.0 Mesa 9.0
Video: OpenGL Combiner: Fragment Program
Audio: Initializing SDL audio subsystem...
Audio Error: Couldn't open audio: No available audio device
Core: Starting R4300 emulator: Dynamic Recompiler
Core: R4300: starting 64-bit dynamic recompiler at: 0x7f326cb57200
Core Warning: two events of type 0x8 in interrupt queue
Core Warning: two events of type 0x8 in interrupt queue
Core Warning: two events of type 0x8 in interrupt queue
Core Warning: two events of type 0x8 in interrupt queue
Core Warning: two events of type 0x8 in interrupt queue
Core Warning: two events of type 0x8 in interrupt queue
Core Warning: two events of type 0x8 in interrupt queue
Core Status: Stopping emulation.
Core: R4300 emulator finished.
Core Status: Rom closed.

While sound working running using sudo
--------------------------------------

UI-Console: Cheat codes disabled.
UI-console: using Video plugin: 'Mupen64Plus OpenGL Video Plugin by Rice' 
v1.99.5
UI-console: using Audio plugin: 'Mupen64Plus SDL Audio Plugin' v1.99.5
Input Warning: N64 Controller #1: Disabled, SDL joystick 0 is not available
Input Warning: N64 Controller #2: Disabled, SDL joystick 1 is not available
Input Warning: N64 Controller #3: Disabled, SDL joystick 2 is not available
Input Warning: N64 Controller #4: Disabled, SDL joystick 3 is not available
Input: N64 Controller #1: Forcing default keyboard configuration
Input: Using auto-configuration for device 'Keyboard'
UI-console: using Input plugin: 'Mupen64Plus SDL Input Plugin' v1.99.5
UI-console: using RSP plugin: 'Hacktarux/Azimer High-Level Emulation RSP 
Plugin' v1.99.5
Input Warning: N64 Controller #1: Disabled, SDL joystick 0 is not available
Input Warning: N64 Controller #2: Disabled, SDL joystick 1 is not available
Input Warning: N64 Controller #3: Disabled, SDL joystick 2 is not available
Input Warning: N64 Controller #4: Disabled, SDL joystick 3 is not available
Input: N64 Controller #1: Forcing default keyboard configuration
Input: Using auto-configuration for device 'Keyboard'
Input Warning: No joysticks/controllers found
Input: Mupen64Plus SDL Input Plugin version 1.99.5 initialized.
Video: SSE processing enabled.
Video: Found ROM 'Diddy Kong Racing', CRC e740d45311b01975-45
Video: Initializing OpenGL Device Context.
Core: Setting 32-bit video mode: 640x480
Video Warning: Failed to set GL_DEPTH_SIZE to 16. (it's 24)
Video: Using OpenGL: Intel Open Source Technology Center - Mesa DRI Intel(R) 
Sandybridge Mobile  : 3.0 Mesa 9.0
Video: OpenGL Combiner: Fragment Program
Audio: Initializing SDL audio subsystem...
Home directory /home/myusername not ours.
Home directory /home/myusername not ours.
/dev/mixer: : No such file or directory
Core: Starting R4300 emulator: Dynamic Recompiler
Core: R4300: starting 64-bit dynamic recompiler at: 0x7f9ee3f2c200
Home directory /home/myusername not ours.
/dev/mixer: : No such file or directory
Core Warning: two events of type 0x8 in interrupt queue
Core Warning: two events of type 0x8 in interrupt queue
Core Warning: two events of type 0x8 in interrupt queue
Core Warning: two events of type 0x8 in interrupt queue
Core Warning: two events of type 0x8 in interrupt queue
Core Warning: two events of type 0x8 in interrupt queue
Core Warning: two events of type 0x8 in interrupt queue
Core Status: Stopping emulation.
Core: R4300 emulator finished.
Core Status: Rom closed.

Other programs run fine. I have no restrictions while playing linux games. 
First I tried to download binary from this site, when sound did not work I 
installed it. Again when that did not work either, I installed via ubuntu 
software center. I previously did not had installed (i guess libsdl-sound), I 
installed that too. When all of this did not work, I removed the installation 
and reinstalled using ppa.

$ groups
myusername adm cdrom sudo dip plugdev fuse lpadmin sambashare

Do I need to add something to audio group ?

Original comment by xpressra...@gmail.com on 2 Jan 2013 at 12:12

GoogleCodeExporter commented 9 years ago
Hint:

Audio: Initializing SDL audio subsystem...
Audio Error: Couldn't open audio: No available audio device

You probably need to add yourself to the audio group. Or you need to start it 
using something like 

SDL_AUDIODRIVER=pulse mupen64plus ....

Btw. still waiting for the rest of the questions to be answered. I just don't 
have enough information to help you to find why SDL (_SDL_ not mupen64plus) 
cannot open/find your  audio device.

Original comment by s...@narfation.org on 2 Jan 2013 at 2:16

GoogleCodeExporter commented 9 years ago
Can you please post the output when not working and when working.

I did that above

Can you please check that you are using the correct SDL audio backend (for 
example pulse when you are using pulseaudio).
It uses pulseaudio, i guess. I haven't tweaked anything in standard ubuntu 
desktop.

What plugins are you using?
I did not understand the question. You mean sdl plugins. Doesn't the 
mupen64plus ppa handles everything for me? In case of mupern64 I have 
mupen64plus-audio-sdl, mupen64plus-input-sdl, mupen64plus-audio-all, 
libmupen64plus-dev, libmupen64plus2.. (I guess everything other than dbg and 
wxmupen64plus)

What are your volume settings in mupen64plus? 
If it works with sudo, volume settings got to be ok, right?

Do other programs (for example using sdl audio) working when running as 
non-root?
Yes everything except mupen64 works.

Did you try to remove your configuration in ~/.config/mupen64plus/? 
Yes I did.

Are you in all necessary user groups (audio)?
$ groups username
username adm cdrom sudo dip plugdev fuse lpadmin sambashare

$ groups audio
groups: audio: No such user

There is no group called audio.

Even this command does not list that group
$ cat /etc/group |cut -d: -f1

Are you using extra security layers limiting the capabilities of programs?
I have ufw running. I have opened some ports via ufw for LAN use. If audio 
works via sudo that should not be a proble, right?

Are these programs configured in a way that the access to audio devices are 
limited?
No. I have not configured any such program.

Original comment by xpressra...@gmail.com on 3 Jan 2013 at 2:29

GoogleCodeExporter commented 9 years ago
Can you please try first (replace The_House_of_the_Old_Boat_-_Piccadilly.mp3 
with a different song or download it from Jamendo):

mplayer -ao sdl The_House_of_the_Old_Boat_-_Piccadilly.mp3

And the other thing mentioned above with SDL_AUDIODRIVER.

And when I understand your answer correctly: you've disabled things like 
apparmor?

And no, the ppa doesn't manage it for you. There are multiple plugin 
combinations possible and the ppa cannot forbid any of them. And I don't know 
what the standard ubuntu setup does. Btw. the environment variables also could 
be different for sudo and non-sudo executions. You can check them with `env`. 
And "works with sudo and therefore it has to work as normal user" isn't right 
here because the different users can have different capabilities.

Interesting would also be a strace log for a run with and without root rights

Original comment by s...@narfation.org on 3 Jan 2013 at 10:34

GoogleCodeExporter commented 9 years ago
Thank you
SDL_AUDIODRIVER=pulse did the trick. I had set it to run steam in .bashrc. All 
programs had this warning message. I need to start steam from command line and 
not break other application. How do I close this thread. This is a good 
project, good luck with its development.  Cheers!!

Original comment by xpressra...@gmail.com on 4 Jan 2013 at 4:36

GoogleCodeExporter commented 9 years ago

Original comment by s...@narfation.org on 4 Jan 2013 at 6:54