Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No mouse control when trying to run preinstalled catalina #766

Open
Niedzwiedzw opened this issue May 7, 2024 · 13 comments
Open

No mouse control when trying to run preinstalled catalina #766

Niedzwiedzw opened this issue May 7, 2024 · 13 comments

Comments

@Niedzwiedzw
Copy link

❯ 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:

@Niedzwiedzw Niedzwiedzw changed the title No mouse when trying to run preinstalled catalina No mouse control when trying to run preinstalled catalina May 7, 2024
@Niedzwiedzw
Copy link
Author

Niedzwiedzw commented May 7, 2024

the mouse cursor is displayed but I'm unable to move it... keyboard seems to work

@Niedzwiedzw
Copy link
Author

image

@samuelzurowski
Copy link

I'm noticing this as well.

@Niedzwiedzw
Copy link
Author

@samuelzurowski have you found any solution? are you on wayland by any chance?

@bgola
Copy link

bgola commented May 14, 2024

same here, archlinux on wayland + sway.

@bgola
Copy link

bgola commented May 14, 2024

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
Copy link

@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.

@wgetgoose
Copy link

wgetgoose commented Jun 4, 2024

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.

@gilelias
Copy link

gilelias commented Jun 9, 2024

I had the same issue.
I found a solution:

  1. Make sure you have terminal access to your container. docker exec -it [container id] bash
  2. edit Launch.sh vim Launch.sh
  3. 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 \
  4. restart your container.

basically reverting this commit:
756a1c0#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557L200

@erickne
Copy link

erickne commented Jun 11, 2024

Thanks @gilelias ! The solution worked for me.

@am1006
Copy link

am1006 commented Jul 15, 2024

Thanks @gilelias! This solution works for me as well! I'm wondering why @sickcodes made the change in 756a1c0#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557L200

@sickcodes
Copy link
Owner

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?

@VictorQueiroz
Copy link

I had the same issue. I found a solution:

  1. Make sure you have terminal access to your container. docker exec -it [container id] bash
  2. edit Launch.sh vim Launch.sh
  3. 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 \
  4. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants