(SOLVED) [Ubuntu 20] [Headless] 'gtk initialization failed' with specific images (big-sure, monterey etc) but auto works. #379

Closed
opened 2025-12-29 00:25:50 +01:00 by adam · 9 comments
Owner

Originally created by @BadgerHobbs on GitHub (Jul 6, 2022).

Description

Unable to successfully run any headless image other than 'auto' as they stop on gtk initialization failed error.

System info

NAME="Ubuntu"
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-ubuntu--lv  221G  143G   69G  68% /
QEMU emulator version 4.2.1 (Debian 1:4.2-3ubuntu6.23)
Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers
libvirtd (libvirt) 6.0.0
              total        used        free      shared  buff/cache   available
Mem:           15Gi        10Gi       538Mi       2.0Mi       4.7Gi       4.8Gi
Swap:         4.0Gi       1.2Gi       2.8Gi
24
24
crw-rw-rw- 1 root kvm 10, 232 Jul  6 04:36 /dev/kvm
total 8.0K
drwxrwxrwt  2 root root 4.0K Jun 25 05:19 .
drwxrwxrwt 12 root root 4.0K Jul  6 04:44 ..
root        1451  4.0  0.4 5222872 66352 ?       Ssl  02:36   5:14 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
adminis+   96519  0.0  0.0   6432  2548 pts/2    S+   04:44   0:00 grep --color=auto dockerd
kvm:x:108:administrator
docker:x:998:administrator
libvirt:x:118:administrator
libvirt-qemu:x:64055:libvirt-qemu
libvirt-dnsmasq:x:119:

What works

The below command works successfully without issue.

docker run -it \
    --name docker-osx \
    --device /dev/kvm \
    -p 50922:10022 \
    -e TERMS_OF_USE=i_agree \
    -e GENERATE_UNIQUE=true \
    sickcodes/docker-osx:auto

What doesn't work

The below issue returns the gtk initialization failed error, with the below log.

docker run -it \
    --name docker-osx \
    --device /dev/kvm \
    -p 50922:10022 \
    -e TERMS_OF_USE=i_agree \
    -e GENERATE_UNIQUE=true \
    sickcodes/docker-osx:big-sur

Last log lines

QEMU 6.2.0 monitor - type 'help' for more information
(qemu) qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.01H:ECX.xsave [bit 26]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.01H:ECX.avx [bit 28]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX.xsaveopt [bit 0]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 0]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 1]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 2]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.01H:ECX.xsave [bit 26]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.01H:ECX.avx [bit 28]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX.xsaveopt [bit 0]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 0]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 1]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 2]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.01H:ECX.xsave [bit 26]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.01H:ECX.avx [bit 28]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX.xsaveopt [bit 0]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 0]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 1]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 2]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.01H:ECX.xsave [bit 26]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.01H:ECX.avx [bit 28]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX.xsaveopt [bit 0]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 0]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 1]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 2]
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
audio: Failed to create voice `dac'
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize ADC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize ADC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
audio: Failed to create voice `adc'
gtk initialization failed

Looks like there are a few issues currently mentioning this issue as of time of writing, both on Linux systems and WSL2 from people wanting both headless and displayed deployments:

# Try install X-11
sudo apt install x11-apps -y

# then test it with:
xeyes
sudo apt install x11-xserver-utils -y
sudo apt install qemu-system-gui

# No permission to access the display
xhost +
# Updating permissions
sudo chmod 666 /dev/kvm
# Running docker as privleged
--privileged
docker run --device /dev/kvm \
    --privileged \
    -p 50922:10022 \
    -e XDG_RUNTIME_DIR=/tmp \
    -e WAYLAND_DISPLAY=$WAYLAND_DISPLAY \
    -e QT_QPA_PLATFORM=wayland \
    -e GDK_BACKEND=wayland \
    -e CLUTTER_BACKEND=wayland \
    -e DISPLAY=:0 \
    -v $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/tmp/$WAYLAND_DISPLAY \
    sickcodes/docker-osx:big-sur
-e "DISPLAY=:10
-v /mnt/wslg/.X11-unix:/tmp/.X11-unix \
xhost "+SI:localuser:#1000"

Conclusion

Sadly none of the provided fixes seemed to have worked for me. I guess the question would be what changes between running 'auto' headless compared to 'big-sur' (or any other image)?

