Can't setup on AWS Metal Ubuntu 20.04.LTE: QEMU freezes after a couple seconds from X11 screen is displayed #179

Open
opened 2025-12-29 00:19:38 +01:00 by adam · 3 comments
Owner

Originally created by @marcellodesales on GitHub (Apr 29, 2021).

Setup

  • Server is running on a Metal AWS Host with Ubuntu 20.04 LTE
  • Setup with Guacamole + VNC + X11...

The commands executed as follows:

$ xserver +
$ docker run
  • The Problem is described along with the OS related info
  • The logs from the Docker run is also displayed in the last section

Questions

  • Any known workaround?
    • I see a couple of entries in the log function snd_func_card_driver returned error: No such file or directory
    • Not sure what it refers to

Problem

UPDATE: Seems to be related to https://bugs.launchpad.net/ubuntu/+source/plasma-desktop/+bug/1872343

  • The screen. is displayed, but it gets stuck...
  • The screen can be moved for a bit, resized, and then it freezes
    • Can't move the screen with the mouse

Screen Shot 2021-04-28 at 8 09 43 PM

  • QEMU runs in the background...
ubuntu@ip-172-31-4-3:~$ top
top - 08:30:04 up  5:05,  1 user,  load average: 1.17, 1.11, 0.74
Tasks: 1047 total,   2 running, 1045 sleeping,   0 stopped,   0 zombie
%Cpu(s):  1.1 us,  0.0 sy,  0.0 ni, 98.9 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem : 193062.5 total, 182038.0 free,   3148.7 used,   7875.9 buff/cache
MiB Swap:      0.0 total,      0.0 free,      0.0 used. 188556.2 avail Mem

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
  13943 ubuntu    20   0 3996384 153796  47508 R 107.0   0.1   4:58.20 qemu-system-x86
  13974 root      20   0       0      0      0 S   1.0   0.0   0:03.37 kvm-pit/17
   1551 root      20   0 1559804  41376  29612 S   0.7   0.0   0:12.41 libvirtd
  14000 ubuntu    20   0   10224   4784   3208 R   0.7   0.0   0:01.67 top
   1420 tomcat    20   0   39.5g   1.4g  37208 S   0.3   0.7   2:41.83 java
   2461 ubuntu    20   0   88796  46976  18956 S   0.3   0.0   0:14.23 Xtightvnc
   3331 root      20   0  295652  33068  10292 S   0.3   0.0   0:26.89 guacd
   5847 ubuntu    20   0  860692 134664  44324 S   0.3   0.1   0:08.21 virt-manager
      1 root      20   0  167684  11800   8452 S   0.0   0.0   0:03.23 systemd

OS related issued, please help us identify the issue by posting the output of this

ubuntu@ip-172-31-4-3:~/Desktop$ 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 | tee debug.log
Linux ip-172-31-4-3 5.4.0-1045-aws #47-Ubuntu SMP Tue Apr 13 07:02:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
:1
1
NAME="Ubuntu"
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        30G   16G   14G  53% /
QEMU emulator version 4.2.1 (Debian 1:4.2-3ubuntu6.15)
Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers
libvirtd (libvirt) 6.0.0
              total        used        free      shared  buff/cache   available
Mem:          188Gi       2.1Gi       183Gi        16Mi       3.1Gi       185Gi
Swap:            0B          0B          0B
96
96
crw-rw----+ 1 root kvm 10, 232 Apr 29 03:33 /dev/kvm
total 8.0K
drwxrwxrwt  2 root   root   4.0K Apr 29 03:24 .
drwxrwxrwt 16 root   root   4.0K Apr 29 03:33 ..
srwxrwxrwx  1 ubuntu ubuntu    0 Apr 29 03:24 X1
root        1540  0.1  0.0 4638744 94580 ?       Ssl  03:24   0:01 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
ubuntu      4186  0.0  0.0   8160  2628 pts/0    S+   03:39   0:00 grep --color=auto dockerd
kvm:x:108:
docker:x:119:ubuntu
libvirt:x:135:ubuntu
libvirt-qemu:x:64055:libvirt-qemu
libvirt-dnsmasq:x:136:

Docker run logs

  • The server runs for a couple of seconds and the
