No keyboard? #270

Open
opened 2025-12-29 05:26:17 +01:00 by adam · 9 comments
Owner

Originally created by @corwin-of-amber on GitHub (Nov 5, 2021).

Full disclosure: I am accessing X11 over VNC because my system (an Intel Xeon server) does not have a physical keyboard/mouse/display.

When entering the bootloader, neither keyboard nor mouse have any effect. Once the wait timer expires and the base system boots, I have mouse but no keyboard. I can complete the system setup using the accessibility keyboard and it works fine. The installed system also has mouse but no keyboard.

Any magical QEMU args that can help in this case?


uname -a
; echo "${DISPLAY}"
; echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs
; grep NAME /etc/os-release
; df -h .
; qemu-system-x86_64 --version
; libvirtd --version
; free -mh
; nproc
; egrep -c '(svm|vmx)' /proc/cpuinfo
; ls -lha /dev/kvm
; ls -lha /tmp/.X11-unix/
; ps aux | grep dockerd
; docker ps | grep osx
; grep "docker|kvm|virt" /etc/group

Linux knuth 4.19.0-17-amd64 #1 SMP Debian 4.19.194-3 (2021-07-18) x86_64 GNU/Linux

1
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_CODENAME=buster
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       807G  410G  360G  54% /
QEMU emulator version 3.1.0 (Debian 1:3.1+dfsg-8+deb10u8)
Copyright (c) 2003-2018 Fabrice Bellard and the QEMU Project developers
libvirtd (libvirt) 5.0.0
              total        used        free      shared  buff/cache   available
Mem:          503Gi       8.9Gi       367Gi       660Mi       127Gi       490Gi
Swap:          73Gi       484Mi        72Gi
128
128
crw-rw-rw- 1 root kvm 10, 232 Nov  4 19:02 /dev/kvm
total 28K
drwxrwxrwt  2 root       root         4.0K Oct  6 16:00 .
drwxrwxrwt 25 root       root          20K Nov  4 19:02 ..
srwxrwxrwx  1 shachari   domain^users    0 Oct  6 16:00 X1
srwxrwxrwx  1 guest-9530 guest-9530      0 Oct  6 15:58 X10
root      97428  0.0  0.0   9468  2504 pts/6    S+   19:04   0:00 grep dockerd
root     100305  0.5  0.0 14093556 152808 ?     Ssl  Nov03  13:23 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
c38c33e95f9c   sickcodes/docker-osx:latest   "/bin/bash -c 'sudo …"   2 minutes ago   Up 2 minutes   0.0.0.0:50922->10022/tcp, :::50922->10022/tcp   busy_curie
kvm:x:106:
docker:x:997:shachari,guest-9530
libvirt:x:130:
libvirt-qemu:x:64055:libvirt-qemu
Originally created by @corwin-of-amber on GitHub (Nov 5, 2021). Full disclosure: I am accessing X11 over VNC because my system (an Intel Xeon server) does not have a physical keyboard/mouse/display. When entering the bootloader, neither keyboard nor mouse have any effect. Once the wait timer expires and the base system boots, I have mouse but no keyboard. I can complete the system setup using the accessibility keyboard and it works fine. The installed system also has mouse but no keyboard. Any magical QEMU args that can help in this case? --- uname -a \ ; echo "${DISPLAY}" \ ; echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs \ ; grep NAME /etc/os-release \ ; df -h . \ ; qemu-system-x86_64 --version \ ; libvirtd --version \ ; free -mh \ ; nproc \ ; egrep -c '(svm|vmx)' /proc/cpuinfo \ ; ls -lha /dev/kvm \ ; ls -lha /tmp/.X11-unix/ \ ; ps aux | grep dockerd \ ; docker ps | grep osx \ ; grep "docker\|kvm\|virt" /etc/group ``` Linux knuth 4.19.0-17-amd64 #1 SMP Debian 4.19.194-3 (2021-07-18) x86_64 GNU/Linux 1 PRETTY_NAME="Debian GNU/Linux 10 (buster)" NAME="Debian GNU/Linux" VERSION_CODENAME=buster Filesystem Size Used Avail Use% Mounted on /dev/sda1 807G 410G 360G 54% / QEMU emulator version 3.1.0 (Debian 1:3.1+dfsg-8+deb10u8) Copyright (c) 2003-2018 Fabrice Bellard and the QEMU Project developers libvirtd (libvirt) 5.0.0 total used free shared buff/cache available Mem: 503Gi 8.9Gi 367Gi 660Mi 127Gi 490Gi Swap: 73Gi 484Mi 72Gi 128 128 crw-rw-rw- 1 root kvm 10, 232 Nov 4 19:02 /dev/kvm total 28K drwxrwxrwt 2 root root 4.0K Oct 6 16:00 . drwxrwxrwt 25 root root 20K Nov 4 19:02 .. srwxrwxrwx 1 shachari domain^users 0 Oct 6 16:00 X1 srwxrwxrwx 1 guest-9530 guest-9530 0 Oct 6 15:58 X10 root 97428 0.0 0.0 9468 2504 pts/6 S+ 19:04 0:00 grep dockerd root 100305 0.5 0.0 14093556 152808 ? Ssl Nov03 13:23 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock c38c33e95f9c sickcodes/docker-osx:latest "/bin/bash -c 'sudo …" 2 minutes ago Up 2 minutes 0.0.0.0:50922->10022/tcp, :::50922->10022/tcp busy_curie kvm:x:106: docker:x:997:shachari,guest-9530 libvirt:x:130: libvirt-qemu:x:64055:libvirt-qemu ```
Author
Owner