Originally created by @BadgerHobbs on GitHub (Jul 6, 2022). ## Description Unable to successfully run any headless image other than 'auto' as they stop on `gtk initialization failed` error. ### System info ```bash NAME="Ubuntu" PRETTY_NAME="Ubuntu 20.04.4 LTS" VERSION_CODENAME=focal UBUNTU_CODENAME=focal Filesystem Size Used Avail Use% Mounted on /dev/mapper/ubuntu--vg-ubuntu--lv 221G 143G 69G 68% / QEMU emulator version 4.2.1 (Debian 1:4.2-3ubuntu6.23) Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers libvirtd (libvirt) 6.0.0 total used free shared buff/cache available Mem: 15Gi 10Gi 538Mi 2.0Mi 4.7Gi 4.8Gi Swap: 4.0Gi 1.2Gi 2.8Gi 24 24 crw-rw-rw- 1 root kvm 10, 232 Jul 6 04:36 /dev/kvm total 8.0K drwxrwxrwt 2 root root 4.0K Jun 25 05:19 . drwxrwxrwt 12 root root 4.0K Jul 6 04:44 .. root 1451 4.0 0.4 5222872 66352 ? Ssl 02:36 5:14 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock adminis+ 96519 0.0 0.0 6432 2548 pts/2 S+ 04:44 0:00 grep --color=auto dockerd kvm:x:108:administrator docker:x:998:administrator libvirt:x:118:administrator libvirt-qemu:x:64055:libvirt-qemu libvirt-dnsmasq:x:119: ``` ## What works The below command works successfully without issue. ```bash docker run -it \ --name docker-osx \ --device /dev/kvm \ -p 50922:10022 \ -e TERMS_OF_USE=i_agree \ -e GENERATE_UNIQUE=true \ sickcodes/docker-osx:auto ``` ## What doesn't work The below issue returns the `gtk initialization failed` error, with the below log. ```bash docker run -it \ --name docker-osx \ --device /dev/kvm \ -p 50922:10022 \ -e TERMS_OF_USE=i_agree \ -e GENERATE_UNIQUE=true \ sickcodes/docker-osx:big-sur ``` ### Last log lines ```bash QEMU 6.2.0 monitor - type 'help' for more information (qemu) qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.01H:ECX.xsave [bit 26] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.01H:ECX.avx [bit 28] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX.xsaveopt [bit 0] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 0] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 1] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 2] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.01H:ECX.xsave [bit 26] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.01H:ECX.avx [bit 28] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX.xsaveopt [bit 0] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 0] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 1] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 2] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.01H:ECX.xsave [bit 26] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.01H:ECX.avx [bit 28] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX.xsaveopt [bit 0] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 0] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 1] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 2] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.01H:ECX.xsave [bit 26] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.01H:ECX.avx [bit 28] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX.xsaveopt [bit 0] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 0] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 1] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 2] ALSA lib confmisc.c:855:(parse_card) cannot find card '0' ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default alsa: Could not initialize DAC alsa: Failed to open `default': alsa: Reason: No such file or directory ALSA lib confmisc.c:855:(parse_card) cannot find card '0' ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default alsa: Could not initialize DAC alsa: Failed to open `default': alsa: Reason: No such file or directory audio: Failed to create voice `dac' ALSA lib confmisc.c:855:(parse_card) cannot find card '0' ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default alsa: Could not initialize ADC alsa: Failed to open `default': alsa: Reason: No such file or directory ALSA lib confmisc.c:855:(parse_card) cannot find card '0' ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default alsa: Could not initialize ADC alsa: Failed to open `default': alsa: Reason: No such file or directory audio: Failed to create voice `adc' gtk initialization failed ``` ## Comments & previously recommended fixes Looks like there are a few issues currently mentioning this issue as of time of writing, both on Linux systems and WSL2 from people wanting both headless and displayed deployments: - #480 - #465 - #447 - #445 - #429 - #423 - #419 - #405 - #390 - #349 - #328 - #131 - #91 ## Recommended fixes from previous issues ```bash # Try install X-11 sudo apt install x11-apps -y # then test it with: xeyes ``` ```bash sudo apt install x11-xserver-utils -y sudo apt install qemu-system-gui # No permission to access the display xhost + ``` ```bash # Updating permissions sudo chmod 666 /dev/kvm ``` ```bash # Running docker as privleged --privileged ``` ```bash docker run --device /dev/kvm \ --privileged \ -p 50922:10022 \ -e XDG_RUNTIME_DIR=/tmp \ -e WAYLAND_DISPLAY=$WAYLAND_DISPLAY \ -e QT_QPA_PLATFORM=wayland \ -e GDK_BACKEND=wayland \ -e CLUTTER_BACKEND=wayland \ -e DISPLAY=:0 \ -v $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/tmp/$WAYLAND_DISPLAY \ sickcodes/docker-osx:big-sur ``` ```bash -e "DISPLAY=:10 ``` ```bash -v /mnt/wslg/.X11-unix:/tmp/.X11-unix \ ``` ```bash xhost "+SI:localuser:#1000" ``` # Conclusion Sadly none of the provided fixes seemed to have worked for me. I guess the question would be what changes between running 'auto' headless compared to 'big-sur' (or any other image)?
adam closed this issue 2025-12-29 00:25:50 +01:00
Author
Owner

