foxlet / macOS-Simple-KVM

Tools to set up a quick macOS VM in QEMU, accelerated by KVM.
13.66k stars 1.14k forks source link

Keyboard debounce (repeating keystrokes) #466

Open shplack opened 3 years ago

shplack commented 3 years ago

Keyboard debounce

The keyboard inputs multiple keystrokes at one keystroke. It is possible to control the amount of keystrokes by pressing a key extremely quickly. This makes it practically impossible to enter a password. This problem seems to mimic this post. I do not know if it is possible to translate the solution to macOS-Simple-KVM (nor do I have the know-how) This problem persists after initial installation throughout the OS. Another symptom seems to be the loading icon spins too quickly as demonstrated in this video.

basic.sh

#!/bin/bash

OSK="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VMDIR=$PWD
OVMF=$VMDIR/firmware
#export QEMU_AUDIO_DRV=pa
#QEMU_AUDIO_DRV=pa

qemu-system-x86_64 \
    -enable-kvm \
    -m 8G \
    -machine q35,accel=kvm \
    -smp 8,cores=4 \
    -cpu Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc \
    -device isa-applesmc,osk="$OSK" \
    -smbios type=2 \
    -drive if=pflash,format=raw,readonly,file="$OVMF/OVMF_CODE.fd" \
    -drive if=pflash,format=raw,file="$OVMF/OVMF_VARS-1024x768.fd" \
    -vga qxl \
    -device ich9-intel-hda -device hda-output \
    -usb -device usb-kbd -device usb-tablet \
    -netdev user,id=net0 \
    -device e1000-82545em,netdev=net0,id=net0,mac=52:54:00:c9:18:27 \
    -device ich9-ahci,id=sata \
    -drive id=ESP,if=none,format=qcow2,file=ESP.qcow2 \
    -device ide-hd,bus=sata.2,drive=ESP \
    -drive id=InstallMedia,format=raw,if=none,file=BaseSystem.img \
    -device ide-hd,bus=sata.3,drive=InstallMedia \
    -drive id=SystemDisk,if=none,file=MacOS.qcow2 \
    -device ide-hd,bus=sata.4,drive=SystemDisk \
$ uname -r
5.10.16.3-microsoft-standard-WSL2
$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal

P.S.

This project works completely fine on my laptop running the same configuration.

yavincl commented 3 years ago

I honestly have no idea what's going on here, do you think it could be related to Windows Subsystem for Linux?

shplack commented 3 years ago

I'm inclined to assume that it's at least a possibility. My surprise comes from the fact that my laptop is running the same build but does not have the same problem. I have also wondered if this problem isn't explicitly caused by keyboard issues, instead ultimately some other internal flaw.

Den fre 28 maj 2021 19:32yagoplx @.***> skrev:

I honestly have no idea what's going on here, do you think it could be related to Windows Subsystem for Linux?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/foxlet/macOS-Simple-KVM/issues/466#issuecomment-850566647, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO2CKVQ5WB2YXYGCJQ6HUXLTP7HRPANCNFSM45TXMICQ .

shplack commented 3 years ago

I had an idea that it might have something to do with the virtualization drivers because that seems to be the only other difference between my laptop and. Using an RTX 2070 FE on my desktop with 470.14_gameready_win10-dch_64bit_international driver. My laptop is using the integrated Intel GPU with the driver posted in the repo. I've tried downgrading the GPU driver, but to no avail. The only thing left to try to remove the GPU in order to use the integrated graphics processor from the Intel CPU in my desktop PC.