Cannot Change VM Keyboard Layout in 4.1

Previously, in 4.0 when I changed dom0 keyboard layout, the vm keyboard layout would also change (if its window was focused).

Now in 4.1, I am unable to change keyboards in VMs from dom0 at all. This both applies to changing from English to Arabic (for example), and to VMs realizing that I have swapped escape and caps lock.

Additionally, I cannot change VM keyboard layouts from the qube-manager, it tells me to “update the qube dev or its template to the newest version of Qubes tools.” I don’t know why this would be the case though, I am using the default fedora-33 template & have installed all available updates.

Any help would be appreciated!

setxkbmap keyboard_layout (from every VM or from template)
install packages “ibus” on template and use it’s notification gui to change layout

1 Like

while using pimary an english layout, i sometimes compose things in german and need my precious umlauts. in 4.0 i used the Left Win (while pressed) option and was able to use any layout i adjusted in dom0 as long as i rebooted the domU after. is this maybe just a policy thing i need to reenable?

Not sure if completely related, but check this out:

the setxkbmap de helps my quiet good then i’ll have a german qube, compartmentalizing languages now too :smiley:

I get the mentioned System Dialog as well and dont know what else qubes Package I should install, but there is no qubes-tools package.

so far i had the option of designated while key press switch option and with 4.1 i dont :frowning:

I installed 4.1 with Debian 11 as default. During the install, I chose languages A and B, and removed English. But only language A was accessible after install.

I unchecked “use system defaults” in Keyboard > Layout. Both languages appear. But language B was not accessible when attempting to switch. I tried setxkbmap and my system now is messed up with English returned in some VMs. Now I am typing this an English keyboard layout that I cannot change to A or to B.

I couldn’t find a proper guideline on how to use multiple non-English keyboard layouts homogeneously across Dom0, normal and minimal Debian VMs.

Can anyone help?

See also: Keyboard layout issue and 4.1 Beta : Keyboard layout choosen during install not applied correctly once installed.

yes indeed I read the various posts on this forum about keyboard layout change. But none provide a solution (or at least none provide a solution that I was able to understand :grinning:) I installed ibus in one of the VMs, and it’s till a mess. I chose languages A and B in ibus settings, but it currently gives me A and English.

What are “qubes-tools”???
Why does this error box appear?
Why there is a function (to change the keyboard layout) which is ‘without function’? (it worked in the past)
Or is it a global issue qubes team is working on?

I too can not change the keyboard layout.

If you use xfce you can change the layout in system tools > keyboard > layout

that would be nice, but it’s an old problem, that I could not solve. In settings I have the layout I need, but it has NO effect on the layout. So somehow there are some external keyboard problems in qubes.

setxkbmap de in the VM has also no effect.

1 Like

having the same problem,

still no idea to solve this issue?
If I want to change keyboard layout via right click on the VM and choosing “Keyboard layout”, I get “Please update the qube XYZ or its template for the newest version of Qubes tools”

???

You probably should create an Issue.

I created keyboard.sh in /etc/profile.d in the TemplateVM with setxkbmap -layout "de" -option "grp:win_space_toggle", shut down, restarted the AppVM, but had no effect on the attached USB-Keyboard. If I attach usb keyboard it jumps to the us layout or something like this. Does it have something to do with the sys-usb or dom0 (there I have german layout for the whole system).

So the attached keyboard crashes the keyboard layout within the VM it attached to and make always us layout.

I’m really not sure what is causing your issue, but a couple of things to try:

  1. Make sure you have the same setxkbmap line in the same place on both dom0 and the TemplateVM.
  2. Try hitting Meta + Space - does that switch the keyboard layout?

If those things don’t work, you may have the issue that setxkbmap is not having an effect for keyboards that are plugged in later. So you may have to find a way to run setxkbmap -layout "de" every time the keyboard is plugged in.

The simplest way to do that would be to run that command manually (after the 1st time, you can type Ctrl + r to search for previous commands and start typing setxkbmap). But as you can see in the linked question, there are ways to automate it.

Google or ChatGPT may also have pointers.

So I created keyboard.sh in /etc/profile.d in the dom0 with setxkbmap -layout "de" -option "grp:win_space_toggle"
…but the issue stays.

ah… if I open terminal in the appVM (or the templateVM) I get "bash: setxkbmap: command not found.
BUT… if I ‘setxkbmap -layout “de”’ now in the dom0. I get ther german layout in the VM!

The same process in another VM had no effect…maby because of the minimal Template

Try asking ChatGPT:

sudo dnf install xkeyboard-config

You could run that in the TemplateVM or, ideally, append the appropriate lines to ~/fs/srv/salt/keyboard.sls if you followed the steps in my linked post exactly:

my-pkgs:
  pkg.installed:
    - pkgs:
      - xkeyboard-config

I imagine getting that installed will solve your issue.

Take everything ChatGPT says with a grain of salt (it can produce very convincing but totally wrong answers), but it is good at coming up with ideas and even exact code to solve your issues.

thanks, I’ll try it, but why is it so complicated for its such a standard feature, to attach a usb keyboard??