Defcon "Failed to open audio output device"

Technical support for all issues relating to Defcon Linux

Moderator: Defcon moderators

animalu
level0
Posts: 2
Joined: Mon Jul 02, 2007 8:20 am

Defcon "Failed to open audio output device"

Postby animalu » Mon Jul 02, 2007 11:35 am

Hello. I'm trying to run Defcon on Gentoo with ALSA device 2 card 2. Here's the problem:

10:28 tavi@DECK.Buc.cube ~/tavi/games/defcon-v1.42: strace -o defcon-strace.txt ./defcon
Failed to open audio output device: "No available audio device"terminate called without an active exception
./defcon: line 46: 10709 Aborted $here/lib/defcon.bin.x86 "$@"

And the strace output:

execve("./defcon", ["./defcon"], [/* 48 vars */]) = 0
uname({sys="Linux", node="cube", ...}) = 0
brk(0) = 0x80ed000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=74874, ...}) = 0
mmap2(NULL, 74874, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f66000
close(3) = 0
open("/lib/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\v\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=10484, ...}) = 0
mmap2(NULL, 12392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f62000
mmap2(0xb7f64000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7f64000
close(3) = 0
open("/lib/tls/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20P\1\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1210872, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f61000
mmap2(NULL, 1154236, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e47000
mmap2(0xb7f5b000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x113) = 0xb7f5b000
mmap2(0xb7f5f000, 7356, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f5f000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e46000
mprotect(0xb7f5b000, 4096, PROT_READ) = 0
mprotect(0xb7f8e000, 4096, PROT_READ) = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e466c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1
}) = 0
munmap(0xb7f66000, 74874) = 0
open("/dev/urandom", O_RDONLY) = 3
read(3, "y\220\323\352", 4) = 4
close(3) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
open("/dev/tty", O_RDWR|O_NONBLOCK|O_LARGEFILE) = 3
close(3) = 0
brk(0) = 0x80ed000
brk(0x810e000) = 0x810e000
getuid32() = 1000
getgid32() = 100
geteuid32() = 1000
getegid32() = 100
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
time(NULL) = 1183361290
open("/etc/mtab", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=401, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f78000
read(3, "/dev/hdb1 / ext3 rw 0 0\nproc /pr"..., 4096) = 401
close(3) = 0
munmap(0xb7f78000, 4096) = 0
open("/proc/meminfo", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f78000
read(3, "MemTotal: 641024 kB\nMemFre"..., 1024) = 598
close(3) = 0
munmap(0xb7f78000, 4096) = 0
rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0
uname({sys="Linux", node="cube", ...}) = 0
stat64("/home/tavi/tavi/games/defcon-v1.42", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getpid() = 10703
getppid() = 10702
getpgrp() = 10702
rt_sigaction(SIGCHLD, {0x8078bb0, [], 0}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
open("./defcon", O_RDONLY|O_LARGEFILE) = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfe8c8a8) = -1 ENOTTY (Inappropriate ioctl for device)
_llseek(3, 0, [0], SEEK_CUR) = 0
read(3, "#!/bin/sh\n\n# Function to find th"..., 80) = 80
_llseek(3, 0, [0], SEEK_SET) = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
dup2(3, 255) = 255
close(3) = 0
fcntl64(255, F_SETFD, FD_CLOEXEC) = 0
fcntl64(255, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fstat64(255, {st_mode=S_IFREG|0755, st_size=1207, ...}) = 0
_llseek(255, 0, [0], SEEK_CUR) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
read(255, "#!/bin/sh\n\n# Function to find th"..., 1207) = 1207
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
pipe([3, 4]) = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
_llseek(255, -405, [802], SEEK_CUR) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7e46708) = 10704
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGCHLD, {0x8078bb0, [], 0}, {0x8078bb0, [], 0}, 8) = 0
close(4) = 0
read(3, ".\n", 128) = 2
read(3, "", 128) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
waitpid(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG) = 10704
waitpid(-1, 0xbfe8c138, WNOHANG) = -1 ECHILD (No child processes)
sigreturn() = ? (mask now [])
close(3) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x80778d0, [], 0}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL}, {0x80778d0, [], 0}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
read(255, "\nif [ ! -f \"$here/lib/sounds.dat"..., 1207) = 405
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
stat64("./lib/sounds.dat", {st_mode=S_IFREG|0644, st_size=59837913, ...}) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7e46708) = 10709
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x80778d0, [], 0}, {SIG_DFL}, 8) = 0
waitpid(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGABRT}], 0) = 10709
fstat64(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f78000
write(2, "./defcon: line 46: 10709 Aborted"..., 79) = 79
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
waitpid(-1, 0xbfe8c358, WNOHANG) = -1 ECHILD (No child processes)
sigreturn() = ? (mask now [])
rt_sigaction(SIGINT, {SIG_DFL}, {0x80778d0, [], 0}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
read(255, "", 1207) = 0
munmap(0xb7f78000, 4096) = 0
exit_group(134) = ?

I suspect the problems start with "ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfe8c8a8) = -1 ENOTTY (Inappropriate ioctl for device)", but I'm no programmer and I'm not familiar with the context. I appologize in advance if I missed a solution already being discussed/posted someplace around.

P.S. I didn't find command line switches to turn off the sound (it's really not essential IMHO, anyway not to the point of aborting the whole game), and my mouse cursor remains trapped in a middle-of-screen position (after the above error) requiring X to be restarted to recover it.
User avatar
frenchfrog
level5
level5
Posts: 2572
Joined: Sun Sep 22, 2002 7:11 pm
Location: Quebec

Postby frenchfrog » Mon Jul 02, 2007 9:39 pm

See HOWTO: Linux - Darwinia - Choosing a sound device ?

Please post back if it works or not (with detailed explanation if it works ;)).
The Ultimate Uplink Guide (for any question on Uplink)
Latest Uplink Patch
animalu
level0
Posts: 2
Joined: Mon Jul 02, 2007 8:20 am

