qubes-issues icon indicating copy to clipboard operation
qubes-issues copied to clipboard

Conflict for input-proxy between sys-audio and sys-usb

Open ptitdoc opened this issue 3 weeks ago • 3 comments

Qubes OS release

Qubes 4.3 Templates only based on debian-13-xfce

Brief summary

I have a strange conflicts between my sys-audio and sys-usb vms when I attach a new keyboard.

Here is the logs from dom0:

déc. 04 08:58:03 dom0 widget-wrapper[16222]: Traceback (most recent call last):
déc. 04 08:58:03 dom0 widget-wrapper[16222]:   File "/usr/lib/python3.13/site-packages/qubesadmin/events/__init__.py", line 294, in handle
déc. 04 08:58:03 dom0 widget-wrapper[16222]:     handler(subject, event, **kwargs)
déc. 04 08:58:03 dom0 widget-wrapper[16222]:     ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
déc. 04 08:58:03 dom0 widget-wrapper[16222]:   File "/usr/lib/python3.13/site-packages/qui/devices/device_widget.py", line 262, in device_added
déc. 04 08:58:03 dom0 widget-wrapper[16222]:     dev = backend.Device(device, self)
déc. 04 08:58:03 dom0 widget-wrapper[16222]:   File "/usr/lib/python3.13/site-packages/qui/devices/backend.py", line 156, in __init__
déc. 04 08:58:03 dom0 widget-wrapper[16222]:     for interface in dev.interfaces:
déc. 04 08:58:03 dom0 widget-wrapper[16222]:                      ^^^^^^^^^^^^^^
déc. 04 08:58:03 dom0 widget-wrapper[16222]: AttributeError: 'VirtualDevice' object has no attribute 'interfaces'
déc. 04 08:58:04 dom0 qrexec-policy-daemon[14496]: warning: !compat-4.0 directive in file /etc/qubes/policy.d/35-compat.policy line 16 is transitional and will be deprecated
déc. 04 08:58:04 dom0 qrexec-policy-daemon[14496]: qrexec: admin.vm.device.usb.Available+: sys-audio -> sys-usb: allowed to sys-usb

In addition to the VirtualDevice error, I had to add a policy to allow admin.vm.device.usb.Available from sys-audio to sys-usb in order to be able to use my keyboard, which is strange to me.

Steps to reproduce

  • sys-usb has USB Controllers PCI attached and Thunderboldt NHI
  • sys-usb has minimal-usbvm service enabled
  • sys-audio has Audio controller PCI attached
  • sys-audio has pipewire, blueman, and audiovm services attached
  • sys-audio has bluetooth usb device attached as auto-attach rule

Expected behavior

I have a ask policy, so the input-proxy on sys-usb should trigger popup even if sys-audio is not allowed to use admin.vm.device.usb.Available right ?

Actual behavior

sys-audio request admin.vm.device.usb.Available for sys-usb, which is denied by default, and my keyboard is never working because of that.

ptitdoc avatar Dec 04 '25 08:12 ptitdoc

The above error looks unrelated to sys-audio, and it should be fixed already in https://github.com/QubesOS/updates-status/issues/6236 (https://github.com/QubesOS/qubes-core-admin-client/commit/c95a89c) Which version of python3-qubesadmin do you have? Have you restarted devices widget (or the whole user session) after that update?

marmarek avatar Dec 04 '25 11:12 marmarek

I'm running python3-qubesadmin 4.3.24. I will wait for the update, it's probably in testing right now.

ptitdoc avatar Dec 05 '25 09:12 ptitdoc

I just upgraded my debian 12 template to testing.

For now I don't see the crash dump anymore in dom0, but I still have the qubes policy request. It occurs when I attach the bluetooth usb device to sys-audio:

déc. 09 09:03:41 dom0 qrexec-policy-daemon[3037]: qrexec: admin.vm.feature.CheckWithTemplate+audio-model: sys-audio -> sys-whonix: allowed to dom0
déc. 09 09:03:41 dom0 qrexec-policy-daemon[3037]: qrexec: admin.vm.feature.CheckWithTemplate+audio-model: sys-audio -> sys-whonix: allowed to dom0
déc. 09 09:03:41 dom0 qrexec-policy-daemon[3037]: qrexec: admin.vm.feature.CheckWithTemplate+audio: sys-audio -> work: allowed to dom0
déc. 09 09:03:41 dom0 qrexec-policy-daemon[3037]: qrexec: admin.vm.feature.CheckWithTemplate+audio-model: sys-audio -> work: allowed to dom0
déc. 09 09:03:41 dom0 qrexec-policy-daemon[3037]: qrexec: admin.vm.feature.CheckWithTemplate+audio-model: sys-audio -> work: allowed to dom0
déc. 09 09:03:51 dom0 qrexec-policy-daemon[3037]: qrexec: qubes.GetDate+nanoseconds: sys-audio -> @default: allowed to dom0
déc. 09 09:04:50 dom0 qrexec-policy-daemon[3037]: qrexec: admin.vm.device.usb.Available+: sys-audio -> sys-usb: allowed to sys-usb
déc. 09 09:04:50 dom0 qrexec-policy-daemon[3037]: warning: !compat-4.0 directive in file /etc/qubes/policy.d/35-compat.policy line 16 is transitional and will be deprecated
déc. 09 09:04:50 dom0 qrexec-policy-daemon[3037]: qrexec: qubes.USB+3-10: sys-audio -> sys-usb: allowed to sys-usb
déc. 09 09:04:50 dom0 qubesd[2731]: WARNING: warning: !compat-4.0 directive in file /etc/qubes/policy.d/35-compat.policy line 16 is transitional and will be deprecated
déc. 09 09:04:50 dom0 qubesd[2731]: INFO: ignoring /etc/qubes-rpc/policy/include (not a file)
déc. 09 09:04:51 dom0 qubesd[2731]: WARNING: socket.send() raised exception.
déc. 09 09:04:51 dom0 qubesd[2731]: WARNING: socket.send() raised exception.
déc. 09 09:04:51 dom0 qubesd[2731]: WARNING: socket.send() raised exception.
déc. 09 09:04:51 dom0 qubesd[2731]: WARNING: socket.send() raised exception.
déc. 09 09:04:51 dom0 qubesd[2731]: WARNING: socket.send() raised exception.
déc. 09 09:04:51 dom0 qubesd[2731]: WARNING: socket.send() raised exception.
déc. 09 09:04:53 dom0 qrexec-policy-daemon[3037]: qrexec: admin.Events+: sys-audio -> dom0: allowed to dom0
déc. 09 09:04:54 dom0 qrexec-policy-daemon[3037]: warning: !compat-4.0 directive in file /etc/qubes/policy.d/35-compat.policy line 16 is transitional and will be deprecated
déc. 09 09:04:54 dom0 qrexec-policy-daemon[3037]: qrexec: admin.vm.List+: sys-audio -> dom0: allowed to dom0

More specifically this line is normally not permitted in typical sys-audio configuration (eg: using qubesctl):

déc. 09 09:04:50 dom0 qrexec-policy-daemon[3037]: qrexec: admin.vm.device.usb.Available+: sys-audio -> sys-usb: allowed to sys-usb

A last things I observed (maybe another issue) is an excessive qubes-input policy being triggered, too much things appears to be a keyboard, and even in some cases a standard keyboard triggers 3 qubes.InputKeyboard popups.

Sorry if I mix too much things in this issue...

ptitdoc avatar Dec 09 '25 08:12 ptitdoc