After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 772504 - [Patch] SYNC_TOLERANCE is too big causing flicker and blur on some monitors
[Patch] SYNC_TOLERANCE is too big causing flicker and blur on some monitors
Status: RESOLVED DUPLICATE of bug 772176
Product: mutter
Classification: Core
Component: wayland
git master
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks: WaylandRelated
 
 
Reported: 2016-10-06 10:03 UTC by Christian Stadelmann
Modified: 2016-10-06 14:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
a patch fixing the downstream bug (1.37 KB, patch)
2016-10-06 10:03 UTC, Christian Stadelmann
none Details | Review

Description Christian Stadelmann 2016-10-06 10:03:13 UTC
Created attachment 337058 [details] [review]
a patch fixing the downstream bug

For some monitors, including mine, there is a difference between running a monitor at 60 Hz or 59.94 Hz (which in reality is 60 Hz * 1001 / 1000).

Commit https://git.gnome.org/browse/mutter/commit/?id=9a07607 introduced a SYNC_TOLERANCE ignoring this fact, which causes some monitors to break (flicker, blur, see downstream bug https://bugzilla.redhat.com/show_bug.cgi?id=1379959).

The solution is changing SYNC_TOLERANCE to some value smaller than 0.001, e.g. 0.0005.

I've tested this patch and it makes the downstream bug go away. 

There is more work to be done: the GUI needs a way to distinguish between the two different screen resolutions properly.
Comment 1 Christian Stadelmann 2016-10-06 10:16:46 UTC
Testing doesn't work, I was running a X11 session when testing.

How can I use JHBuild to build mutter and run it under wayland? `jhbuild run gnome-shell --replace` won't work on Wayland.
Comment 2 Jonas Ådahl 2016-10-06 10:57:25 UTC
(In reply to Christian Stadelmann from comment #1)
> Testing doesn't work, I was running a X11 session when testing.
> 
> How can I use JHBuild to build mutter and run it under wayland? `jhbuild run
> gnome-shell --replace` won't work on Wayland.

To run a dumbed down slightly broken wayland gnome session (just in order to debug or reproduce an issue that doesn't require everything not display server specific working), switch to a VT and do:

XDG_SESSION_TYPE=wayland dbus-run-session -- jhbuild run gnome-session
Comment 3 Christian Stadelmann 2016-10-06 12:27:11 UTC
I managed to test my patch on gdm which worked fine afterwards. I did this by copying files from ~/jhbuild/install to /usr/ (most notably, libmutter). Due to the jhbuild builds trying to find files in ~/jhbuild/install, it didn't work for a gnome session, so I had to revert this.

(In reply to Jonas Ådahl from comment #2)
> XDG_SESSION_TYPE=wayland dbus-run-session -- jhbuild run gnome-session

That doesn't work. First it doesn't find Xwayland in ~/jhbuild/install/bin, which I "fixed" by symlinking. Second, it gives this warning and returns:

gnome-session-binary[30328]: WARNING: IceLockAuthFile failed: Datei oder Verzeichnis nicht gefunden

(message translates to : Cannot find file or directory)

and I cannot find a solution for this.

I also tried copying the /usr/share/wayland-sessions/gnome.desktop file, renamed it (file and some fields in the file) and changed its Exec= field, but I can't get it to show up. Gdm prints no error or warning messages either.
Comment 4 Christian Stadelmann 2016-10-06 14:11:07 UTC
I tried again, now building a fedora RPM with fedpkg. Issue is still present after applying this patch, even in gdm. I don't understand what's going on any more.
Comment 5 Rui Matos 2016-10-06 14:15:31 UTC
I don't think this value is wrong, I took it from X's modesetting driver. The real problem is bug 772176 .

*** This bug has been marked as a duplicate of bug 772176 ***
Comment 6 Christian Stadelmann 2016-10-06 14:17:15 UTC
Oh, thanks!