@BadgerHobbs commented on GitHub (Jul 7, 2022):

Ok, I was able to get it running with the below docker run command and image. The logs should finish on the lines also shown below, then you can ssh into the image with user and alpine to confirm everything is working.

docker run -it \
    --name docker-osx \
    --device /dev/kvm \
    -p 50922:10022 \
    -v "${PWD}/mac_hdd_ng_auto_monterey.img:/image" \
    -e GENERATE_UNIQUE=true \
    -e MASTER_PLIST_URL=https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/custom/config-nopicker-custom.plist \
    -e EXTRA="-display none" \
    sickcodes/docker-osx@sha256:4da5a80bf3aca7306e441a4fad4b92aafcd0fb5f9d0c143dbdf857d162d6903c

Your docker logs should end like this

ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize ADC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
@BadgerHobbs commented on GitHub (Jul 7, 2022): Ok, I was able to get it running with the below docker run command and image. The logs should finish on the lines also shown below, then you can ssh into the image with user and alpine to confirm everything is working. ```bash docker run -it \ --name docker-osx \ --device /dev/kvm \ -p 50922:10022 \ -v "${PWD}/mac_hdd_ng_auto_monterey.img:/image" \ -e GENERATE_UNIQUE=true \ -e MASTER_PLIST_URL=https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/custom/config-nopicker-custom.plist \ -e EXTRA="-display none" \ sickcodes/docker-osx@sha256:4da5a80bf3aca7306e441a4fad4b92aafcd0fb5f9d0c143dbdf857d162d6903c ``` Your docker logs should end like this ```bash ALSA lib confmisc.c:855:(parse_card) cannot find card '0' ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default alsa: Could not initialize ADC alsa: Failed to open `default': alsa: Reason: No such file or directory ```
Author
Owner

@sickcodes commented on GitHub (Jul 11, 2022):

Awesome work, apologies for not getting back earlier. I also like the perfectly syntaxed report 😁

@sickcodes commented on GitHub (Jul 11, 2022): Awesome work, apologies for not getting back earlier. I also like the perfectly syntaxed report 😁
Author
Owner

@BadgerHobbs commented on GitHub (Jul 11, 2022):

Awesome work, apologies for not getting back earlier. I also like the perfectly syntaxed report 😁

