Running on WSL2 and the keyboard or mouse got stuck during boot #283

Open
opened 2025-12-29 00:23:04 +01:00 by adam · 8 comments
Owner

Originally created by @chengjiaozyl on GitHub (Dec 3, 2021).

I have startup osx on win10 and wsl2(ubuntu subsystem), but after i run the docker command, like docker run .... sickcodes/docker-osx:latest, the x11 server got the gui output and showed in a window, after compiling, i could enter the boot menu, but usually, i got stuck and could not use mouse or keyboard anymore after i used the disk utility to erase a disk or i clicked the reinstall the mac os. Did it mean that any hardware on my pc could not handle this?

Originally created by @chengjiaozyl on GitHub (Dec 3, 2021). I have startup osx on win10 and wsl2(ubuntu subsystem), but after i run the docker command, like docker run .... sickcodes/docker-osx:latest, the x11 server got the gui output and showed in a window, after compiling, i could enter the boot menu, but usually, i got stuck and could not use mouse or keyboard anymore after i used the disk utility to erase a disk or i clicked the reinstall the mac os. Did it mean that any hardware on my pc could not handle this?
Author
Owner

@sickcodes commented on GitHub (Dec 3, 2021):

I also have experienced this, it's due to low ram

-e RAM=5

@sickcodes commented on GitHub (Dec 3, 2021): I also have experienced this, it's due to low ram -e RAM=5
Author
Owner

@tobatha commented on GitHub (Dec 5, 2021):

any luck with the mouse or keyboard functional? I ran into similar issue, during installation, unable to select Dist Utility or reinstall Big Sur @chengjiaozyl

@tobatha commented on GitHub (Dec 5, 2021): any luck with the mouse or keyboard functional? I ran into similar issue, during installation, unable to select Dist Utility or reinstall Big Sur @chengjiaozyl
Author
Owner

@MikeCoder96 commented on GitHub (Dec 5, 2021):

I haven't experience this situation.
I've used WSLg and it work great but not perfect, here a problem with WSLg
You can also use vnc to bypass this problem, just use -vnc :0 and connect via VNC Client

@MikeCoder96 commented on GitHub (Dec 5, 2021): I haven't experience this situation. I've used WSLg and it work great but not perfect, [here a problem with WSLg](https://github.com/microsoft/wslg/issues/583) You can also use vnc to bypass this problem, just use -vnc :0 and connect via VNC Client
Author
Owner

@chengjiaozyl commented on GitHub (Dec 6, 2021):

any luck with the mouse or keyboard functional? I ran into similar issue, during installation, unable to select Dist Utility or reinstall Big Sur @chengjiaozyl

just as sickcodes says, allocate more ram while start your container.

I also have experienced this, it's due to low ram

-e RAM=5
thanks, it works.

@chengjiaozyl commented on GitHub (Dec 6, 2021): > any luck with the mouse or keyboard functional? I ran into similar issue, during installation, unable to select Dist Utility or reinstall Big Sur @chengjiaozyl just as sickcodes says, allocate more ram while start your container. > I also have experienced this, it's due to low ram > > -e RAM=5 thanks, it works.
Author
Owner

@chengjiaozyl commented on GitHub (Dec 6, 2021):

any luck with the mouse or keyboard functional? I ran into similar issue, during installation, unable to select Dist Utility or reinstall Big Sur @chengjiaozyl

just as sickcodes says, allocate more ram when you start your container.

@chengjiaozyl commented on GitHub (Dec 6, 2021): > any luck with the mouse or keyboard functional? I ran into similar issue, during installation, unable to select Dist Utility or reinstall Big Sur @chengjiaozyl just as sickcodes says, allocate more ram when you start your container.
Author
Owner

@chengjiaozyl commented on GitHub (Dec 6, 2021):

thank you, is that mean i can use the following command and use vnc to connect it? @MikeCoder96

docker run -i \
    --device /dev/kvm \
    -p 50922:10022 \
    -p 5999:5999 \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    -e EXTRA="-display none -vnc 0.0.0.0:99,password=on" \
    sickcodes/docker-osx:big-sur
@chengjiaozyl commented on GitHub (Dec 6, 2021): > thank you, is that mean i can use the following command and use vnc to connect it? @[MikeCoder96](https://github.com/MikeCoder96) ``` docker run -i \ --device /dev/kvm \ -p 50922:10022 \ -p 5999:5999 \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -e "DISPLAY=${DISPLAY:-:0.0}" \ -e EXTRA="-display none -vnc 0.0.0.0:99,password=on" \ sickcodes/docker-osx:big-sur ```
Author
Owner

@MikeCoder96 commented on GitHub (Dec 6, 2021):

@chengjiaozyl yes, it will work with vnc client.
I will put an .sh file to start docker-OSX with VNC Server and make pull request.

@MikeCoder96 commented on GitHub (Dec 6, 2021): @chengjiaozyl yes, it will work with vnc client. I will put an .sh file to start docker-OSX with VNC Server and make pull request.
Author
Owner

@sickcodes commented on GitHub (Dec 28, 2021):

Type device_add usb-mouse currently is the solution

@sickcodes commented on GitHub (Dec 28, 2021): Type `device_add usb-mouse` currently is the solution
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX#283