X server error while starting QEMU emulator


#1

Hello, I've successfully built QEMU image for webos. But, encountered X server error.
I am working on the remote server using SSH and XMing to display GUI programs. (Checked XMing is OK)
I tried both sdl and gtk for QEMU_DISPLAY parameter on emulator file. But, they do not work.
How can I solve this problem?

Followings are the commands and results.

webos@Ares:~/prebuilt-emulator$ ./emulator webos-config.json 
Linux ubuntu 16.04 64
Configuration JSON file : /home/webos/prebuilt-emulator/webos-config.json
/home/webos/prebuilt-emulator/bin/x86_64/qemu-system-i386 -name webos-image-qemux86 -smp 2 -m 2048 -drive file=/home/webos/temp/build-webos/BUILD/deploy/images/qemux86/webos-image-devel-qemux86.vmdk,if=virtio -enable-kvm -device virtio-vga,virgl -display sdl,gl=on -show-cursor -usb -usbdevice tablet -device virtio-rng-pci -net nic -net user,hostfwd=tcp::7777-:22,hostfwd=tcp::10004-:9998

Emualtor start with : /home/webos/temp/build-webos/BUILD/deploy/images/qemux86/webos-image-devel-qemux86.vmdk

XIO:  fatal IO error 22 (Invalid argument) on X server "localhost:10.0"
      after 511 requests (501 known processed) with 239 events remaining.

a GUI window appears and does not work.

and tried gtk also, but encountered an error. The screen popped up very shortly and disappeared.

webos@Ares:~/prebuilt-emulator$ ./emulator webos-config.json 
Linux ubuntu 16.04 64
Configuration JSON file : /home/webos/prebuilt-emulator/webos-config.json
/home/webos/prebuilt-emulator/bin/x86_64/qemu-system-i386 -name webos-image-qemux86 -smp 2 -m 2048 -drive file=/home/webos/temp/build-webos/BUILD/deploy/images/qemux86/webos-image-devel-qemux86.vmdk,if=virtio -enable-kvm -device virtio-vga,virgl -display gtk,gl=on -show-cursor -usb -usbdevice tablet -device virtio-rng-pci -net nic -net user,hostfwd=tcp::7778-:22,hostfwd=tcp::10005-:9998

Emualtor start with : /home/webos/temp/build-webos/BUILD/deploy/images/qemux86/webos-image-devel-qemux86.vmdk

qemu-system-i386: Fatal IO error 2 (No such file or directory) on X server localhost:13.0.

#2

@sukdo399 Could you give us your answer?


#3

both of these configurations are working on my machine.
(using ssh and x on my different ubuntu machine.)
(I've not tried gtk yet)

  1. display sdl, gl=on
    ./qemu-system-x86_64 -name webos-image-qemux86 -smp 2 -m 2048 -drive file=/media/jjunil/hdd/opensource/build-webos/BUILD/deploy/images/qemux86/webos-image-qemux86.vmdk,if=virtio -enable-kvm -device virtio-vga,virgl -display sdl,gl=on -show-cursor -usb -usbdevice tablet -device virtio-rng-pci -net nic -net user,hostfwd=tcp::7777-:22,hostfwd=tcp::10004-:9998

  2. display sdl, gl=off and remove -enable-kvm
    ./qemu-system-x86_64 -name webos-image-qemux86 -smp 2 -m 2048 -drive file=/media/jjunil/hdd/opensource/build-webos/BUILD/deploy/images/qemux86/webos-image-qemux86.vmdk,if=virtio -device virtio-vga,virgl -display sdl,gl=off -show-cursor -usb -usbdevice tablet -device virtio-rng-pci -net nic -net user,hostfwd=tcp::7777-:22,hostfwd=tcp::10004-:9998

The only difference between you and me in the first case(display sdl, gl=on) is that I used ubuntu instead of xming.
would you mind giving me more information?

However If it works, it will be very slow on x server via ssh. So I do not recommend it.