GLX apps are swapping at the wrong refresh rate under Xwayland
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
X.Org X server |
Fix Released
|
Medium
|
|||
xorg-server (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bug Description
GLX apps are swapping at the wrong refresh rate under Xwayland.
My monitor runs at 59.95Hz and this is what I see:
Xwayland:
$ glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
428 frames in 5.0 seconds = 85.552 FPS
300 frames in 5.0 seconds = 59.993 FPS
301 frames in 5.0 seconds = 60.006 FPS
301 frames in 5.0 seconds = 59.983 FPS
301 frames in 5.0 seconds = 60.016 FPS WRONG
300 frames in 5.0 seconds = 59.999 FPS
300 frames in 5.0 seconds = 59.986 FPS
301 frames in 5.0 seconds = 60.004 FPS
301 frames in 5.0 seconds = 60.002 FPS
300 frames in 5.0 seconds = 59.998 FPS
$ weston-info | grep refresh
width: 1920 px, height: 1200 px, refresh: 59.950 Hz,
Xorg:
$ glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
481 frames in 5.0 seconds = 96.146 FPS
300 frames in 5.0 seconds = 59.952 FPS
300 frames in 5.0 seconds = 59.956 FPS
300 frames in 5.0 seconds = 59.943 FPS
300 frames in 5.0 seconds = 59.948 FPS RIGHT
300 frames in 5.0 seconds = 59.953 FPS
300 frames in 5.0 seconds = 59.951 FPS
300 frames in 5.0 seconds = 59.949 FPS
300 frames in 5.0 seconds = 59.956 FPS
300 frames in 5.0 seconds = 59.947 FPS
300 frames in 5.0 seconds = 59.952 FPS
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: xwayland 2:1.19.5-0ubuntu2
ProcVersionSign
Uname: Linux 4.13.0-25-generic x86_64
ApportVersion: 2.20.8-0ubuntu6
Architecture: amd64
CompizPlugins: No value set for `/apps/
Date: Tue Jan 30 13:30:34 2018
DistUpgraded: Fresh install
DistroCodename: bionic
DistroVariant: ubuntu
ExtraDebuggingI
GraphicsCard:
Intel Corporation Xeon E3-1200 v3 Processor Integrated Graphics Controller [8086:041a] (rev 06) (prog-if 00 [VGA controller])
Subsystem: Lenovo Xeon E3-1200 v3 Processor Integrated Graphics Controller [17aa:30a1]
InstallationDate: Installed on 2017-12-12 (48 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Alpha amd64 (20171211)
MachineType: LENOVO 30AJS05700
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: xorg-server
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/02/2015
dmi.bios.vendor: LENOVO
dmi.bios.version: FBKTB6AUS
dmi.board.name: SHARKBAY
dmi.board.vendor: LENOVO
dmi.board.version: SDK0E50519 PRO
dmi.chassis.type: 7
dmi.chassis.vendor: To Be Filled By O.E.M.
dmi.chassis.
dmi.modalias: dmi:bvnLENOVO:
dmi.product.family: To be filled by O.E.M.
dmi.product.name: 30AJS05700
dmi.product.
dmi.sys.vendor: LENOVO
version.compiz: compiz 1:0.9.13.
version.libdrm2: libdrm2 2.4.89-1
version.
version.
version.
version.
version.
version.
version.
Changed in xorg-server: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
Changed in xorg-server: | |
status: | Confirmed → Fix Released |
Looks like xwayland doesn't report the correct refresh rate/vsync timings(?) to clients. I've been working around compositor implementation flaws by using a custom EDID file. Now the compositors I've tried (Mutter, KWin, Sway) run at the correct 144 Hz, however xwayland clients still only refresh at 60 Hz.
This is bad because if using a monitor with no even multiple of 60 Hz (like 72, 75, or 144 Hz monitors), there is stutter instead of smooth playback. And I guess many common apps will be running through xwayland for quite some time.
I can also confirm the problem running glxgears, which runs v-synced and prints 60 FPS to the console.