Docker-OSX
Docker-OSX copied to clipboard
No mouse control when trying to run preinstalled catalina
❯ 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 manjaro 6.1.85-1-MANJARO #1 SMP PREEMPT_DYNAMIC Wed Apr 10 20:05:44 UTC 2024 x86_64 GNU/Linux :1 1 NAME="Manjaro Linux" PRETTY_NAME="Manjaro Linux" Filesystem Size Used Avail Use% Mounted on /dev/mapper/luks-c63ed8cc-789d-4a83-bae1-a63c1254d646 1,8T 1,3T 396G 78% / QEMU emulator version 8.2.2 Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers libvirtd (libvirt) 10.1.0 total used free shared buff/cache available Mem: 125Gi 43Gi 4,9Gi 1,8Gi 80Gi 82Gi Swap: 17Gi 1,2Mi 17Gi 24 egrep: warning: egrep is obsolescent; using grep -E 24 Permissions Size User Date Modified Name crw-rw-rw- 10,232 root 7 maj 18:43 /dev/kvm Permissions Size User Date Modified Name srwxrwxrwx 0 root 3 maj 14:14 X0 srwxr-xr-x 0 niedzwiedz 5 maj 11:22 X1 root 5487 0.1 0.0 3992344 94400 ? Ssl maj03 6:31 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock niedzwi+ 728779 0.0 0.0 9112 2560 pts/20 S+ 19:02 0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox dockerd 1d55b7d69195 sickcodes/docker-osx:auto "/bin/bash -c 'echo …" 45 seconds ago Up 45 seconds 0.0.0.0:50922->10022/tcp, :::50922->10022/tcp upbeat_williamson kvm:x:992:libvirt-qemu,qemu,niedzwiedz docker:x:973:niedzwiedz libvirt:x:959:niedzwiedz libvirt-qemu:x:956:
the mouse cursor is displayed but I'm unable to move it... keyboard seems to work
I'm noticing this as well.
@samuelzurowski have you found any solution? are you on wayland by any chance?
same here, archlinux on wayland + sway.
I just tried with Xorg as well and same issue.
% uname -a
Linux brioche 6.8.9-arch1-2 #1 SMP PREEMPT_DYNAMIC Tue, 07 May 2024 21:35:54 +0000 x86_64 GNU/Linux
@samuelzurowski have you found any solution? are you on wayland by any chance?
I ended up just using the vnc version of the container and preinstalled it. I do not use wayland.
Same issue. Happened to me when I swapped from the :latest
tag to the :naked
tag after extracting my image. Changing the RAM
env variable did not help. Keyboard works during the boot selection screen, but not on the login screen. Possibly the same issue as #765 ?
Edit: Over VNC for my case. The machine running the container is headless.
I had the same issue. I found a solution:
- Make sure you have terminal access to your container.
docker exec -it [container id] bash
- edit Launch.sh
vim Launch.sh
- replace the lines:
-device qemu-xhci,id=xhci \ -device usb-kbd,bus=xhci.0 -device usb-tablet,bus=xhci.0 \
with:-usb -device usb-kbd -device usb-tablet \
- restart your container.
basically reverting this commit: https://github.com/sickcodes/Docker-OSX/commit/756a1c03b928989f7841f1276ce7bd70e8772834#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557L200
Thanks @gilelias ! The solution worked for me.
Thanks @gilelias! This solution works for me as well! I'm wondering why @sickcodes made the change in https://github.com/sickcodes/Docker-OSX/commit/756a1c03b928989f7841f1276ce7bd70e8772834#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557L200
Can anyone confirm if mouse doesn't work on Big Sur or later? Is only Catalina (and below) the version which had the mouse issue from the change I made?
I had the same issue. I found a solution:
- Make sure you have terminal access to your container.
docker exec -it [container id] bash
- edit Launch.sh
vim Launch.sh
- replace the lines:
-device qemu-xhci,id=xhci \ -device usb-kbd,bus=xhci.0 -device usb-tablet,bus=xhci.0 \
with:-usb -device usb-kbd -device usb-tablet \
- restart your container.
basically reverting this commit: 756a1c0#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557L200
Thank you @gilelias, your approach fixes the problem.
For those compiling Docker-OSX directly using the docker-compose.yml
file at the root of the project. Here's the patch that fixed it for me, based on @gilelias comment:
diff --git a/Dockerfile b/Dockerfile
index e8d51f6..ce6c3b7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -202,8 +202,9 @@ RUN touch Launch.sh \
&& tee -a Launch.sh <<< '-cpu ${CPU:-Penryn},${CPUID_FLAGS:-vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check,}${BOOT_ARGS} \' \
&& tee -a Launch.sh <<< '-machine q35,${KVM-"accel=kvm:tcg"} \' \
&& tee -a Launch.sh <<< '-smp ${CPU_STRING:-${SMP:-4},cores=${CORES:-4}} \' \
- && tee -a Launch.sh <<< '-device qemu-xhci,id=xhci \' \
- && tee -a Launch.sh <<< '-device usb-kbd,bus=xhci.0 -device usb-tablet,bus=xhci.0 \' \
+ #&& tee -a Launch.sh <<< '-device qemu-xhci,id=xhci \' \
+ #&& tee -a Launch.sh <<< '-device usb-kbd,bus=xhci.0 -device usb-tablet,bus=xhci.0 \' \
+ && tee -a Launch.sh <<< '-usb -device usb-kbd -device usb-tablet \' \
&& tee -a Launch.sh <<< '-device isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal\(c\)AppleComputerInc \' \
&& tee -a Launch.sh <<< '-drive if=pflash,format=raw,readonly=on,file=/home/arch/OSX-KVM/OVMF_CODE.fd \' \
&& tee -a Launch.sh <<< '-drive if=pflash,format=raw,file=/home/arch/OSX-KVM/OVMF_VARS-1024x768.fd \' \
diff --git a/Dockerfile.monterey b/Dockerfile.monterey
old mode 100644
new mode 100755