@corwin-of-amber commented on GitHub (Nov 5, 2021):

I also get these two warnings from QEMU:

qemu-system-x86_64: warning: dbind: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-UuQKstkMVu: Connection refused
qemu-system-x86_64: warning: Unknown X11 keycode mapping '<null>'.
@corwin-of-amber commented on GitHub (Nov 5, 2021): I also get these two warnings from QEMU: ``` qemu-system-x86_64: warning: dbind: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-UuQKstkMVu: Connection refused qemu-system-x86_64: warning: Unknown X11 keycode mapping '<null>'. ```
Author
Owner

@corwin-of-amber commented on GitHub (Nov 5, 2021):

I have noticed that some user with the same problem with VNC had more luck with rdp. Indeed, I can confirm that this works in an rdp session, at least I do have a keyboard now. So, probably more of a QEMU+VNC problem than a problem with Docker-OSX, but perhaps if you know how to work around that, it would be helpful to put that info in "Troubleshooting".

@corwin-of-amber commented on GitHub (Nov 5, 2021): I have noticed that some user with the same problem with VNC had more luck with rdp. Indeed, I can confirm that this works in an rdp session, at least I do have a keyboard now. So, probably more of a QEMU+VNC problem than a problem with Docker-OSX, but perhaps if you know how to work around that, it would be helpful to put that info in "Troubleshooting".
Author
Owner

@sickcodes commented on GitHub (Nov 15, 2021):

At the boot loader only the arrow keys and enter key are relevant.

@sickcodes commented on GitHub (Nov 15, 2021): At the boot loader only the arrow keys and enter key are relevant.
Author
Owner

@sickcodes commented on GitHub (Nov 15, 2021):

But this is interesting. Does the mouse work?

@sickcodes commented on GitHub (Nov 15, 2021): But this is interesting. Does the mouse work?
Author
Owner

@corwin-of-amber commented on GitHub (Nov 15, 2021):

The mouse does not work in the boot loader; but that also does not work in rdp. Once the installer starts, the mouse does work, in VNC as well, but not the keyboard. I can do everything with the virtual keyboard, as long as I turn it on in Accessibility (and before the first reboot, otherwise the lock screen is up with no way to enter the password, heh heh).

This seems to be related to the VNC protocol: it seems that, by default, the VNC client and server communicate by exchanging X events, and the clients scancodes are not present in the communication layer. An extension to the protocol exists that sends the scancodes as well, but I have not found how this can be configured in the client/server/both.

This is worth investigating, but it seems less and less related to Docker-OSX or OSX-KVM, and more of a general integration problem between QEMU and VNC. Perhaps you should just add it to the FAQ that VNC is not recommended because of this issue, but rdp works fine.

@corwin-of-amber commented on GitHub (Nov 15, 2021): The mouse does not work in the boot loader; but that also does not work in rdp. Once the installer starts, the mouse does work, in VNC as well, but not the keyboard. I can do everything with the virtual keyboard, as long as I turn it on in Accessibility (and before the first reboot, otherwise the lock screen is up with no way to enter the password, heh heh). This seems to be related to the VNC protocol: it seems that, by default, the VNC client and server communicate by exchanging X events, and the clients scancodes are not present in the communication layer. An extension to the protocol exists that sends the scancodes as well, but I have not found how this can be configured in the client/server/both. This is worth investigating, but it seems less and less related to Docker-OSX or OSX-KVM, and more of a general integration problem between QEMU and VNC. Perhaps you should just add it to the FAQ that VNC is not recommended because of this issue, but rdp works fine.
Author
Owner

@sickcodes commented on GitHub (Nov 28, 2021):

X is very slow compared to VNC thru native QEMU

Mouse is known to never work during bootloader btw, however I have just learnt this will add the keyboard back in: device_add usb-tablet

@sickcodes commented on GitHub (Nov 28, 2021): X is very slow compared to VNC thru native QEMU Mouse is known to never work during bootloader btw, however I have just learnt this will add the keyboard back in: `device_add usb-tablet`
Author
Owner

@corwin-of-amber commented on GitHub (Nov 29, 2021):

Do you mean type it in the QEMU monitor prompt?
Because I see this in my startup script: -device usb-tablet, perhaps it is not the same and perhaps I did not try VNC again since adding it because I thought it only has to do with the mouse.

@corwin-of-amber commented on GitHub (Nov 29, 2021): Do you mean type it in the QEMU monitor prompt? Because I see this in my startup script: `-device usb-tablet`, perhaps it is not the same and perhaps I did not try VNC again since adding it because I thought it only has to do with the mouse.
Author
Owner

@corwin-of-amber commented on GitHub (Nov 29, 2021):

BTW your -vga vmware saved my life on OSX-KVM, I was ripping my hair out trying to figure out why the resolution was so high with their default -device VGA,vgamem_mb=128 even though it was using OVMF_VARS-1024x768.fd.

@corwin-of-amber commented on GitHub (Nov 29, 2021): BTW your `-vga vmware` saved my life on OSX-KVM, I was ripping my hair out trying to figure out why the resolution was so high with their default `-device VGA,vgamem_mb=128` even though it _was_ using `OVMF_VARS-1024x768.fd`.
Author
Owner

@RubensRainelli commented on GitHub (Aug 8, 2024):

I'm facing the same issue but IDK how to set -device usb-tablet or at least where to do it...
Still googling from one hour.

@RubensRainelli commented on GitHub (Aug 8, 2024): I'm facing the same issue but IDK how to set `-device usb-tablet` or at least where to do it... Still googling from one hour.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX-sickcodes#270