ubuntu@ip-172-31-4-3:~$ docker run -it --device /dev/kvm -p 50922:10022 -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=:1 sickcodes/docker-osx:big-sur | tee x11-docker-osx.log
chown: cannot access '': No such file or directory
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
nohup: appending output to 'nohup.out'
++ id -u
++ id -g
+ sudo chown 1000:1000 /dev/kvm
++ id -u
++ id -g
+ sudo chown -R 1000:1000 /dev/snd
+ [[ 3 = max ]]
+ [[ 3 = half ]]
++ id -u
++ id -g
+ sudo chown -R 1000:1000 /dev/snd
+ exec qemu-system-x86_64 -m 3000 -cpu Penryn,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check -machine q35,accel=kvm:tcg -smp 4,cores=4 -usb -device usb-kbd -device usb-tablet -device 'isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc' -drive if=pflash,format=raw,readonly,file=/home/arch/OSX-KVM/OVMF_CODE.fd -drive if=pflash,format=raw,file=/home/arch/OSX-KVM/OVMF_VARS-1024x768.fd -smbios type=2 -audiodev alsa,id=hda -device ich9-intel-hda -device hda-duplex,audiodev=hda -device ich9-ahci,id=sata -drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2 -device ide-hd,bus=sata.2,drive=OpenCoreBoot -device ide-hd,bus=sata.3,drive=InstallMedia -drive id=InstallMedia,if=none,file=/home/arch/OSX-KVM/BaseSystem.img,format=qcow2 -drive id=MacHDD,if=none,file=/home/arch/OSX-KVM/mac_hdd_ng.img,format=qcow2 -device ide-hd,bus=sata.4,drive=MacHDD -netdev user,id=net0,hostfwd=tcp::10022-:22,hostfwd=tcp::5900-:5900, -device vmxnet3,netdev=net0,id=net0,mac=52:54:00:09:49:17 -monitor stdio -vga vmware
qemu-system-x86_64: warning: dbind: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-hdJwWqJdCe: Connection refused
qemu-system-x86_64: warning: Unknown X11 keycode mapping '<null>'.
Please report to qemu-devel@nongnu.org
including the following information:

  - Operating system
  - X11 Server
  - xprop -root
  - xdpyinfo