Postby animalu » Mon Jul 02, 2007 11:27 pm

Excellent. It worked as simply as:

01:12 tavi@DECK.Buc.cube ~/tavi/games/defcon-v1.42: export SDL_PATH_DSP=/dev/dsp2; ./defcon

I didn't make the connection (between Darwinia - as in looking for the solution there - and Defcon) myself, sorry for the trouble. I put the variable in the wrapper script, everything is peachy now. Thanks. :)
qonfused
level0
Posts: 4
Joined: Mon Jun 16, 2008 2:29 pm

Postby qonfused » Mon Jun 16, 2008 2:43 pm

I am alos having this issue.
The fix linked to above did not work for me however.

i get the output:
    [hq@localhost defcon-v1.42]$ ./defcon
    Failed to open output device: "No available audio device"terminate called without an active exception
    ./defcon: line 46: 3593 Aborted $here/lib/defcon.bin.x86 "¤@"

i have tried:
    export SDL_PATH_DSP=/dev/dsp
    export SDL_PATH_DSP=/dev/dsp1
    export SDL_PATH_DSP=/dev/audio
    export SDL_PATH_DSP=/dev/audio1


here is my, ll /dev/ :

Code: Select all

crw-rw----+ 1 root root    14,  12 2008-06-16 14:55 adsp
crw-------  1 root root    10, 175 2008-06-16 14:55 agpgart
crw-rw----+ 1 root root    14,   4 2008-06-16 14:55 audio
crw-rw----+ 1 root root    14,  20 2008-06-16 14:55 audio1
drwxr-xr-x  2 root root        100 2008-06-16 14:55 bsg
drwxr-xr-x  3 root root         60 2008-06-16 14:55 bus
lrwxrwxrwx  1 root root          3 2008-06-16 14:55 cdrom -> sr0
crw-------  1 hq   root     5,   1 2008-06-16 14:55 console
lrwxrwxrwx  1 root root         11 2008-06-16 14:55 core -> /proc/kcore
crw-rw----  1 root root    10,  63 2008-06-16 14:55 cpu_dma_latency
drwxr-xr-x  6 root root        120 2008-06-16 14:55 disk
brw-r-----  1 root disk   253,   0 2008-06-16 14:55 dm-0
brw-r-----  1 root disk   253,   1 2008-06-16 14:55 dm-1
drwxr-xr-x  2 root root         80 2008-06-16 14:55 dri
crw-rw----+ 1 root root    14,   3 2008-06-16 14:55 dsp
crw-rw----+ 1 root root    14,  19 2008-06-16 14:55 dsp1
lrwxrwxrwx  1 root root          3 2008-06-16 14:55 dvd -> sr0
lrwxrwxrwx  1 root root         13 2008-06-16 14:55 fd -> /proc/self/fd
brw-r-----  1 root floppy   2,   0 2008-06-16 14:55 fd0
brw-r-----  1 root floppy   2,  84 2008-06-16 14:55 fd0u1040
brw-r-----  1 root floppy   2,  88 2008-06-16 14:55 fd0u1120
brw-r-----  1 root floppy   2,  28 2008-06-16 14:55 fd0u1440
brw-r-----  1 root floppy   2, 124 2008-06-16 14:55 fd0u1600
brw-r-----  1 root floppy   2,  44 2008-06-16 14:55 fd0u1680
brw-r-----  1 root floppy   2,  60 2008-06-16 14:55 fd0u1722
brw-r-----  1 root floppy   2,  76 2008-06-16 14:55 fd0u1743
brw-r-----  1 root floppy   2,  96 2008-06-16 14:55 fd0u1760
brw-r-----  1 root floppy   2, 116 2008-06-16 14:55 fd0u1840
brw-r-----  1 root floppy   2, 100 2008-06-16 14:55 fd0u1920
brw-r-----  1 root floppy   2,  12 2008-06-16 14:55 fd0u360
brw-r-----  1 root floppy   2,  16 2008-06-16 14:55 fd0u720
brw-r-----  1 root floppy   2, 120 2008-06-16 14:55 fd0u800
brw-r-----  1 root floppy   2,  52 2008-06-16 14:55 fd0u820
brw-r-----  1 root floppy   2,  68 2008-06-16 14:55 fd0u830
lrwxrwxrwx  1 root root          3 2008-06-16 14:55 floppy -> fd0
lrwxrwxrwx  1 root root          3 2008-06-16 14:55 floppy-fd0 -> fd0
crw-rw-rw-  1 root root     1,   7 2008-06-16 14:55 full
crw-rw-rw-  1 root root    10, 229 2008-06-16 14:55 fuse
crw-rw----  1 root root   180,  96 2008-06-16 14:55 hiddev0
crw-rw----  1 root root   250,   0 2008-06-16 14:55 hidraw0
crw-rw----  1 root root   250,   1 2008-06-16 14:55 hidraw1
crw-rw----  1 root root    10, 228 2008-06-16 14:55 hpet
drwxr-xr-x  4 root root        420 2008-06-16 14:55 input
crw-rw----  1 root root     1,  11 2008-06-16 14:55 kmsg
srw-rw-rw-  1 root root          0 2008-06-16 14:55 log
brw-r-----  1 root disk     7,   0 2008-06-16 14:55 loop0
brw-r-----  1 root disk     7,   1 2008-06-16 14:55 loop1
brw-r-----  1 root disk     7,   2 2008-06-16 14:55 loop2
brw-r-----  1 root disk     7,   3 2008-06-16 14:55 loop3
brw-r-----  1 root disk     7,   4 2008-06-16 14:55 loop4
brw-r-----  1 root disk     7,   5 2008-06-16 14:55 loop5
brw-r-----  1 root disk     7,   6 2008-06-16 14:55 loop6
brw-r-----  1 root disk     7,   7 2008-06-16 14:55 loop7
crw-rw----  1 root lp       6,   0 2008-06-16 14:55 lp0
crw-rw----  1 root lp       6,   1 2008-06-16 14:55 lp1
crw-rw----  1 root lp       6,   2 2008-06-16 14:55 lp2
crw-rw----  1 root lp       6,   3 2008-06-16 14:55 lp3
lrwxrwxrwx  1 root root         13 2008-06-16 14:55 MAKEDEV -> /sbin/MAKEDEV
drwxr-xr-x  2 root root        100 2008-06-16 14:55 mapper
crw-r-----  1 root kmem     1,   1 2008-06-16 14:55 mem
crw-rw----+ 1 root root    14,   0 2008-06-16 14:55 mixer
crw-rw----+ 1 root root    14,  16 2008-06-16 14:55 mixer1
drwxr-xr-x  2 root root         60 2008-06-16 14:55 net
crw-rw----  1 root root    10,  62 2008-06-16 14:55 network_latency
crw-rw----  1 root root    10,  61 2008-06-16 14:55 network_throughput
crw-rw-rw-  1 root root     1,   3 2008-06-16 14:55 null
crw-rw----  1 root root    10, 144 2008-06-16 14:55 nvram
crw-rw----  1 root root     1,  12 2008-06-16 14:55 oldmem
crw-rw----  1 root lp      99,   0 2008-06-16 14:55 parport0
crw-rw----  1 root lp      99,   1 2008-06-16 14:55 parport1
crw-rw----  1 root lp      99,   2 2008-06-16 14:55 parport2
crw-rw----  1 root lp      99,   3 2008-06-16 14:55 parport3
crw-r-----  1 root kmem     1,   4 2008-06-16 14:55 port
crw-------  1 root root   108,   0 2008-06-16 14:55 ppp
crw-rw-rw-  1 root tty      5,   2 2008-06-16 15:39 ptmx
drwxr-xr-x  2 root root          0 2008-06-16 14:55 pts
lrwxrwxrwx  1 root root          4 2008-06-16 14:55 ram -> ram1
brw-r-----  1 root disk     1,   0 2008-06-16 14:55 ram0
brw-r-----  1 root disk     1,   1 2008-06-16 14:55 ram1
brw-r-----  1 root disk     1,  10 2008-06-16 14:55 ram10
brw-r-----  1 root disk     1,  11 2008-06-16 14:55 ram11
brw-r-----  1 root disk     1,  12 2008-06-16 14:55 ram12
brw-r-----  1 root disk     1,  13 2008-06-16 14:55 ram13
brw-r-----  1 root disk     1,  14 2008-06-16 14:55 ram14
brw-r-----  1 root disk     1,  15 2008-06-16 14:55 ram15
brw-r-----  1 root disk     1,   2 2008-06-16 14:55 ram2
brw-r-----  1 root disk     1,   3 2008-06-16 14:55 ram3
brw-r-----  1 root disk     1,   4 2008-06-16 14:55 ram4
brw-r-----  1 root disk     1,   5 2008-06-16 14:55 ram5
brw-r-----  1 root disk     1,   6 2008-06-16 14:55 ram6
brw-r-----  1 root disk     1,   7 2008-06-16 14:55 ram7
brw-r-----  1 root disk     1,   8 2008-06-16 14:55 ram8
brw-r-----  1 root disk     1,   9 2008-06-16 14:55 ram9
lrwxrwxrwx  1 root root          4 2008-06-16 14:55 ramdisk -> ram0
crw-rw-rw-  1 root root     1,   8 2008-06-16 14:55 random
brw-------  1 root root   253,   0 2008-06-16 14:55 root
lrwxrwxrwx  1 root root          4 2008-06-16 14:55 rtc -> rtc0
crw-r--r--  1 root root   254,   0 2008-06-16 14:55 rtc0
lrwxrwxrwx  1 root root          3 2008-06-16 14:55 scd0 -> sr0
brw-r-----  1 root disk     8,   0 2008-06-16 14:55 sda
brw-r-----  1 root disk     8,   1 2008-06-16 14:55 sda1
brw-r-----  1 root disk     8,   2 2008-06-16 14:55 sda2
brw-r-----  1 root disk     8,  16 2008-06-16 14:55 sdb
brw-r-----  1 root disk     8,  17 2008-06-16 14:55 sdb1
crw-rw----+ 1 root root    14,   1 2008-06-16 14:55 sequencer
crw-rw----+ 1 root root    14,   8 2008-06-16 14:55 sequencer2
crw-r-----  1 root disk    21,   0 2008-06-16 14:55 sg0
crw-r-----  1 root disk    21,   1 2008-06-16 14:55 sg1
crw-r-----  1 root disk    21,   2 2008-06-16 14:55 sg2
drwxrwxrwt  2 root root         40 2008-06-16 15:31 shm
crw-rw----  1 root root    10, 231 2008-06-16 14:55 snapshot
drwxr-xr-x  2 root root        280 2008-06-16 14:55 snd
brw-rw----+ 1 root disk    11,   0 2008-06-16 14:55 sr0
lrwxrwxrwx  1 root root         15 2008-06-16 14:55 stderr -> /proc/self/fd/2
lrwxrwxrwx  1 root root         15 2008-06-16 14:55 stdin -> /proc/self/fd/0
lrwxrwxrwx  1 root root         15 2008-06-16 14:55 stdout -> /proc/self/fd/1
crw-------  1 root root     4,   0 2008-06-16 14:55 systty
crw-rw-rw-  1 root tty      5,   0 2008-06-16 15:04 tty
crw--w----  1 root root     4,   0 2008-06-16 14:55 tty0
crw-------  1 root root     4,   1 2008-06-16 14:55 tty1
crw--w----  1 root tty      4,  10 2008-06-16 14:55 tty10
crw--w----  1 root tty      4,  11 2008-06-16 14:55 tty11
crw--w----  1 root tty      4,  12 2008-06-16 14:55 tty12
crw--w----  1 root tty      4,  13 2008-06-16 14:55 tty13
crw--w----  1 root tty      4,  14 2008-06-16 14:55 tty14
crw--w----  1 root tty      4,  15 2008-06-16 14:55 tty15
crw--w----  1 root tty      4,  16 2008-06-16 14:55 tty16
crw--w----  1 root tty      4,  17 2008-06-16 14:55 tty17
crw--w----  1 root tty      4,  18 2008-06-16 14:55 tty18
crw--w----  1 root tty      4,  19 2008-06-16 14:55 tty19
crw-------  1 root root     4,   2 2008-06-16 14:55 tty2
crw--w----  1 root tty      4,  20 2008-06-16 14:55 tty20
crw--w----  1 root tty      4,  21 2008-06-16 14:55 tty21
crw--w----  1 root tty      4,  22 2008-06-16 14:55 tty22
crw--w----  1 root tty      4,  23 2008-06-16 14:55 tty23
crw--w----  1 root tty      4,  24 2008-06-16 14:55 tty24
crw--w----  1 root tty      4,  25 2008-06-16 14:55 tty25
crw--w----  1 root tty      4,  26 2008-06-16 14:55 tty26
crw--w----  1 root tty      4,  27 2008-06-16 14:55 tty27
crw--w----  1 root tty      4,  28 2008-06-16 14:55 tty28
crw--w----  1 root tty      4,  29 2008-06-16 14:55 tty29
crw-------  1 root root     4,   3 2008-06-16 14:55 tty3
crw--w----  1 root tty      4,  30 2008-06-16 14:55 tty30
crw--w----  1 root tty      4,  31 2008-06-16 14:55 tty31
crw--w----  1 root tty      4,  32 2008-06-16 14:55 tty32
crw--w----  1 root tty      4,  33 2008-06-16 14:55 tty33
crw--w----  1 root tty      4,  34 2008-06-16 14:55 tty34
crw--w----  1 root tty      4,  35 2008-06-16 14:55 tty35
crw--w----  1 root tty      4,  36 2008-06-16 14:55 tty36
crw--w----  1 root tty      4,  37 2008-06-16 14:55 tty37
crw--w----  1 root tty      4,  38 2008-06-16 14:55 tty38
crw--w----  1 root tty      4,  39 2008-06-16 14:55 tty39
crw-------  1 root root     4,   4 2008-06-16 14:55 tty4
crw--w----  1 root tty      4,  40 2008-06-16 14:55 tty40
crw--w----  1 root tty      4,  41 2008-06-16 14:55 tty41
crw--w----  1 root tty      4,  42 2008-06-16 14:55 tty42
crw--w----  1 root tty      4,  43 2008-06-16 14:55 tty43
crw--w----  1 root tty      4,  44 2008-06-16 14:55 tty44
crw--w----  1 root tty      4,  45 2008-06-16 14:55 tty45
crw--w----  1 root tty      4,  46 2008-06-16 14:55 tty46
crw--w----  1 root tty      4,  47 2008-06-16 14:55 tty47
crw--w----  1 root tty      4,  48 2008-06-16 14:55 tty48
crw--w----  1 root tty      4,  49 2008-06-16 14:55 tty49
crw-------  1 root root     4,   5 2008-06-16 14:55 tty5
crw--w----  1 root tty      4,  50 2008-06-16 14:55 tty50
crw--w----  1 root tty      4,  51 2008-06-16 14:55 tty51
crw--w----  1 root tty      4,  52 2008-06-16 14:55 tty52
crw--w----  1 root tty      4,  53 2008-06-16 14:55 tty53
crw--w----  1 root tty      4,  54 2008-06-16 14:55 tty54
crw--w----  1 root tty      4,  55 2008-06-16 14:55 tty55
crw--w----  1 root tty      4,  56 2008-06-16 14:55 tty56
crw--w----  1 root tty      4,  57 2008-06-16 14:55 tty57
crw--w----  1 root tty      4,  58 2008-06-16 14:55 tty58
crw--w----  1 root tty      4,  59 2008-06-16 14:55 tty59
crw-------  1 root root     4,   6 2008-06-16 14:55 tty6
crw--w----  1 root tty      4,  60 2008-06-16 14:55 tty60
crw--w----  1 root tty      4,  61 2008-06-16 14:55 tty61
crw--w----  1 root tty      4,  62 2008-06-16 14:55 tty62
crw--w----  1 root tty      4,  63 2008-06-16 14:55 tty63
crw--w----  1 root root     4,   7 2008-06-16 14:55 tty7
crw--w----  1 root tty      4,   8 2008-06-16 14:55 tty8
crw--w----  1 root tty      4,   9 2008-06-16 14:55 tty9
crw-rw----  1 root uucp     4,  64 2008-06-16 14:55 ttyS0
crw-rw----  1 root uucp     4,  65 2008-06-16 14:55 ttyS1
crw-rw----  1 root uucp     4,  66 2008-06-16 14:55 ttyS2
crw-rw----  1 root uucp     4,  67 2008-06-16 14:55 ttyS3
crw-rw-rw-  1 root root     1,   9 2008-06-16 14:55 urandom
crw-rw----  1 root root   249,   0 2008-06-16 14:55 usbdev1.1_ep00
crw-rw----  1 root root   249,   1 2008-06-16 14:55 usbdev1.1_ep81
crw-rw----  1 root root   249,   8 2008-06-16 14:55 usbdev1.2_ep00
crw-rw----  1 root root   249,  10 2008-06-16 14:55 usbdev1.2_ep02
crw-rw----  1 root root   249,   9 2008-06-16 14:55 usbdev1.2_ep81
crw-rw----  1 root root   249,   2 2008-06-16 14:55 usbdev2.1_ep00
crw-rw----  1 root root   249,   3 2008-06-16 14:55 usbdev2.1_ep81
crw-rw----  1 root root   249,   4 2008-06-16 14:55 usbdev3.1_ep00
crw-rw----  1 root root   249,   5 2008-06-16 14:55 usbdev3.1_ep81
crw-rw----  1 root root   249,  11 2008-06-16 14:55 usbdev3.2_ep00
crw-rw----  1 root root   249,  12 2008-06-16 14:55 usbdev3.2_ep81
crw-rw----  1 root root   249,  13 2008-06-16 14:55 usbdev3.2_ep82
crw-rw----  1 root root   249,   6 2008-06-16 14:55 usbdev4.1_ep00
crw-rw----  1 root root   249,   7 2008-06-16 14:55 usbdev4.1_ep81
crw-rw----  1 root root   251,   0 2008-06-16 14:55 usbmon0
crw-rw----  1 root root   251,   1 2008-06-16 14:55 usbmon1
crw-rw----  1 root root   251,   2 2008-06-16 14:55 usbmon2
crw-rw----  1 root root   251,   3 2008-06-16 14:55 usbmon3
crw-rw----  1 root root   251,   4 2008-06-16 14:55 usbmon4
crw-rw----  1 vcsa tty      7,   0 2008-06-16 14:55 vcs
crw-rw----  1 vcsa tty      7,   1 2008-06-16 14:55 vcs1
crw-rw----  1 vcsa tty      7,   2 2008-06-16 14:55 vcs2
crw-rw----  1 vcsa tty      7,   3 2008-06-16 14:55 vcs3
crw-rw----  1 vcsa tty      7,   4 2008-06-16 14:55 vcs4
crw-rw----  1 vcsa tty      7,   5 2008-06-16 14:55 vcs5
crw-rw----  1 vcsa tty      7,   6 2008-06-16 14:55 vcs6
crw-rw----  1 vcsa tty      7,   7 2008-06-16 15:23 vcs7
crw-rw----  1 vcsa tty      7, 128 2008-06-16 14:55 vcsa
crw-rw----  1 vcsa tty      7, 129 2008-06-16 14:55 vcsa1
crw-rw----  1 vcsa tty      7, 130 2008-06-16 14:55 vcsa2
crw-rw----  1 vcsa tty      7, 131 2008-06-16 14:55 vcsa3
crw-rw----  1 vcsa tty      7, 132 2008-06-16 14:55 vcsa4
crw-rw----  1 vcsa tty      7, 133 2008-06-16 14:55 vcsa5
crw-rw----  1 vcsa tty      7, 134 2008-06-16 14:55 vcsa6
crw-rw----  1 vcsa tty      7, 135 2008-06-16 15:23 vcsa7
drwx------  2 root root         80 2008-06-16 14:55 VolGroup00
crw-rw----  1 root root    10, 130 2008-06-16 14:55 watchdog
lrwxrwxrwx  1 root root          4 2008-06-16 14:55 X0R -> null
lrwxrwxrwx  1 root root          4 2008-06-16 14:55 XOR -> null
crw-rw-rw-  1 root root     1,   5 2008-06-16 14:55 zero
Last edited by qonfused on Mon Jun 16, 2008 2:46 pm, edited 1 time in total.
qonfused
level0
Posts: 4
Joined: Mon Jun 16, 2008 2:29 pm

