# X server error while starting QEMU emulator

**URL:** <https://forum.webosose.org/t/x-server-error-while-starting-qemu-emulator/539>\
**Category:** Platform Development\
**Created:** [September 12, 2018, 4:37am UTC](https://forum.webosose.org/t/x-server-error-while-starting-qemu-emulator/539 "2018-09-12T04:37:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cre8tor](https://avatars.discourse-cdn.com/v4/letter/c/e19adc/32.png) [@cre8tor](https://forum.webosose.org/u/cre8tor)\
**Post date:** [September 12, 2018, 4:37am UTC](https://forum.webosose.org/t/x-server-error-while-starting-qemu-emulator/539/1 "2018-09-12T04:37:58Z")

</div>

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.

```auto
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.

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/developer1/original/1X/2c2dcd679d3a8e5f8d684a58776522831a99ca34.png)

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

```auto
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.
```

---

<div class="post-metadata">

**Author:** ![Changhyeok](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.webosose.org/changhyeok/32/247_2.png) [@Changhyeok](https://forum.webosose.org/u/Changhyeok)\
**Post date:** [September 17, 2018, 1:35pm UTC](https://forum.webosose.org/t/x-server-error-while-starting-qemu-emulator/539/2 "2018-09-17T13:35:29Z")

</div>

@sukdo399 Could you give us your answer?

---

<div class="post-metadata">

**Author:** ![sukdo399](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.webosose.org/sukdo399/32/170_2.png) [@sukdo399](https://forum.webosose.org/u/sukdo399)\
**Post date:** [September 18, 2018, 11:16am UTC](https://forum.webosose.org/t/x-server-error-while-starting-qemu-emulator/539/3 "2018-09-18T11:16:26Z")

</div>

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.
