Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.
Admin message
The migration is almost done, at least the rest should happen in the background. There are still a few technical difference between the old cluster and the new ones, and they are summarized in this issue. Please pay attention to the TL:DR at the end of the comment.
Confirming this issue happens with more than just darktable. It appears to happen with any X11 app, I just noticed it with GIMP and notice it in many apps when in an X11-based DE session.
This bug seems to be limited to AMD RDNA cards which I don't yet have one yet, it would be great to have more information about whether this is correct or not.
Although this question was not directly addressed to me I want to give kernel information anyways. (whoops, I just see it was addressed to me as well ;-)
When I tested this the last time it was with Arch kernel 5.15.1 and 5.10.78 on EndeavourOS. My GPU still is
@p12tic I just checked what happens if I update all of the mentioned above packages again... and it seems the bug is no longer there. I checked it after restart of course. Both, xorg and wayland sessions work properly with Intellij (Build #IU-213.5744.223, built on November 27, 2021)
I use Manjaro with all updates installed today, Linux 5.16.5-1-MANJARO.
I am also experiencing these issues on a bunch of different programs, like Emacs, GIMP and gparted. The commonality between them seems to be that they're all GTK-based. I have a 5600XT.
This whole situation really drives me crazy. xorg does not get this issue fixed and I can not move to wayland because darktable has GUI problems with it. I am locked into this damn old xorg-server version 1.20.13.
A quick test to disable GLAMOR in Xwayland (as you said in #1359 (closed) that running Darktable in Xwayland causes the same artifacts) is to set the envvar XWAYLAND_NO_GLAMOR=1 prior to run your session (e.g. by adding it in /etc/environment).
You'll need to restart your entire session for this change to be applied.
Note that this will negatively impact performance and can cause other problems (like running out of shared memory or file descriptors), the goal in this test is to determine if the regression can be caused by a change in glamor between 1.20 and 21.1.
And it solves the issue. I can start darktable in wayland without GDK_BACKEND=wayland and I do NOT see the green square artefacts and the GUI is fine with the darktable leafs poping up right underneath the widget where they are supposed to be.
This is with xorg-xwayland 22.1.2-1 but all the rest of xorg is downgraded to the versions I have mentioned at the beginning of this thread.
Once you can build Xwayland from sources, it's pretty straightforward, see here how to do a bisection in git: https://git-scm.com/docs/git-bisect
The idea is that you mark one past good revision as "good", and current revision as "bad", then build and test each step and mark each step as good or bad, until you end up on the first "bad" commit that introduced the issue.
You do not have to install Xwayland each time, you can run it rootfull directly from the meson build tree, e.g.:
./build/hw/xwayland Xwayland :12
That will map a fullscreen black window (this is actually Xwayland's root window), and then you can test with Darktable using the DISPLAY=:12, i.e.:
DISPLAY=:12 darktable
If the icons look "fine", then you mark the commint as good with git bisect good, whereas if the icons look "bad", then you mark it bad with git bisect bad.
Each time you mark the currect commit as good or bad, git will select (by dichotomy) another commit to try until there is only one left.
Which puts the source back to xorg-server-1.19.99.905. Compilation works fine. git status says "Your branch is behind 'origin/master' by 1274 commits,"
Daft question surely, but are you sure you've installed the binary you just compiled?
Alternatively, as I said, you can also run directly the newly compiled binary with ./build/hw/xwayland/Xwayland (instead of /usr/local/xwayland//bin/Xwayland).
$ git bisect badYou need to start by "git bisect start"Do you want me to do it for you [Y/n]?
Go back to 7437b6dbd (the first commit to glamor/ after the 1.20 branch)
$ git checkout 7437b6dbdNote: switching to '7437b6dbd'.You are in'detached HEAD' state. You can look around, make experimentalchanges and commit them, and you can discard any commits you make in thisstate without impacting any branches by switching back to a branch.If you want to create a new branch to retain commits you create, you maydo so (now or later) by using -c with the switch command. Example: git switch -c <new-branch-name>Or undo this operation with: git switch -Turn off this advice by setting config variable advice.detachedHead to falseHEAD is now at 7437b6dbd glamor_init: clamp GLSL to 120 if platform doesn't have instanced arrays
Configuring xwayland-config.h using configurationRun-time dependency glproto found: YES 1.4.17Dependency gl found: NO found 1.2 but need: '>= 9.2.0'Run-time dependency gl found: NO (tried system)glx/meson.build:35:4: ERROR: Invalid version of dependency, need 'gl'['>= 9.2.0'] found '1.2'.A full log can be found at xserver/build/meson-logs/meson-log.txt
This is because there are a few commits that are needed to be able to build with recent libraries, namely:
Yikes! That's because older Xwayland rootfull required the Wayland protocol wl_shell which is now removed from GNOME Shell/mutter (deprecated in favor of xdg-shell).
This was fixed in Xwayland with commit 3d6efc4a but that commit won't apply on older versions of Xwayland, so we cannto do the git show | git apply dance there.
A possible solution would be to downgrade GNOME Shell to GNOME 41, but that might pull a lot of dependencies…
Alternatively, weston dropped wl_shell only in version 10, so quite recently. It might be easier for you to install an older version of weston and try to reproduce with weston.
And I see the artefacts.
How do I proceed now with the git bisect for xephyr?
Right, it's a good start, we also need to make sure the "old" Xephyr did not show the artefacts, but that's part of the bisection.
As you were in the middle of an (aborted) bisection, you'll need to do a git bisect reset to make sure we start from a clean sheet:
$ git bisect resetPrevious HEAD position was 7437b6dbd glamor_init: clamp GLSL to 120 if platform doesn't have instanced arraysSwitched to branch 'master'Your branch is up to date with 'origin/master'.
Redo the meson config again, enabling xephyr and glamor this time, and disabling the rest:
$ ./build/hw/kdrive/ephyr/Xephyr -br-ac-noreset-screen 2400x1080 -glamor :12 &$ DISPLAY=:12 darktable(Then stop both `Xephyr` and `darktable`)
Mark this commit "bad" (that's of course assuming the artefacts are there!)
$ git bisect badYou need to start by "git bisect start"Do you want me to do it for you [Y/n]? Y
Go back to 7437b6db (the first commit to glamor/ after the 1.20 branch)
$ git checkout 7437b6dbdNote: switching to '7437b6dbd'.You are in'detached HEAD' state. You can look around, make experimentalchanges and commit them, and you can discard any commits you make in thisstate without impacting any branches by switching back to a branch.If you want to create a new branch to retain commits you create, you maydo so (now or later) by using -c with the switch command. Example: git switch -c <new-branch-name>Or undo this operation with: git switch -Turn off this advice by setting config variable advice.detachedHead to falseHEAD is now at 7437b6dbd glamor_init: clamp GLSL to 120 if platform doesn't have instanced arrays
Rebuild with the "old" code
$ meson compile -C build/[…]Dependency glproto found: YES 1.4.17 (cached)Dependency gl found: NO found 1.2 but need: '>= 9.2.0'Run-time dependency gl found: NO (tried system)../glx/meson.build:35:4: ERROR: Invalid version of dependency, need 'gl'['>= 9.2.0'] found '1.2'.A full log can be found at xserver/build/meson-logs/meson-log.txtFAILED: build.ninja /usr/bin/meson --internal regenerate xserver xserver/build --backend ninjaninja: error: rebuilding 'build.ninja': subcommand failed
Normal, same as before, the "old" code needs a few tweaks to build with the more recent stack.
At this point, if the artefacts are still there, then the bisection is probably useless.
Clean your local repository (remember we applied some changes to be able to build):
$ git checkout --.
And mark this commit as "good" (Again, this is assuming the artefacts are not there):
$ git bisect goodBisecting: 617 revisions left to test after this (roughly 9 steps)[8315fc4ea2e04598ce0c7e9771786a9334f0d456] modesetting: add support for GBM_FORMAT_RGB565
So you know that you'll need to repeat this approximately 9 more times :)
And mark the commit as "good" or "bad" depending on the result.
Each step you make, you may have to apply some of the commits I listed to be able to build (that obviously depends on the actual bisection, so I cannot tell that in advance… it would be too easy!)
I have a first result. I did the bisect two times. And it gave me the same result both times, which is a good sign I think ;-)
# git bisect good8702c938b33b9ec180d64754eb922515c7c4a98b is the first bad commitcommit 8702c938b33b9ec180d64754eb922515c7c4a98bAuthor: Eric Anholt <eric@anholt.net>Date: Tue Mar 26 15:10:49 2019 -0700 glamor: Introduce a central place for our pixmap format/type handling. We had various helper functions trying to come up with the internalformat/format/type/render formats for pixmaps, and it's much nicer to just detect what those should be once at startup. This gives us a chance to do the right thing for GLES. It also, notably, fixes our format/type for depth 15 and 16 setup for desktop GL, so that we actually allocate 16bpp (GL_RGB/565) on most drivers instead of 32bpp (GL_RGB/UBYTE). GLES still has regressions over desktop (2 regressions in llvmpipe XTS, many in rendercheck), but I think this is a good baseline. Signed-off-by: Eric Anholt <eric@anholt.net> glamor/glamor.c | 167 ++++++++++++++++++++++++++++++++++++++++++++-- glamor/glamor_fbo.c | 16 ++--- glamor/glamor_picture.c | 7 +- glamor/glamor_priv.h | 22 +++++- glamor/glamor_render.c | 7 +- glamor/glamor_spans.c | 14 ++-- glamor/glamor_transfer.c | 56 ++-------------- glamor/glamor_transfer.h | 3 - glamor/glamor_transform.c | 5 +- glamor/glamor_utils.h | 57 ---------------- 10 files changed, 209 insertions(+), 145 deletions(-)
That's a fairly large commit that caused some regression in the past (as with commit e59e24c8) but in this particular case, I wonder if the bug is in the change itself or the change triggers a bug elsewhere in the stack (rationale being, it seems to be limited to some specific hardware).
# git fetch git@gitlab.freedesktop.org:ofourdan/xserver.git test-for-issue-1250git@gitlab.freedesktop.org: Permission denied (publickey,keyboard-interactive).fatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.
I've changed the commit but kept the branch, so you'll need to re-fetch the branch once again and do a git checkout -B, with a capital „B“ this time, i.e.:
For me the most irritating thing is, that the artifacts only show on thumbnails in darktable. The RAW pictures itself and all the rest of darktable is just fine. And so is the rest of the desktop. gimp also has some small artifacts with some widgets. But also here the pictures itself is fine.
And in darktable the artifacts go away when I hover the mouse over the thumbnail. As soon as I move the mouse away, the artifacts are back.
I dont know if it helps, but here is just one example of a darktable thumbnail file.
I can confirm exactly the same behavior in IntelliJ and Gimp. Haven't tried Darktable.
Interesting thing is that in my case it works fine when I use Xephyr (built on any commit mentioned here) under Wayland. It just doesn't work with the implicit xwayland apps
Interesting thing is that in my case it works fine when I use Xephyr (built on any commit mentioned here) under Wayland. It just doesn't work with the implicit xwayland apps