Thanks (Can't help myself with the pretty markdown!). Fantastic job with docker-osx as well, glad to be finally getting away from Apple's hardware restrictions. Interesting question will be what will happen when they fully migrate to Arm.

Hopefully this issue helps others, but looks like a PR may be required to resolve whatever changed in the image (Originally commented here https://github.com/sickcodes/Docker-OSX/issues/498#issuecomment-1141823716)

@BadgerHobbs commented on GitHub (Jul 11, 2022): > Awesome work, apologies for not getting back earlier. I also like the perfectly syntaxed report 😁 Thanks (Can't help myself with the pretty markdown!). Fantastic job with docker-osx as well, glad to be finally getting away from Apple's hardware restrictions. Interesting question will be what will happen when they fully migrate to Arm. Hopefully this issue helps others, but looks like a PR may be required to resolve whatever changed in the image (Originally commented here https://github.com/sickcodes/Docker-OSX/issues/498#issuecomment-1141823716)
Author
Owner

@ChainsDW commented on GitHub (Jul 19, 2022):

I started with these commands and it worked fine. But the container startup is too slow. how can i solve this problem?

@ChainsDW commented on GitHub (Jul 19, 2022): > I started with these commands and it worked fine. But the container startup is too slow. how can i solve this problem?
Author
Owner

@Bharath-Kuppusamy-ZS0197 commented on GitHub (Jul 4, 2023):

I followed the initial setup after replicating the issue, I executed these

$ sudo docker run -i --device /dev/kvm -p 50922:10022 -e GENERATE_UNIQUE=true -e DEVICE_MODEL="iMacPro1,1" -e WIDTH=1600 -e HEIGHT=900 -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY:=0.0" sickcodes/docker-osx:big-sur
$ xhost +
$ docker start -ai -i <container_id>

Worked like a charm!

@Bharath-Kuppusamy-ZS0197 commented on GitHub (Jul 4, 2023): I followed the initial setup after replicating the issue, I executed these $ sudo docker run -i --device /dev/kvm -p 50922:10022 -e GENERATE_UNIQUE=true -e DEVICE_MODEL="iMacPro1,1" -e WIDTH=1600 -e HEIGHT=900 -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY:=0.0" sickcodes/docker-osx:big-sur $ xhost + $ docker start -ai -i <container_id> Worked like a charm!
Author
Owner

@yarbshk commented on GitHub (Jul 7, 2023):

i had the same issue but i managed to fix it by building my own image:

git clone https://github.com/sickcodes/Docker-OSX.git
cd Docker-OSX
docker build -t docker-osx .
xhost +
docker run --device /dev/kvm --device /dev/snd -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" docker-osx:latest

it worked for me on Ubuntu 22.04.2 LTS. also i executed commands from "Recommended fixes from previous issues" section above (not sure if any of those was actually needed though).

it is as simple as that. hope it helps somebody.

@yarbshk commented on GitHub (Jul 7, 2023): i had the same issue but i managed to fix it by building my own image: ```bash git clone https://github.com/sickcodes/Docker-OSX.git cd Docker-OSX docker build -t docker-osx . xhost + docker run --device /dev/kvm --device /dev/snd -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" docker-osx:latest ``` it worked for me on Ubuntu 22.04.2 LTS. also i executed commands from "Recommended fixes from previous issues" section above (not sure if any of those was actually needed though). it is as simple as that. hope it helps somebody.
Author
Owner

@SimonBard commented on GitHub (Mar 7, 2024):

i had the same issue but i managed to fix it by building my own image:

git clone https://github.com/sickcodes/Docker-OSX.git
cd Docker-OSX
docker build -t docker-osx .
xhost +
docker run --device /dev/kvm --device /dev/snd -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" docker-osx:latest

it worked for me on Ubuntu 22.04.2 LTS. also i executed commands from "Recommended fixes from previous issues" section above (not sure if any of those was actually needed though).

it is as simple as that. hope it helps somebody.

Many thanks. It did not help me unfortunately.
I am getting:

qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 2]
(qemu) gtk initialization failed

My system is a J4202-itx, which supports VT-x

@SimonBard commented on GitHub (Mar 7, 2024): > i had the same issue but i managed to fix it by building my own image: > > ```shell > git clone https://github.com/sickcodes/Docker-OSX.git > cd Docker-OSX > docker build -t docker-osx . > xhost + > docker run --device /dev/kvm --device /dev/snd -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" docker-osx:latest > ``` > > it worked for me on Ubuntu 22.04.2 LTS. also i executed commands from "Recommended fixes from previous issues" section above (not sure if any of those was actually needed though). > > it is as simple as that. hope it helps somebody. Many thanks. It did not help me unfortunately. I am getting: ``` qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.0DH:EAX [bit 2] (qemu) gtk initialization failed ``` My system is a [J4202-itx](https://www.asrock.com/mb/Intel/J4205-ITX/index.us.asp#Manual), which s[upports VT-x](https://www.intel.de/content/www/de/de/products/sku/95591/intel-pentium-processor-j4205-2m-cache-up-to-2-60-ghz/specifications.html)
Author
Owner

@mcint commented on GitHub (Jun 3, 2024):

https://unix.stackexchange.com/questions/710944/qemu-warning-host-doesnt-support-requested-feature-cpuid-80000001hecx-svm-b

If you can modify arguments passed to qemu, adding -cpu host seems to be a simple naive fix for a similar issue.

@mcint commented on GitHub (Jun 3, 2024): https://unix.stackexchange.com/questions/710944/qemu-warning-host-doesnt-support-requested-feature-cpuid-80000001hecx-svm-b If you can modify arguments passed to qemu, adding `-cpu host` seems to be a simple naive fix for a similar issue.
Author
Owner

@ybeetle8 commented on GitHub (Aug 30, 2025):

xhost +local:root

@ybeetle8 commented on GitHub (Aug 30, 2025): xhost +local:root
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX#379