QubesOS / qubes-issues

The Qubes OS Project issue tracker
https://www.qubes-os.org/doc/issue-tracking/
534 stars 46 forks source link

Microphone stuck & undetachable (GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown) #4054

Open nil0x42 opened 6 years ago

nil0x42 commented 6 years ago

Qubes OS version:

R4.0

Affected component(s):

microphone qvm-device


Steps to reproduce the behavior:

My initial goal was to attach microphone automatically to 'videochat' qube, so i did the following:

[user@dom0 ~]$ qvm-shutdown videochat
[user@dom0 ~]$ qvm-device mic attach --persistent videochat dom0:mic
[user@dom0 ~]$ qvm-start videochat

No error, here i was thinking that everything was OK, because qvm-device mic list showed that my microphone was used by 'videochat', and sys-usb's tray icon said the same:

[user@dom0 ~]$ qvm-device mic list
BACKEND:DEVID  DESCRIPTION  USED BY
dom0:mic       Microphone   videochat

After starting 'videochat' qube, my microphone was NOT detected. I then rebooted my machine in order to see if it resolves the issue, and after that, the mic was shown as attached to videochat as expected, but still not working. So i resolved to undo the persistent attach as shown here:

[user@dom0 ~]$ qvm-device mic detach videochat dom0:mic
Can not remove a persistent attachment from a non halted vm

[user@dom0 ~]$ qvm-shutdown videochat

[user@dom0 ~]$ qvm-device mic detach videochat dom0:mic
Failed to attach microphone: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.qubesos.Audio.videochat was not provided by any .service files (2)

[user@dom0 ~]$ qvm-device mic list
BACKEND:DEVID  DESCRIPTION  USED BY
dom0:mic       Microphone   videochat

Now, i am totally stuck in that situation, the microphone is stuck in videochat, i cannot detach it, and even in videochat qube it doesn't works.

Expected behavior:

The microphone works when attached with '--persistent' argument, and can then be detached.

Actual behavior:

The micropohone is stuck as 'persistently attached', and doesn't work.

General notes:

I think it's a minor issue that persistent attach didn't worked as expected. For me, the real issue is being stuck in a state where my microphone is 100% unusable.

Note: before trying to to 'persistent attach' of my microphone, it worked fine by manually attaching it to any qube from sys-usb tray icon.


Related issues:

nil0x42 commented 6 years ago

Update: i just resolved my issue with a dirty hack, manually edited /var/lib/qubes/qubes.xml, and set mic device to null (<devices class="mic"/>) in videochat qube. After a reboot, everything seems OK, qvm-device mic list's output shows that mic is not in use, and a can attach and detach my microphone manually again.

hbswn commented 3 years ago

@nil0x42

Thanks for this solution !

Apparently the issue still persists in Qubes 4.0.4. Maybe difficult to get rid of --persistent options ;-)

Anyway, not a big deal if you know what to edit.

Hans

SaswatPadhi commented 3 years ago

This issue still persists in R4.1

github-actions[bot] commented 1 year ago

This issue is being closed because:

If anyone believes that this issue should be reopened and reassigned to an active milestone, please leave a brief comment. (For example, if a bug still affects Qubes OS 4.1, then the comment "Affects 4.1" will suffice.)

ambdroid commented 11 months ago

Affects 4.1.2, though with a different error

[amber@dom0 ~]$ qvm-create --label red test
[amber@dom0 ~]$ qvm-device mic attach --persistent test dom0:mic
Failed to attach audio input from dom0 to test: pulseaudio agent not running
[amber@dom0 ~]$ qvm-start test
[amber@dom0 ~]$ qvm-device mic attach --persistent test dom0:mic
[amber@dom0 ~]$ qvm-device mic detach test dom0:mic
Can not remove a persistent attachment from a non halted vm
[amber@dom0 ~]$ qvm-shutdown test
[amber@dom0 ~]$ qvm-device mic detach test dom0:mic
Failed to detach audio input from dom0 to test: pulseaudio agent not running
ben-grande commented 8 months ago

Affects R4.2 with the same error message from Dom0. I am using a custom debian-12-minimal based disposable sys-audio and trying to attach the microphone to the audio client personal-signal.

I have turned off the client domain with the microphone attached and I believe this is causing the error, although I couldn't get the mic to work before anyway, so not sure.


After restarting sys-audio and the audio client, the device can be attached again, although mic is not working. Audio client journal when trying to record audio with Signal Desktop:

pipewire[569]: mod.qubes-audio: Underrun: asked to read 940 bytes but only 0 available

Volume output works, but input doesn't.