[Bug 1135237] New: modesetting driver and xvnc: bad performance
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 Bug ID: 1135237 Summary: modesetting driver and xvnc: bad performance Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: X.Org Assignee: xorg-maintainer-bugs@forge.provo.novell.com Reporter: P.Suetterlin@royac.iac.es QA Contact: xorg-maintainer-bugs@forge.provo.novell.com Found By: --- Blocker: --- Not sure if that is a real bug, but I thought I report it here: I am running Tumbleweed (latest version, as of now 20190512) on an ASUS PN40 (Celeron N4000@1.1GHz, Gemini lake) for controlling a small telescope (via INDI). It is running headless, and I use x11vnc_ssh to connect to it (it runs a real X session with autologin, icewm as session). The xserver by default uses the modesetting driver. With that, when I connect using xvnc, the CPU load of the X server (X, not xvnc) goes up to some 80-90% just for displaying the empty desktop, still the display is sluggish close to being unusable, with sometimes latencies in the second range (this is on a Gbit cable network). If instead I use the intel driver (xf86-video-intel) CPU load is below 10%, screen updates are very quick, without much latency. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c1 Stefan Dirsch <sndirsch@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |IN_PROGRESS --- Comment #1 from Stefan Dirsch <sndirsch@suse.com> --- Hmmm. Sounds weird. Could you attach /var/log/Xorg.0.log when using modesetting driver? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c2 --- Comment #2 from Peter Sütterlin <P.Suetterlin@royac.iac.es> --- Created attachment 805183 --> http://bugzilla.opensuse.org/attachment.cgi?id=805183&action=edit Xorg logfile(s) Those are Xorg logs with intel driver and with modeset driver. I had started an xvnc session during both of them (though t probably didn't leave a trace?) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c3 Stefan Dirsch <sndirsch@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P3 - Medium CC| |P.Suetterlin@royac.iac.es Flags| |needinfo?(P.Suetterlin@roya | |c.iac.es) --- Comment #3 from Stefan Dirsch <sndirsch@suse.com> --- Gemini Lake. Hmm. Seems for some reason modeset driver doesn't detect any outputs. + (II) modeset(0): Output HDMI-1 has no monitor section + (II) modeset(0): Output DP-1 has no monitor section + (II) modeset(0): Output HDMI-2 has no monitor section + (II) modeset(0): EDID for output HDMI-1 + (II) modeset(0): EDID for output DP-1 + (II) modeset(0): EDID for output HDMI-2 + (II) modeset(0): Output HDMI-1 disconnected + (II) modeset(0): Output DP-1 disconnected + (II) modeset(0): Output HDMI-2 disconnected + (WW) modeset(0): No outputs definitely connected, trying again... + (II) modeset(0): Output HDMI-1 disconnected + (II) modeset(0): Output DP-1 disconnected + (II) modeset(0): Output HDMI-2 disconnected + (WW) modeset(0): Unable to find connected outputs - setting 1024x768 initial framebuffer What's the output of 'xrandr' on intel and modesetting? modeset uses glamor (Intel's Mesa driver) for 2D support, whereas intel driver still uses SNA as default for 2D acceleration. You may see the same problems when using "glamor" as acceleration for intel driver instead of "SNA". I feel confused with what you mean with Xvnc and x11vnc_ssh. Xvnc is completely independant of a running Xorg server binary, so why should Xvnc raise the CPU load for the Xorg binary? I no longer remember what x11vnc_ssh does and how it works. It may raise the CPU load of a running Xserver somehow ... You would need to help me here to get a better understanding of this. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c4 Peter Sütterlin <P.Suetterlin@royac.iac.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(P.Suetterlin@roya | |c.iac.es) | --- Comment #4 from Peter Sütterlin <P.Suetterlin@royac.iac.es> --- Created attachment 805259 --> http://bugzilla.opensuse.org/attachment.cgi?id=805259&action=edit xrandr outputs Yes indeed, the system is usually running without monitor or keyboard connected. So there's nothing to connect to. It comes up with a standard 1024x768, and the icewm startup script of the autologin user will do an '/usr/bin/xrandr --fb 1920x1080' Sorry about the confusion with Xvnc, my bad. It's of course not Xvnc, it's x11xvnc, which connects to the running X server and then sends the data using the vnc protocoll. x11xnc_ssh is only a wrapper for x11vnc that sets up port forwarding via ssh so you don't have to have the X server listen on outside internet ports... Not sure how exactly the 'data acquisition' is done - but likely some sort of framebuffer grab is the reason for the slowness and the high load? How can I force the intel driver to use glamor? Attached are the two xrandr outputs (but they are identical....) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c5 Stefan Dirsch <sndirsch@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(P.Suetterlin@roya | |c.iac.es) --- Comment #5 from Stefan Dirsch <sndirsch@suse.com> --- Ok. So it's not exactly headless, just a laptop with 2560x1440 internal display (interesting!), which you then switch later by autologin to 1080p. Ok. Now I remember a bit. x11vnc is an Xclient, which grabs the whole Xsession somehow and provides it via VNC protocol. Not sure why you want to do this at all. Why not just use our remote administration, where a displaymanager is started, which then triggers startup of Xvnc when a VNC viewer connects, the user can login via a greeter and then a Xsession gets started? I mean, if you want to use VNC anyway ...
How can I force the intel driver to use glamor?
I apologize. It's indeed not possible with intel driver. Mixed it up with radeon driver. :-( # man intel Option "AccelMethod" "string" Select acceleration method. There are a couple of backends available for accelerating the DDX. "UXA" (Unified Acceleration Archi- tecture) is the mature backend that was introduced to support the GEM driver model. It is in the process of being superseded by "SNA" (Sandybridge's New Acceleration). Until that process is complete, the ability to choose which backend to use remains for backwards compatibility. In addition, there are a pair of sub-options to limit the acceleration for debugging use. Specify "off" or "none" to disable all acceleration, or "blt" to disable render acceleration and only use the BLT engine. Default: use SNA (render acceleration) Diffferent options than "SNA" would be needed to specify via /etc/X11/xorg.conf.d/50-device.conf. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c6 Peter Sütterlin <P.Suetterlin@royac.iac.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #805259|0 |1 is obsolete| | Flags|needinfo?(P.Suetterlin@roya | |c.iac.es) | --- Comment #6 from Peter Sütterlin <P.Suetterlin@royac.iac.es> --- Created attachment 805266 --> http://bugzilla.opensuse.org/attachment.cgi?id=805266&action=edit xrandr outputs (corrected) (In reply to Stefan Dirsch from comment #5)
Ok. So it's not exactly headless, just a laptop with 2560x1440 internal display (interesting!), which you then switch later by autologin to 1080p.
Oh shit. Mea maxima culpa :(( I ran it in the wrong terminal (an ssh -X session), so that was indeed my laptops setting. Guess I need some coffee.
Ok. Now I remember a bit. x11vnc is an Xclient, which grabs the whole Xsession somehow and provides it via VNC protocol.
Yes.
Not sure why you want to do this at all.
Grown setup. Initially had a monitor, but I disconnected it once everything ran fine. I've considered using an Xvnc only setup, but had not yet started reading how to do this. But to be sure, I have just reassured that it is not an issue of not having a monitor connected (I found one mention of a similar slowdown when no monitor was connected). But even with a real monitor, the remote session stays sluggish with dropouts, so it seems it's a different issue. So I think the issue is still worth investigating, no? (The main issue is already 'solved' by using the intel driver)
I mean, if you want to use VNC anyway ...
Sure :) This is just our standard way here for connecting to the various computers in the observatory for user support. And you always use what you're used to (even if its a hammer for a screw ;^> ) Attached the correct xrandr outputs (sorry again...) - now they indeed differ. I'll see what I can do with driver options. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c7 Stefan Dirsch <sndirsch@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|modesetting driver and |Gemini Lake: Bad |xvnc: bad performance |performance when connecting | |via x11vnc if modesetting | |instead of intel driver is | |being used --- Comment #7 from Stefan Dirsch <sndirsch@suse.com> --- xrandr outputs are more or less identical. Outputs are named differently, but this is to be expected for different X drivers. And in both cases the native resolution is detected as 1080p. So that's fine. It's the first time I hear a customer using Xorg with intel/modesetting as (pseudo-) headless Xserver and then connecting via x11vnc(_ssh) instead of just using VNC, but Ok. As you wish. I remember a customer using Xorg+dummy driver (really headless!) as virtual Xserver and then just doing rendering and screenshottting the results. But for this you could also use Xvfb ... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 Stefan Dirsch <sndirsch@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 - Medium |P4 - Low Severity|Normal |Minor -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c8 Stefan Dirsch <sndirsch@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(P.Suetterlin@roya | |c.iac.es) --- Comment #8 from Stefan Dirsch <sndirsch@suse.com> --- Another idea, maybe you're falling back to Software Rendering. Could you provide the output of glxinfo | grep 'OpenGL render' when using modesetting driver? Maybe the appropriate Mesa package is missing. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c9 Peter Sütterlin <P.Suetterlin@royac.iac.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(P.Suetterlin@roya | |c.iac.es) | --- Comment #9 from Peter Sütterlin <P.Suetterlin@royac.iac.es> --- (In reply to Stefan Dirsch from comment #8)
Another idea, maybe you're falling back to Software Rendering. Could you provide the output of
glxinfo | grep 'OpenGL render'
when using modesetting driver? Maybe the appropriate Mesa package is missing.
No, that seems fine: astro@astro1:~> grep 'OpenGL render' glxinfo.* glxinfo.intel:OpenGL renderer string: Mesa DRI Intel(R) UHD Graphics 600 (Geminilake 2x6) glxinfo.modeset:OpenGL renderer string: Mesa DRI Intel(R) UHD Graphics 600 (Geminilake 2x6) I agree that my special case can be solved differently, still, connecting to a running X server via x11vnc is a quite standard use case, though I agree it's low priority. I just remembered I have some other intel graphics computers around here, Shuttle with HD5500: OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 5500 (Broadwell GT2) OS is Leap 42.3. It's also running modesetting, but does not show the lag. So it might really be linked to the support of Gemini Lake.. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c10 --- Comment #10 from Stefan Dirsch <sndirsch@suse.com> --- Yes, it would be possible that Mesa's Gemini Lake driver is just damn slow. I believe not many are using it with (open)SUSE, since it's mainly for Tablet market, if I'm not wrong here ... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c11 --- Comment #11 from Peter Sütterlin <P.Suetterlin@royac.iac.es> --- (In reply to Stefan Dirsch from comment #10)
Yes, it would be possible that Mesa's Gemini Lake driver is just damn slow. I believe not many are using it with (open)SUSE, since it's mainly for Tablet market, if I'm not wrong here ...
Not (only) tablets. There's also several ITX boards. E.g., my Media PC has one (Celeron J4105). I mostly wanted it to be reported somewhere (do such reports propagate upstream?) So if you prefer closing the issue it's fine with me, too. But I'm definitely willing to help/test things if needed. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c12 Stefan Dirsch <sndirsch@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(P.Suetterlin@roya | |c.iac.es) --- Comment #12 from Stefan Dirsch <sndirsch@suse.com> --- Let's measure the performance of the Mesa driver. Add the following to /usr/share/drirc.d/00-mesa-defaults.conf <application name="Default"> <option name="vblank_mode" value="0" /> </application> inside the <device> ... </device> section. This should give you the real FPS numbers when running glxgears. Then run a) LIBGL_SHOW_FPS=1 glxinfo b) LIBGL_SHOW_FPS=1 LIBGL_ALWAYS_SOFTWARE=1 glxgears and compare the numbers, e.g. on my sytem I'm getting 9000 vs. 1500 fps. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c13 Peter Sütterlin <P.Suetterlin@royac.iac.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(P.Suetterlin@roya | |c.iac.es) | --- Comment #13 from Peter Sütterlin <P.Suetterlin@royac.iac.es> --- Assuming a) should also run glxgears, not glxinfo: With modesetting driver 3720 (accel) vs. 1000 (soft) With intel driver 3266 (accel) vs. 950 (soft) If I connect via x11vnc, the accelerated performance for both intel and modesetting goes down to approx 2400. So it seems it's not the driver performance itself - modesetting is even faster than intel for this stuff.... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c14 --- Comment #14 from Stefan Dirsch <sndirsch@suse.com> --- Yes, should have been glxgears also for option a. ;-) At least numbers for accel are more than 3 times faster than software. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c15 --- Comment #15 from Stefan Dirsch <sndirsch@suse.com> --- If you want you can also do more sophisticated tests like running Phoronix Test Suite. https://www.phoronix-test-suite.com/ and install and run e.g. unigine OpenGL benchmarks phoronix-test-suite install pts/unigine phoronix-test-suite run pts/unigine Software variant with export LIBGL_ALWAYS_SOFTWARE=1 phoronix-test-suite run pts/unigine On the upper right corner you can see a FPS number ... but could be that on your GPU/CPU you'll get 1 FPS for accelerated and software. :-( -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c16 --- Comment #16 from Peter Sütterlin <P.Suetterlin@royac.iac.es> --- Indeed, I don't think this is the computer to run such benchmarks on, and I also don't think the issue is the driver performance itself. To me it rather looks like some race condition between Xorg and x11vnc. Maybe it's worth opening a ticket on the libvnc github? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c17 --- Comment #17 from Stefan Dirsch <sndirsch@suse.com> --- (In reply to Peter Sütterlin from comment #16)
Indeed, I don't think this is the computer to run such benchmarks on, and I also don't think the issue is the driver performance itself. To me it rather looks like some race condition between Xorg and x11vnc. Maybe it's worth opening a ticket on the libvnc github?
Sure, you could try. Maybe they have an idea, what's going on here. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c18 --- Comment #18 from Peter Sütterlin <P.Suetterlin@royac.iac.es> --- https://github.com/LibVNC/x11vnc/issues/100 Let's see what they say ;^> -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c19 --- Comment #19 from Stefan Dirsch <sndirsch@suse.com> --- (In reply to Peter Sütterlin from comment #18)
https://github.com/LibVNC/x11vnc/issues/100
Let's see what they say ;^>
Thanks! I've subscribed myself to the issue now. ;-) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c20 --- Comment #20 from Peter Sütterlin <P.Suetterlin@royac.iac.es> --- Unfortunately no feedback from the libVNC crowd. But there had been a Mesa update (19.0.5), so I checked again, but the issue is still present. Will try again once 19.1 is out. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c21 --- Comment #21 from Stefan Dirsch <sndirsch@suse.com> --- I've submitted Mesa 19.1 today to factory/TW. ;-) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c26 --- Comment #26 from Peter Sütterlin <P.Suetterlin@royac.iac.es> --- Ah, mea culpa. So far no new info, and currently I'm abroad until mid/end March. I'll check again, then, and report back. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1135237 http://bugzilla.opensuse.org/show_bug.cgi?id=1135237#c36 --- Comment #36 from Peter Sütterlin <P.Suetterlin@royac.iac.es> --- Thanks a lot Stefan! That was a bunch of Tips and indeed an interesting read (even though quite some parts were 'chinese' for me...). I'll definitely try the suggestions ASAP! -- You are receiving this mail because: You are on the CC list for the bug.
participants (2)
-
bugzilla_noreply@novell.com
-
bugzilla_noreply@suse.com