Postby qonfused » Mon Jun 16, 2008 2:45 pm

i would like to add that this is a issue i am having while trying to run in fluxbox.
It fixes itself if i try to run from GNOME.
I would however like to have this fixed for fluxbox, as it is my main Desktop/WM
User avatar
bert_the_turtle
level5
level5
Posts: 4797
Joined: Fri Oct 13, 2006 6:11 pm
Location: Cologne
Contact:

Postby bert_the_turtle » Mon Jun 16, 2008 3:30 pm

The problem seems to be that your audio devices are not writable by general users. I don't know which distribution you're running, but there are different approaches they take to allow general users to output sound:
1. Just give everyone write access
2. have the audio devices owned by the "audio" group and let those users who should be able to access them be in that group
3. Have root run a daemon that handles the sound and communicates with the application software by some other means. KDE does that, for example.

Since your problems are window manager specific, it seems your distribution entirely relies on 3. The quick and dirty way would be to just go for variant 1. To do that, execute

Code: Select all

chmod o+rw /dev/dsp

as root (with sudo if you're on an Ubuntu variant). Depending on how your distribution handles device nodes, you have to execute that once after every reboot or edit a configuration file to make the change permanent.

I suggest you test that, and if it works, we can work out a proper procedure for your specific distribution.
qonfused
level0
Posts: 4
Joined: Mon Jun 16, 2008 2:29 pm

Postby qonfused » Mon Jun 16, 2008 4:57 pm

thanks for the reply

I run Fedora 9

It didnt work
I gave all users rw, it gave me the same error.

[code=defcon.sh]
sudo chmod o+rw /dev/dsp
export SDL_PATH_DSP=/dev/dsp
./defcon
[/code]

i tried that, and tried it replacing dsp with dsp1, audio and audio1
and i checked /dev/ to make shure that they where rw, they where.

any clue?
User avatar
bert_the_turtle
level5
level5
Posts: 4797
Joined: Fri Oct 13, 2006 6:11 pm
Location: Cologne
Contact:

Postby bert_the_turtle » Mon Jun 16, 2008 5:53 pm

Hmm, nope, sorry, I know too little about Fedora+fluxbox to be of any useful help. You may want to look at the full SDL environment variable docu: ftp://ptah.lnf.kth.se/pub/misc/sdl-env-vars
Maybe playing with SDL_AUDIODRIVER helps. You could, for example, stream the audio output to disk :) Possibly even directly to /dev/null with