QEMU 5.2.0 monitor - type 'help' for more information
(qemu) ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(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:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(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:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(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:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(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'

(qemu)
Originally created by @marcellodesales on GitHub (Apr 29, 2021). # Setup * Server is running on a Metal AWS Host with `Ubuntu 20.04 LTE` * Setup with `Guacamole + VNC + X11`... The commands executed as follows: ```console $ xserver + $ docker run ``` * The Problem is described along with the OS related info * The logs from the Docker run is also displayed in the last section # Questions * Any known workaround? * I see a couple of entries in the log `function snd_func_card_driver returned error: No such file or directory` * Not sure what it refers to # Problem > **UPDATE**: Seems to be related to https://bugs.launchpad.net/ubuntu/+source/plasma-desktop/+bug/1872343 * The screen. is displayed, but it gets stuck... * The screen can be moved for a bit, resized, and then it freezes * Can't move the screen with the mouse ![Screen Shot 2021-04-28 at 8 09 43 PM](https://user-images.githubusercontent.com/131457/116500798-296ae780-a864-11eb-8c55-6929f7076127.png) * QEMU runs in the background... ```console ubuntu@ip-172-31-4-3:~$ top top - 08:30:04 up 5:05, 1 user, load average: 1.17, 1.11, 0.74 Tasks: 1047 total, 2 running, 1045 sleeping, 0 stopped, 0 zombie %Cpu(s): 1.1 us, 0.0 sy, 0.0 ni, 98.9 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st MiB Mem : 193062.5 total, 182038.0 free, 3148.7 used, 7875.9 buff/cache MiB Swap: 0.0 total, 0.0 free, 0.0 used. 188556.2 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 13943 ubuntu 20 0 3996384 153796 47508 R 107.0 0.1 4:58.20 qemu-system-x86 13974 root 20 0 0 0 0 S 1.0 0.0 0:03.37 kvm-pit/17 1551 root 20 0 1559804 41376 29612 S 0.7 0.0 0:12.41 libvirtd 14000 ubuntu 20 0 10224 4784 3208 R 0.7 0.0 0:01.67 top 1420 tomcat 20 0 39.5g 1.4g 37208 S 0.3 0.7 2:41.83 java 2461 ubuntu 20 0 88796 46976 18956 S 0.3 0.0 0:14.23 Xtightvnc 3331 root 20 0 295652 33068 10292 S 0.3 0.0 0:26.89 guacd 5847 ubuntu 20 0 860692 134664 44324 S 0.3 0.1 0:08.21 virt-manager 1 root 20 0 167684 11800 8452 S 0.0 0.0 0:03.23 systemd ``` # OS related issued, please help us identify the issue by posting the output of this ```console ubuntu@ip-172-31-4-3:~/Desktop$ 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 | tee debug.log Linux ip-172-31-4-3 5.4.0-1045-aws #47-Ubuntu SMP Tue Apr 13 07:02:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux :1 1 NAME="Ubuntu" PRETTY_NAME="Ubuntu 20.04.2 LTS" VERSION_CODENAME=focal UBUNTU_CODENAME=focal Filesystem Size Used Avail Use% Mounted on /dev/root 30G 16G 14G 53% / QEMU emulator version 4.2.1 (Debian 1:4.2-3ubuntu6.15) Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers libvirtd (libvirt) 6.0.0 total used free shared buff/cache available Mem: 188Gi 2.1Gi 183Gi 16Mi 3.1Gi 185Gi Swap: 0B 0B 0B 96 96 crw-rw----+ 1 root kvm 10, 232 Apr 29 03:33 /dev/kvm total 8.0K drwxrwxrwt 2 root root 4.0K Apr 29 03:24 . drwxrwxrwt 16 root root 4.0K Apr 29 03:33 .. srwxrwxrwx 1 ubuntu ubuntu 0 Apr 29 03:24 X1 root 1540 0.1 0.0 4638744 94580 ? Ssl 03:24 0:01 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock ubuntu 4186 0.0 0.0 8160 2628 pts/0 S+ 03:39 0:00 grep --color=auto dockerd kvm:x:108: docker:x:119:ubuntu libvirt:x:135:ubuntu libvirt-qemu:x:64055:libvirt-qemu libvirt-dnsmasq:x:136: ``` # Docker run logs * The server runs for a couple of seconds and the ```console ubuntu@ip-172-31-4-3:~$ docker run -it --device /dev/kvm -p 50922:10022 -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=:1 sickcodes/docker-osx:big-sur | tee x11-docker-osx.log chown: cannot access '': No such file or directory ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519 nohup: appending output to 'nohup.out' ++ id -u ++ id -g + sudo chown 1000:1000 /dev/kvm ++ id -u ++ id -g + sudo chown -R 1000:1000 /dev/snd + [[ 3 = max ]] + [[ 3 = half ]] ++ id -u ++ id -g + sudo chown -R 1000:1000 /dev/snd + exec qemu-system-x86_64 -m 3000 -cpu Penryn,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check -machine q35,accel=kvm:tcg -smp 4,cores=4 -usb -device usb-kbd -device usb-tablet -device 'isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc' -drive if=pflash,format=raw,readonly,file=/home/arch/OSX-KVM/OVMF_CODE.fd -drive if=pflash,format=raw,file=/home/arch/OSX-KVM/OVMF_VARS-1024x768.fd -smbios type=2 -audiodev alsa,id=hda -device ich9-intel-hda -device hda-duplex,audiodev=hda -device ich9-ahci,id=sata -drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2 -device ide-hd,bus=sata.2,drive=OpenCoreBoot -device ide-hd,bus=sata.3,drive=InstallMedia -drive id=InstallMedia,if=none,file=/home/arch/OSX-KVM/BaseSystem.img,format=qcow2 -drive id=MacHDD,if=none,file=/home/arch/OSX-KVM/mac_hdd_ng.img,format=qcow2 -device ide-hd,bus=sata.4,drive=MacHDD -netdev user,id=net0,hostfwd=tcp::10022-:22,hostfwd=tcp::5900-:5900, -device vmxnet3,netdev=net0,id=net0,mac=52:54:00:09:49:17 -monitor stdio -vga vmware qemu-system-x86_64: warning: dbind: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-hdJwWqJdCe: Connection refused qemu-system-x86_64: warning: Unknown X11 keycode mapping '<null>'. Please report to qemu-devel@nongnu.org including the following information: - Operating system - X11 Server - xprop -root - xdpyinfo QEMU 5.2.0 monitor - type 'help' for more information (qemu) ALSA lib confmisc.c:767:(parse_card) cannot find card '0' ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2660:(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:767:(parse_card) cannot find card '0' ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2660:(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:767:(parse_card) cannot find card '0' ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2660:(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:767:(parse_card) cannot find card '0' ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2660:(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' (qemu) ```
Author
Owner

@sickcodes commented on GitHub (Apr 30, 2021):

You need to click inside the box use the arrow keys, maybe try xdotool

@sickcodes commented on GitHub (Apr 30, 2021): You need to click inside the box use the arrow keys, maybe try xdotool
Author
Owner

@sickcodes commented on GitHub (May 4, 2021):

Try a lightweight desktop like icewm

@sickcodes commented on GitHub (May 4, 2021): Try a lightweight desktop like `icewm`
Author
Owner

@marcellodesales commented on GitHub (May 6, 2021):

@sickcodes Let me try it...

@marcellodesales commented on GitHub (May 6, 2021): @sickcodes Let me try it...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX#179