UTM
UTM copied to clipboard
keyboard not working on Plan 9 4th release
Describe the issue
The keyboard does not work when booting the Plan 9 ISO image (downloaded here; direct link) for the first time. The OS asks to choose whether to install or boot (see screenshot) but none can be chosen because the keyboard does not work.
Before asking to choose an action to perform, it says
Plan 9 from Bell Labsi8042: kbdinit failed
I also tried to switch from Standard PC (Q35 + ICH9, 2009) (alias of pc-935-7.2) (q35) to Standard PC (i440FX + PIIX, 1996) (default) (pc-i440fx-7.2) but the issue persists.
Configuration
- UTM Version: 4.1.6 (75)
- macOS Version: 13.3.1 (22E261)
- Mac Chip: M2
Crash log
(no crash)
Debug log
Upload VM
Has anybody looked into this, so far? Any update?
I tried looking at the Plan 9 source code (especially this file, since it contains the error message visible on boot) but it uses low level motherboard interfaces like BIOS and i8042, which I don't know enough to accurately tell what the code is doing and draw any conclusion.
I saw that there has been huge changes with the last UTM update (v4.3.5 as of now). However, the issue still persists.
I tried invoking QEMU (only QEMU, without UTM) using the system shell with the following command:
qemu-system-x86_64 \
-m 2G \
-smp 2 \
-hda /Users/user/Library/Containers/com.utmapp.UTM/Data/Documents/Plan\ 9.utm/Data/0D417984-7CA1-4580-81CC-6D3B0FFD1375.qcow2 \
-boot d \
-cdrom ~/iso/plan9.iso \
-vga std
and I could type without any issue.
I looked further into this and I found out that the issue is caused by the argument selected in the screenshot below.
If I add the argument -device usb-kbd,bus=usb-bus.0 when manually invoking qemu-system-x86_64, it disables the keyboard. If I remove that argument and run the same command again, the keyboard works. -usbdevice keyboard breaks the keyboard as well.
It would be nice if the users were allowed to remove one or more of the default QEMU arguments so that UTM could be used even in these cases.
I have the same issue with Mavericks. I can only get the mouse working if I force the PS/2 controller and pause the machine for more than 5 seconds. The keyboard does not work even forcing the PS/2 controller. In Snow Leopard both work fine without forcing:
sudo ./pcitree.sh#=========================================================================================
┬[0000:00]
├─00:00.0 # [8086:29c0] [060000] Host bridge : Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller
├─00:01.0 # [8086:100e] [020000] (rev 03) Ethernet controller : Intel Corporation 82540EM Gigabit Ethernet Controller
├─00:02.0 # [1af4:1050] [030000] (rev 01) VGA compatible controller [VGA controller] : Red Hat, Inc. Virtio 1.0 GPU
├─00:03.0 # [8086:293a] [0c0320] (rev 03) USB controller [EHCI] : Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1
├─00:04.0 # [8086:2934] [0c0300] (rev 03) USB controller [UHCI] : Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1
├─00:05.0 # [8086:2935] [0c0300] (rev 03) USB controller [UHCI] : Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2
├─00:06.0 # [8086:2936] [0c0300] (rev 03) USB controller [UHCI] : Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3
├─00:07.0 # [1af4:1003] [078000] Communication controller : Red Hat, Inc. Virtio console
├─00:08.0 # [1af4:1005] [00ff00] Unclassified device : Red Hat, Inc. Virtio RNG
├─00:09.0 # [1af4:1002] [00ff00] Unclassified device : Red Hat, Inc. Virtio memory balloon
├─00:1d.0 # [8086:2934] [0c0300] (rev 03) USB controller [UHCI] : Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1
├─00:1d.1 # [8086:2935] [0c0300] (rev 03) USB controller [UHCI] : Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2
├─00:1d.2 # [8086:2936] [0c0300] (rev 03) USB controller [UHCI] : Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3
├─00:1d.7 # [8086:293a] [0c0320] (rev 03) USB controller [EHCI] : Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1
├─00:1f.0 # [8086:2918] [060100] (rev 02) ISA bridge : Intel Corporation 82801IB (ICH9) LPC Interface Controller
├─00:1f.2 # [8086:2922] [010601] (rev 02) SATA controller [AHCI 1.0] : Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode]
└─00:1f.3 # [8086:2930] [0c0500] (rev 02) SMBus : Intel Corporation 82801I (ICH9 Family) SMBus Controller
I read here:
args: -device isa-applesmc,osk="THE-OSK-YOU-EXTRACTED-GOES-HERE" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -global nec-usb-xhci.msi=off -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off A USB keyboard is added here because macOS doesn’t support QEMU’s default PS/2 keyboard.
It would be great if devices could be added/removed on demand.
What I discovered is that I can get the mouse and keyboard attached the VM if I disable the Hypervisor in the UTM settings on my Intel MacBookPro with -usbdevice keyboard enabled. The Hypervisor works fine for 10.6.8, but not for Mavericks guest.
Similar experience here, trying 9front. Starting qemu on the CLI with minimal options works just fine, but I can't get it to work under UTM.
I got this working in Mojave and Catalina:
-usb \
-device usb-ehci,id=ehci \
-device usb-tablet,bus=usb-bus.0 \
-device usb-kbd,bus=usb-bus.0 \