mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2026-01-11 21:10:25 +01:00
QEMU Docker OSX, Mouse always not working after running 2 minutes #504
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ikhsansdqq on GitHub (Jun 5, 2023).
OS related issued, please help us identify the issue by posting the output of this
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
Hi Guys, just want to ask question regarding the mouse is not working after 2 minutes, suddenly when running QEMU it looks fine for the first minute but after 2 minutes, it made my mouse not working I don't know why, I can't type, can't click or whatsoever. Any idea how to fix this issue guys? (I'm running docker OSX on Windows 11 22H2)
@prodbyola commented on GitHub (Jul 22, 2023):
I'm facing somewhat similar issue. DId you fix this?
@marcucio commented on GitHub (Jan 3, 2024):
same issue here
@shawe commented on GitHub (Feb 9, 2024):
same here
@atiqsamtia commented on GitHub (Apr 4, 2024):
Same issue here, only mouse & keyboard not working. I can see the screen updating and it confirms the OS is running fine and doing processing but won't accept any inputs
@atiqsamtia commented on GitHub (Apr 5, 2024):
This is how I solved this issue.
It is related to Linux dedicating so much RAM to
buff/cacheand not enough RAM is remaining for macOS to function properly.For example in my case, I have a total of 15GB of RAM allocated to WSL and I assigned 12GB of RAM to the docker container of macOS. Whenever I first booted up the macOS it worked fine but quickly
buff/cacheusage reached around 8GB and free memory went to around 100MB that's where input get stuck. I tried many things and now my OS is working without those issues.This is my RAM info now
free -mh. Before my optimizations, thefreepart was going to 100MB and crashing macOS.Here's what I did.
Changed my macOS container RAM to 8GB
-e RAM=8add
to
.wslconfigCreated a script and added it to cronjob to clear buff/cache every minute so the free RAM stays within the useable range of macOS.
Create a script to clear the cache. Let's name it
clear_cache.shmake it executable
chmod +x clear_cache.shAdd to root user cron by
sudo crontab -eaccept new file creation if already does not exist.Put the corn command to cron file.
And now start the container. I kept it running for a couple of hours to install and configure Xcode, flutter, IntelliJ Idea and it did not get stuck.
Maybe @sickcodes can add a script to the container to utilize the RAM well so Linux kernel does not allocate free RAM to buff/cache. Maybe reserve the RAM?
Now figuring out
Command Keypass through to QEMU.Maybe helpful for #191 & #218