---------------------------- Original Message ---------------------------- Subject: Re: AUDIO driver or what? From: [email protected] Date: Fri, January 14, 2022 4:58 pm To: [email protected] --------------------------------------------------------------------------
Hello, it's me again.. I am probably annoying at this point, I apologise. I thought I'd give in some more information, hopefully helpful to someone.. somehow. The bug was gone for 5 days... the bug what bug? The bug that makes me have no sound and is somehow connected to video playback in a way that it plays slower. This time it happened when I decreased my volume by running this command: "sndioctl output.level=-0.025" However I never mentioned this, neither, also hopefully helpful, xenodm.log: "amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description. If they do, bad things may happen!" That's the message. auctl says: "default: audio device gone, stopping" Can someone help me? This bug has been talked about before as you can see from the reply.. but only a computer restart fixes the problem.. is there anything that you recommend that's not reinstalling? > Okay.. posting a new bug on here because I doubt it's a MPV-only problem. > I have tried via `aucat -i` on a .wav file, and there is no sound. > > This problem has more replies than listed below, basically I got slow > video playing (on MPV) and no audio once this problem occurs. > I found out (at least once that I remember) that it happens when I change > from a login TTY to a TT1 aka CTRL+ALT+Function1. > > I do login trough Xenodm. > And yes, my /dev/dri card0 and renderD128 are owned by $USER. > > I tried stoping, starting, restarting sndiod, but that does NOT seem to be > the problem-solver we thought it could be.. > Although I have been running it with `-ddd` flags all day long and, > unfortunately don't ask me why, but I deleted the huge log, and will > provide the log of now, while the problem is ongoing, so perhaps you won't > see the difference between the working logging and non-working one, if it > even matters... > ... > if it even is a sndiod problem.. > Here you go an log (how do I get the tor browser to see the Downloads > directory? lol it is added to pledge.main and pledge.content. > > > snd0 pst=cfg.default: rec=0:1 play=0:1 vol=32768 dup > snd1 pst=cfg.default: rec=0:1 play=0:1 vol=32768 dup > snd2 pst=cfg.default: rec=0:1 play=0:1 vol=32768 dup > snd3 pst=cfg.default: rec=0:1 play=0:1 vol=32768 dup > worker(worker|ini): created > listen(/tmp/sndio/sock0|ini): created > helper(helper|ini): created > sock(sock|ini): created > helper: recv: cmd = 0, num = 0, idx = 0, mode = 3, fd = -1 > helper: send: cmd = 3, num = 0, idx = 0, mode = 0, fd = 3 > sock,rmsg,widl: AUTH message > sock,rmsg,widl: HELLO message > sock,rmsg,widl: hello from <mpv>, mode = 1, ver 7 > app/mpv0.level=127 at 1 -> slot_level:mpv0: added > snd0 pst=cfg: device requested > snd0 pst=cfg: trying rsnd/0 > worker: send: cmd = 0, num = 0, idx = 0, mode = 3, fd = -1 > worker: recv: cmd = 3, num = 0, idx = 0, mode = 0, fd = 6 > worker: send: cmd = 2, num = 0, idx = 0, mode = 768, fd = -1 > worker: recv: cmd = 3, num = 0, idx = 0, mode = 0, fd = 7 > snd0 pst=cfg: using rsnd/0 > sio(dev|ini): created > sioctl(mix|ini): created > 0/output0.level=180 at 2 -> hw:0/0: added > 0/output1.level=180 at 3 -> hw:0/1: added > 0/output0.mute=0 at 4 -> hw:0/32: added > 0/output1.mute=0 at 5 -> hw:0/33: added > 0/input0.level=125 at 6 -> hw:0/64: added > 0/input1.level=125 at 7 -> hw:0/65: added > 0/input0.mute=0 at 8 -> hw:0/96: added > 0/input1.mute=0 at 9 -> hw:0/97: added > snd0 pst=cfg: 48000Hz, s16le, play 0:1, rec 0:1, 16 blocks of 480 frames > mpv0 vol=127,pst=ini: using snd0 pst=ini.default, mode = 1 > helper: recv: cmd = 2, num = 0, idx = 0, mode = 768, fd = -1 > helper: send: cmd = 3, num = 0, idx = 0, mode = 0, fd = 3 > mpv0 vol=127,pst=ini,rmsg,widl: SETPAR message > mpv0 vol=127,pst=ini,rmsg,widl: playback channels 0:1 -> 0:1 > mpv0 vol=127,pst=ini,rmsg,widl: 48000Hz sample rate, 480 frame blocks > mpv0 vol=127,pst=ini,rmsg,widl: 8160 frame buffer > mpv0 vol=127,pst=ini,rmsg,widl: GETPAR message > mpv0 vol=127,pst=ini,rmsg,widl: GETPAR message > mpv0 vol=127,pst=ini,rmsg,widl: START message > mpv0 vol=127,pst=ini: playing s32le -> s16le > mpv0 vol=127,pst=ini: allocated 8160/15840 fr buffers > mpv0 vol=127,pst=sta: 48000Hz, s32le, play 0:1, 17 blocks of 480 frames > mpv0 vol=127,pst=sta,rmsg,widl: building SETVOL message, vol = 127 > cmap: nch = 2, ostart = 0, onext = 0, istart = 0, inext = 0 > dec: s32le, 2 channels > snd0 pst=ini: device started > snd0 pst=run: started > mpv0 vol=127,pst=rdy: attached at -7680 + 0/480 > mpv0 vol=127,pst=rdy: set weight: 32768/32768 > helper: hup > helper(helper|zom): destroyed > nothing to do... > snd0 pst=run: watchdog timeout > mpv0 vol=127,pst=run,rmsg,widl: exit > mpv0 vol=127,pst=run,rmsg,widl: closing > mpv0 vol=127,pst=run: stopping > mpv0 vol=127,pst=run: detached at -7680 + 0/480 > mpv0 vol=127,pst=ini: zomb_eof > deleting non-empty buffer, used = 65280 > snd0 pst=run: device released > sock(sock|zom): destroyed > snd0 pst=cfg: software master level control enabled > 0/output.level=127 at 2 -> dev_master:0: added > snd0 pst=cfg: closed > sio(dev|zom): destroyed > sioctl(mix|zom): destroyed > snd0 pst=cfg: closing > 0/output.level=127 at 2 -> dev_master:0: removed > worker(worker|zom): destroyed > listen(/tmp/sndio/sock0|zom): destroyed > snd0 pst=cfg: draining > snd1 pst=cfg: draining > snd2 pst=cfg: draining > snd3 pst=cfg: draining > nothing to do... > snd0 pst=cfg: deleting > snd1 pst=cfg: deleting > snd2 pst=cfg: deleting > snd3 pst=cfg: deleting > snd0 pst=cfg.default: rec=0:1 play=0:1 vol=32768 dup > snd1 pst=cfg.default: rec=0:1 play=0:1 vol=32768 dup > snd2 pst=cfg.default: rec=0:1 play=0:1 vol=32768 dup > snd3 pst=cfg.default: rec=0:1 play=0:1 vol=32768 dup > helper(helper|ini): created > worker(worker|ini): created > listen(/tmp/sndio-1000/sock0|ini): created > sock(sock|ini): created > helper: recv: cmd = 0, num = 0, idx = 0, mode = 3, fd = -1 > helper: send: cmd = 3, num = 0, idx = 0, mode = 0, fd = -1 > helper: recv: cmd = 0, num = 0, idx = 0, mode = 1, fd = -1 > helper: send: cmd = 3, num = 0, idx = 0, mode = 0, fd = -1 > helper: recv: cmd = 0, num = 0, idx = 0, mode = 2, fd = -1 > helper: send: cmd = 3, num = 0, idx = 0, mode = 0, fd = -1 > sock,rmsg,widl: AUTH message > sock,rmsg,widl: HELLO message > sock,rmsg,widl: hello from <mpv>, mode = 1, ver 7 > app/mpv0.level=127 at 1 -> slot_level:mpv0: added > snd0 pst=cfg: device requested > snd0 pst=cfg: trying rsnd/0 > worker: send: cmd = 0, num = 0, idx = 0, mode = 3, fd = -1 > worker: recv: cmd = 3, num = 0, idx = 0, mode = 0, fd = -1 > worker: send: cmd = 0, num = 0, idx = 0, mode = 1, fd = -1 > worker: recv: cmd = 3, num = 0, idx = 0, mode = 0, fd = -1 > worker: send: cmd = 0, num = 0, idx = 0, mode = 2, fd = -1 > worker: recv: cmd = 3, num = 0, idx = 0, mode = 0, fd = -1 > snd0 pst=cfg: failed to open audio device > sock,rmsg,widl: closing > sock(sock|zom): destroyed > helper: hup > helper(helper|zom): destroyed > nothing to do... > worker(worker|zom): destroyed > listen(/tmp/sndio-1000/sock0|zom): destroyed > snd0 pst=cfg: draining > snd1 pst=cfg: draining > snd2 pst=cfg: draining > snd3 pst=cfg: draining > nothing to do... > snd0 pst=cfg: deleting > snd1 pst=cfg: deleting > snd2 pst=cfg: deleting > snd3 pst=cfg: deleting > snd0 pst=cfg.default: rec=0:1 play=0:1 vol=32768 dup > snd1 pst=cfg.default: rec=0:1 play=0:1 vol=32768 dup > snd2 pst=cfg.default: rec=0:1 play=0:1 vol=32768 dup > snd3 pst=cfg.default: rec=0:1 play=0:1 vol=32768 dup > helper(helper|ini): created > worker(worker|ini): created > listen(/tmp/sndio/sock0|ini): created > sock(sock|ini): created > helper: recv: cmd = 0, num = 0, idx = 0, mode = 3, fd = -1 > helper: send: cmd = 3, num = 0, idx = 0, mode = 0, fd = 3 > helper: recv: cmd = 2, num = 0, idx = 0, mode = 768, fd = -1 > helper: send: cmd = 3, num = 0, idx = 0, mode = 0, fd = 3 > sock,rmsg,widl: AUTH message > sock,rmsg,widl: HELLO message > sock,rmsg,widl: hello from <mpv>, mode = 1, ver 7 > app/mpv0.level=127 at 1 -> slot_level:mpv0: added > snd0 pst=cfg: device requested > snd0 pst=cfg: trying rsnd/0 > worker: send: cmd = 0, num = 0, idx = 0, mode = 3, fd = -1 > worker: recv: cmd = 3, num = 0, idx = 0, mode = 0, fd = 6 > worker: send: cmd = 2, num = 0, idx = 0, mode = 768, fd = -1 > worker: recv: cmd = 3, num = 0, idx = 0, mode = 0, fd = 7 > snd0 pst=cfg: using rsnd/0 > sio(dev|ini): created > sioctl(mix|ini): created > 0/output0.level=180 at 2 -> hw:0/0: added > 0/output1.level=180 at 3 -> hw:0/1: added > 0/output0.mute=0 at 4 -> hw:0/32: added > 0/output1.mute=0 at 5 -> hw:0/33: added > 0/input0.level=125 at 6 -> hw:0/64: added > 0/input1.level=125 at 7 -> hw:0/65: added > 0/input0.mute=0 at 8 -> hw:0/96: added > 0/input1.mute=0 at 9 -> hw:0/97: added > snd0 pst=cfg: 48000Hz, s16le, play 0:1, rec 0:1, 16 blocks of 480 frames > mpv0 vol=127,pst=ini: using snd0 pst=ini.default, mode = 1 > mpv0 vol=127,pst=ini,rmsg,widl: SETPAR message > mpv0 vol=127,pst=ini,rmsg,widl: playback channels 0:1 -> 0:1 > mpv0 vol=127,pst=ini,rmsg,widl: 48000Hz sample rate, 480 frame blocks > mpv0 vol=127,pst=ini,rmsg,widl: 8160 frame buffer > mpv0 vol=127,pst=ini,rmsg,widl: GETPAR message > mpv0 vol=127,pst=ini,rmsg,widl: GETPAR message > mpv0 vol=127,pst=ini,rmsg,widl: START message > mpv0 vol=127,pst=ini: playing s32le -> s16le > mpv0 vol=127,pst=ini: allocated 8160/15840 fr buffers > mpv0 vol=127,pst=sta: 48000Hz, s32le, play 0:1, 17 blocks of 480 frames > mpv0 vol=127,pst=sta,rmsg,widl: building SETVOL message, vol = 127 > cmap: nch = 2, ostart = 0, onext = 0, istart = 0, inext = 0 > dec: s32le, 2 channels > snd0 pst=ini: device started > snd0 pst=run: started > mpv0 vol=127,pst=rdy: attached at -7680 + 0/480 > mpv0 vol=127,pst=rdy: set weight: 32768/32768 > snd0 pst=run: watchdog timeout > mpv0 vol=127,pst=run,rmsg,widl: exit > mpv0 vol=127,pst=run,rmsg,widl: closing > mpv0 vol=127,pst=run: stopping > mpv0 vol=127,pst=run: detached at -7680 + 0/480 > mpv0 vol=127,pst=ini: zomb_eof > deleting non-empty buffer, used = 65280 > snd0 pst=run: device released > sock(sock|zom): destroyed > snd0 pst=cfg: software master level control enabled > 0/output.level=127 at 2 -> dev_master:0: added > snd0 pst=cfg: closed > sio(dev|zom): destroyed > sioctl(mix|zom): destroyed > snd0 pst=cfg: closing > 0/output.level=127 at 2 -> dev_master:0: removed > > > >> Okay, seems like one of culprits to me not having permissions in MPV, >> and >> well.. the user being again owned by root iiiiiiss: >> me switching TTY-s. >> Yup... well at least it's very related. >> >> I have been using MPV half a day now and everything was perfect. >> Until I was trying to get my KSH SHELL CONFIGURED!!! (this thing is a >> fucking mystery, I did RTFM). >> So, because of that I went from TTY5 (home/xendom or at least >> CTRL+ALT+Function5) to TTY1 to log-in and see if that changed anything >> with ksh I was testing (did fucking not, thy of course), and then when I >> came back, tried to play something in MPV again - voila, le bug.. or >> well.. the change, at least, not sure if it's a bug. >> >> Went to check - and of course, card0 and renderD128 under /dev/dri were >> owned by root. >> >> No, I did NOT log-in as root. All I did was log-in as my $USER. >> >> So is that some privilege escalation? I leave that up to you. If you >> need >> more information, I am more than glad to help. >> >> P.S. Yes, I did this thing in the past, and only now realize this - >> because I seriously did not expect this. >> If this is all that broke the thing, I'm more than glad to never repeat >> it >> again :). Also no - there wasn't any audio playing at the time I >> switched >> TTY-s. >> >> Best Regards, >> fossy >> >>> Yeah, I know what does is for - temporary privilege escalation. >>> >>>> Theos is right in so far that if you give your user the right to >>>> execute >>>> chown as root, your user is basically root for everything. >>> >>> I don't understand this, though.. Sure, if you have "persist" - your >>> user >>> has root-like permissions in that terminal for a while. >>> >>>> I am doing such things on my system, but this doesn't mean that it is >>>> a >>>> good idea or advice that should be given. >>> >>> I fail to follow here.. what should one do instead? >>> >>>> You can of course chown /dev/dri/card0 manually >>> >>> Yeah, that's what I do, like I said. >>> You said "No" so I should run that command.. which puts even more >>> confusion ._. >>> >>>> It's a fine line to walk. If you react that way when you're wrong it >>>> looks really stupid. >>> >>> Yup - I know this from experience. If it turns out I'm wrong, I >>> apologize, >>> but I myself am like that because I hate humans and sometimes >>> computers.. >>> so forgive me if I ever sound unfriendly :/ I don't mean harm. >>> If you are curious, I got my own website and it talks about anger >>> issues >>> and causes in more detail: http://fossy.codeberg.page/ >>> >>> Best regards, >>> fossy >>> >>>> [email protected] wrote: >>>>> Hold on, are you saying that I shouldn't run `doas chown $USER >>>>> /dev/dri/card0` manually? >>>>> I apologize I sometimes have a harder time of understanding people, >>>>> and >>>>> vice-versa. >>>> >>>> No. "doas" is the openbsd equivalent of "sudo". You can configure it >>>> and >>>> then execute "doas chown /dev/dri/card0" as user, but chown would then >>>> actually be executed as root. Read the doas and doas.conf manpages for >>>> more info about it. >>>> >>>> Theos is right in so far that if you give your user the right to >>>> execute >>>> chown as root, your user is basically root for everything. >>>> >>>> I am doing such things on my system, but this doesn't mean that it is >>>> a >>>> good idea or advice that should be given. >>>> >>>> You can of course chown /dev/dri/card0 manually. >>>> >>>>> I love how Theo reacts, reminds me of myself <_< what a legend. >>>> >>>> It's a fine line to walk. If you react that way when you're wrong it >>>> looks really stupid. >>>> >>>>> Oh wait so by >>>>> > then every file could be chowned to >>>>> > your user and altered and chowned back. >>>>> You mean putting it in a config for xinit/Xendom? >>>>> If so - I never did that >>>>> >>>>> Best regards, >>>>> fossy >>>>> >>>>> > Theo de Raadt wrote: >>>>> >> Stefan Hagen <[email protected]> wrote: >>>>> >> >>>>> >> > Crystal Kolipe wrote: >>>>> >> > > On Sat, Jan 08, 2022 at 08:15:43PM +0100, Stefan Hagen wrote: >>>>> >> > > > Start X via xenodm and not via startx. Then it runs through >>>>> >> > > > /etc/X11/xenodm/GiveConsole, which contains: >>>>> >> > > > >>>>> >> > > > if [ -c /dev/dri/card0 ]; then >>>>> >> > > > chown $USER /dev/dri/card0 >>>>> >> > > > fi >>>>> >> > > > >>>>> >> > > > Alternatively add the chown command above to your .xinitrc >>>>> >> > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>>>> >> > > WHAT!? >>>>> >> > > >>>>> >> > > /dev/dri/card0 will be automatically chown'ed to the user >>>>> logged >>>>> in >>>>> >> on >>>>> >> > > ttyC0 unless you've changed /etc/fbtab from the default. >>>>> >> > > >>>>> >> > > Additionally, /etc/X11/xinit is run as the calling user, not >>>>> as >>>>> >> root. >>>>> >> > > So how on earth would the chown command succeed, called from >>>>> xinit? >>>>> >> > >>>>> >> > doas(1) helps. But the whole suggestion was a bandaid. I should >>>>> not >>>>> >> have >>>>> >> > given it. >>>>> >> >>>>> >> What unbelievable terrible advice, to encourage people to make >>>>> their >>>>> >> accounts root-equivelant. >>>>> >> >>>>> >> Just wow. >>>>> > >>>>> > My morning brain agrees that doas and chown should not be mentioned >>>>> in >>>>> > one sentence. But there's no paddling back from this on a mailing >>>>> list... >>>>> > >>>>> > So: DON'T DO THAT! As theo said, then every file could be chowned >>>>> to >>>>> > your user and altered and chowned back. It's basically root for >>>>> > everything. >>>>> > >>>>> > We should really hunt down why the device owner is not set properly >>>>> with >>>>> > the mechanism in place. >>>>> > >>>>> > Best Regards, >>>>> > Stefan >>>> >>> >>> >> >> >> > >
