Try completely removing the policy file at ‘/etc/qubes/policy.d/50-sys-audio.policy’ (don’t forget to copy it somewhere beforehand to restore later) and reboot the system to see if the layout switching works as it should.
In my case shutting down sys-audio does the trick, but sometimes it requires some time after it shut down. No idea what’s wrong about it.
Added an optional package, nice to configure noise cancellation etc…
For the keyboard layout issue, just tested with
“setxkbmap fr” → “setxkbmap us” → “setxkbmap fr” … No issue
But
“setxkbmap -layout fr,us -option grp:win_space_toggle” then using the keymap to switch layout, and that way it seems I have the issue described by nokke / qubinator.
But since I never use keyboard layout switch, didn’t motivated myself to investigate it yet
Same here. After having the policy in place keyboard switching becomes barely usable. Removing policy (sometime it requires reboot on top) helps to get the switching back to normal.
Some observations:
The switching in Dom0 is not affected by this issue
The switching sometimes somehow works, but requires 3-5 seconds to propagate. May sound really weird, but changing the focus to another VM manually, also helps sometimes to make it work.
The issue persists for both USB and laptop built-in keyboards.
Any ideas on how to troubleshoot it? Ready to try and test.
I don’t know how to fix the issue, but you can at least stop the layout change from breaking by patching the /usr/lib/python3.11/site-packages/qubesadmin/tools/qvm_start_daemon.py in dom0.
Create patch file in dom0 with this content:
At least now there is an easy way to reproduce the problem. There must be some issue with the policies file, perhaps the problem with the layout is just a symptom of a larger issue that is not so noticeable. There are mentions of keyboard layout issues in this thread from May 2, so it has been around for some time.
Perhaps it is difficult for people for whom English is a second or third language to draw attention to the problem on the English forum.
Same for me. Delay seems to be different every time.
@neowutran thanks for the guide. I have a Salt formula based on the same policy.
Audio qube is debian based. Audio clients can be Debian or Fedora based, depends on specific package names to include other distributions such as Archlinux, Gentoo etc.
It works with Bluetooth, advanced audio processing (Easyeffects), USB, Jack and built-in audio of course.
Thank you, if you need anything to apply and test, please let me know. The guide is awesome and I’d like to continue using sys-audio, but keyboard switching is another everyday necessity…
If you install packages in to your default template then you increase
the attack surface of all qubes using that template.
Some of these packages should already be installed in a vanilla template.
I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.
I have salt in GitHub - unman/shaker, and packaged from here
That’s an rpm that installs the state files and then runs an install,
setting up a caching proxy. Read the notes as it will make changes to
your templates.
If you need help with the install, let me know in a separate thread.
I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.
I have a USB bluetooth adapter that I want to use to attach my headphones/earbuds.
However, blueman can only connect to my bluetooth devices when it is run from my sys-usb qube. When I run blueman in the sys-audio qube it cannot connect.
Does this mean that the USB devices section of the troubleshooting applies?
If yes, how do I make an audio qube that is also a USB qube? I guess look up how to make a USB qube and then follow the above instructions?
It should work without restarting the service manually.
Maybe you have both pulseaudio and pipewire installed in your templates and it’s causing this issue?
What’s the output of this command in the qube with this issue?