Code: Select all

export SDL_AUDIODRIVER=disk
export SDL_DISKAUDIOFILE=/dev/null
Of course, you'll then have no sound, but that's better than no game at all.
qonfused
level0
Posts: 4
Joined: Mon Jun 16, 2008 2:29 pm

Postby qonfused » Mon Jun 16, 2008 8:05 pm

Actually that worked.

Code: Select all

sudo chmod o+rw /dev/dsp
export SDL_AUDIODRIVER=disk
export SDL_DISKAUDIOFILE=/dev/null
export SDL_PATH_DSP=/dev/dsp
./defcon


Defcon runs,
albeit without sound.

directing SDL_AUDIODRIVER towards dsp didnt work hower. Produced the normal error.
WildHorn
level0
Posts: 1
Joined: Mon Mar 14, 2011 2:04 pm

fixed!

Postby WildHorn » Mon Mar 14, 2011 2:15 pm

if you steel need solve of this problem...
try to:

# printenv | grep SDL

if you see any strings (like "SDL_AUDIODRIVER=pulse" for me), then delete it (you need root access for this):

# unset SDL_AUDIODRIVER

at all you need to delete all SDL strings in environment (and make backup just in case).
p.s. sorry for my English.
Lachu
level0
Posts: 1
Joined: Sun Jul 05, 2015 12:32 pm

Re: Defcon "Failed to open audio output device"

Postby Lachu » Sun Jul 05, 2015 12:40 pm

Firstly, sorry for my English.

Someone from OpenSuSE folks have proposed solution:
https://features.opensuse.org/316517

You should:
1. Download 32bit pulseaudio package for your distribution
2. Open this package in file archiver
3. Open /usr/lib/pulseaudio directory in archive
4. Copy libpulsedsp.so from this directory into your Defcon directory
5. Launch game in this way:

Code: Select all

cd /directory/where/defcon/are/installed
LD_PRELOAD=./libpulsedsp.so ./defcon

Return to “Linux Troubleshooting”

Who is online

Users browsing this forum: No registered users and 6 guests