<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>11994</bug_id>
          
          <creation_ts>2017-08-29 00:39:28 +0000</creation_ts>
          <short_desc>Graphical qemu doesn&apos;t work over remote X on Fedora 26</short_desc>
          <delta_ts>2020-03-19 15:04:29 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>11</classification_id>
          <classification>Runtime</classification>
          <product>General Runtime</product>
          <component>General Runtime</component>
          <version>2.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yi Zhao">yi.zhao</reporter>
          <assigned_to name="Mingli Yu">mingli.yu</assigned_to>
          <cc>libertad.gonzalez.de.la.cruz</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>sgw</cc>
    
    <cc>stephano</cc>
    
    <cc>yi.zhao</cc>
          
          <qa_contact name="Yi Zhao">yi.zhao</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Used to work)</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>76220</commentid>
    <comment_count>0</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2017-08-29 00:39:28 +0000</bug_when>
    <thetext>Git rev: master/5f6945f5031e1a4ca116cc1eccf4c2f9dc228547

This issue only happens on Fedora 26 x86_64 and i686.

Host:
Fedora 26 with latest update
$ uname -a
Linux pek-usp-7 4.12.8-300.fc26.x86_64 #1 SMP Thu Aug 17 15:30:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Steps:
1. bitbake core-image-sato
2. runqemu qemux86-64

Error log:
######################################
$ runqemu qemux86-64
runqemu - INFO - Running MACHINE=qemux86-64 bitbake -e...
runqemu - INFO - Continuing with the following parameters:

KERNEL: [tmp/deploy/images/qemux86-64/bzImage--4.12.7+git0+edb42d4805_d09f2ce584-r0-qemux86-64-20170828033016.bin]
MACHINE: [qemux86-64]
FSTYPE: [ext4]
ROOTFS: [tmp/deploy/images/qemux86-64/core-image-sato-qemux86-64-20170828033016.rootfs.ext4]
CONFFILE: [/buildarea/poky/build/tmp/deploy/images/qemux86-64/core-image-sato-qemux86-64-20170828033016.qemuboot.conf]

runqemu - INFO - Setting up tap interface under sudo
runqemu - INFO - Network configuration: 192.168.7.2::192.168.7.1:255.255.255.0
runqemu - INFO - Running tmp/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin//qemu-system-x86_64 -device virtio-net-pci,netdev=net0,mac=52:54:00:12:34:02 -netdev tap,id=net0,ifname=tap0,script=no,downscript=no -drive file=tmp/deploy/images/qemux86-64/core-image-sato-qemux86-64-20170828033016.rootfs.ext4,if=virtio,format=raw -vga vmware -show-cursor -usb -device usb-tablet -device virtio-rng-pci   -cpu core2duo -m 256 -serial mon:vc -serial null -kernel tmp/deploy/images/qemux86-64/bzImage--4.12.7+git0+edb42d4805_d09f2ce584-r0-qemux86-64-20170828033016.bin -append &apos;root=/dev/vda rw highres=off  mem=256M ip=192.168.7.2::192.168.7.1:255.255.255.0 vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1 uvesafb.task_timeout=-1 &apos;

runqemu - ERROR - Failed to run qemu: libEGL warning: DRI2: failed to authenticate
X Error:  BadRequest
  Request Major code 153 ()
  Request Minor code 1
  Error Serial #162
  Current Serial #162

Cleanup
Set &apos;tap0&apos; nonpersistent
runqemu - INFO - Releasing lockfile for tap device &apos;tap0&apos;
##############################

With nographic option, it works well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76326</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-08-30 15:19:39 +0000</bug_when>
    <thetext>What GPU does this machine have?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76374</commentid>
    <comment_count>2</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2017-08-31 00:39:57 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; What GPU does this machine have?

$ lspci | grep VGA
05:05.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] ES1000 (rev 02)

With radeon dirver:

$ dmesg |grep radeon
[    3.655891] [drm] radeon kernel modesetting enabled.
[    3.656392] radeon 0000:05:05.0: VRAM: 128M 0x00000000D0000000 - 0x00000000D7FFFFFF (32M used)
[    3.656396] radeon 0000:05:05.0: GTT: 512M 0x00000000B0000000 - 0x00000000CFFFFFFF
[    3.656563] [drm] radeon: 32M of VRAM memory ready
[    3.656564] [drm] radeon: 512M of GTT memory ready.
[    3.677518] radeon 0000:05:05.0: WB disabled
[    3.677521] radeon 0000:05:05.0: fence driver on ring 0 use gpu addr 0x00000000b0000000 and cpu addr 0xf6be3000
[    3.677534] [drm] radeon: irq initialized.
[    3.677760] [drm] radeon: ring at 0x00000000B0001000
[    3.687985] fbcon: radeondrmfb (fb0) is primary device
[    3.857265] radeon 0000:05:05.0: fb0: radeondrmfb frame buffer device
[    3.863417] [drm] Initialized radeon 2.50.0 20080528 for 0000:05:05.0 on minor 0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76382</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-08-31 09:53:11 +0000</bug_when>
    <thetext>The ES1000 is decade-old server-grade GPU with minimal actual features.  I suspect you&apos;re actually running a Wayland session and as qemu is an X application it needs to run under xwayland which requires DRI3.  However your GPU is minimal and the driver is ancient, so the odds are good that it doesn&apos;t support DRI3.

Please try logging into a traditional X session instead of Wayland.  If that solves it then I think Fedora should blacklist this GPU for Wayland sessions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76441</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-09-01 10:14:40 +0000</bug_when>
    <thetext>Moving to NEEDINFO.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76507</commentid>
    <comment_count>5</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2017-09-05 00:46:58 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; The ES1000 is decade-old server-grade GPU with minimal actual features.  I
&gt; suspect you&apos;re actually running a Wayland session and as qemu is an X
&gt; application it needs to run under xwayland which requires DRI3.  However
&gt; your GPU is minimal and the driver is ancient, so the odds are good that it
&gt; doesn&apos;t support DRI3.
&gt; 
&gt; Please try logging into a traditional X session instead of Wayland.  If that
&gt; solves it then I think Fedora should blacklist this GPU for Wayland sessions.

Both for Wayland and Xorg, if I open a terminal on host and launch the qemu, it works without problem. If I use ssh -X or -Y to connect the host and launch the qemu, the above error occurs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76528</commentid>
    <comment_count>6</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-09-05 14:37:30 +0000</bug_when>
    <thetext>How are you configuring qemu-native for a UI (as out of the box it is headless)?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76598</commentid>
    <comment_count>7</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2017-09-07 00:35:49 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; How are you configuring qemu-native for a UI (as out of the box it is
&gt; headless)?

I don&apos;t change anything, just use the default setting.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76613</commentid>
    <comment_count>8</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-09-07 08:51:53 +0000</bug_when>
    <thetext>Presumably this is Poky, so SDL is enabled and GTK+ isn&apos;t.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76635</commentid>
    <comment_count>9</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2017-09-07 15:17:00 +0000</bug_when>
    <thetext>I have a Fedora26 laptop and a Fedora26 headless workstation, if I ssh to the workstation from the laptop with X forwarding I observe the following:

* with the pyro branch I am able to use runqemu to start a QEMU VM which displays on my laptop
* with the master branch trying the same results in the error Yi reported:
&quot;runqemu - ERROR - Failed to run qemu: Could not initialize SDL(No available video device) - exiting&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77459</commentid>
    <comment_count>10</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-10-09 12:41:11 +0000</bug_when>
    <thetext>I&apos;ve now got a NUC running Fedora 26 with Xwayland.

I can ssh into it from a Debian machine and graphical runqemu works.

I can ssh from it into a Debian machine and graphical runqemu works.

Sorry but I can&apos;t replicate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77460</commentid>
    <comment_count>11</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-10-09 13:51:57 +0000</bug_when>
    <thetext>Reassigning to Yi Zhao.

Can you dig further?

- Verify Josh&apos;s statement that Pyro works on F26
- Try using master + pyro&apos;s libsdl.bb
- Try using master + pyro&apos;s qemu.bb</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77562</commentid>
    <comment_count>12</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2017-10-13 05:41:36 +0000</bug_when>
    <thetext>(In reply to comment #11)
&gt; Reassigning to Yi Zhao.
&gt; 
&gt; Can you dig further?

I retested with the following methods:
&gt; 
&gt; - Verify Josh&apos;s statement that Pyro works on F26

Yes, it works.

&gt; - Try using master + pyro&apos;s libsdl.bb

It doesn&apos;t work.

&gt; - Try using master + pyro&apos;s qemu.bb

It works.


Thanks,
Yi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77566</commentid>
    <comment_count>13</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-10-13 10:37:04 +0000</bug_when>
    <thetext>So we blame the new qemu.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86759</commentid>
    <comment_count>14</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2020-03-19 15:04:29 +0000</bug_when>
    <thetext>Fedora 26 is no longer supported. Re open if this applies to a newer Fedora distro.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>