I can see only pale background instead image in image viewer when running Tropy in Wayland. There are no exclamation marks, images exist. I even consolidated all images, but that changed nothing. All is working as expected when running Tropy in XWayland. The same behaviour is in Tropy-bin from AUR and from version installed locally.
Manjaro linux (derivative of Arch) latest stable.
The image viewer component uses WebGL / direct rendering so that’s what must be causing the issue. In general, there are still plenty of issues running Electron apps in Wayland. The last time I tried Tropy it was fine when using the custom titlebars (the only issue I noticed was that the context menu shadows were missing).
In any case, you could try to see if these command-line option
No, this command-line didn’t help. WebGL is working in Firefox and Chrome based browsers, so it seems that’s not the cause too.
I wasn’t using Tropy some time, but several months ago Tropy was working in Wayland as expected, so this is regression.
I installed electron-bin (27 version) from AUR instead regular Electron (25 version). No change.
I can check older versions of Tropy if I’ll find them.
I’ve checked Tropy version 1.14.0 and it was working as expected.
If you want to test with different versions of electron, you also need to adjust the startup script in
/usr/bin/tropy. It might even work to test with 24 (I think that’s the one used by 1.14).
When you enable developer mode (in Tropy preferences) and then toggle the developer tools from the menu in the project window are the any errors relating to WebGL or direct rendering in the console? Also, if you check Tropy’s log file there should be a line there indicating whether the image viewer uses the ‘canvas’ or ‘webgl’ renderer (it should be webgl, but maybe the issue is down to bad feature detection).
I extracted old versions of standalone Tropy from borg backup. 1.14.0 is working, 1.15.1 – not.
Back to the actual version.
I don’t know exactly, which errors are related to WebGL or rendering :). But developer tools shows the same error four times:
VM195 index-_Z4Xsq5J.js:4816 PixiJS Error: Could not initialize shader.
and a lot of WebGL warnings:
VM195 index-_Z4Xsq5J.js:8382 WebGL: INVALID_OPERATION: useProgram: program not valid
VM195 index-_Z4Xsq5J.js:5356 WebGL: INVALID_OPERATION: drawElements: no valid shader program in use
VM195 index-_Z4Xsq5J.js:7408 WebGL: too many errors, no more errors
I could send you console log if I knew how to extract it :).
I’m attaching log file of this session (deleted position of tpy file).
tropy.log (9.1 KB)
Thanks! We’re getting closer. Just to make sure I got this right: the current release 1.15.2 works fine using XWayland (including the image viewer), the WebGL code only fails in Wayland?
Could you also send a log file when you start version 1.14? I’d like to make sure that WebGL is actually enabled there.
As a workaround until we’ve found a solution, you could try using the fallback canvas renderer. You can do this by disabling the ‘webgl’ option in
state.json in your user data directory. By default this should be at
~/.config/tropy/state.json but you can use
Help -> Show user data directory in Tropy to show you the location. Important: if you make a change to
state.json make sure that Tropy is not running otherwise your changes may get overwritten when you close it. If you disable webgl Tropy should fallback to the old 2d renderer and it’s possible that this will solve the issue for now (however, all the advanced filters will not work in the image viewer so this is only a temporary workaround at best).
Yes, current version works fine in XWayland.
Tropy v. 1.14 in Wayland (8.6 KB) and
tropy v. 1.15 in XWayland (8.1 KB)
It is working fine with webgl disabled. I need only to see images so that’s good temporary workaround.
Wait a moment, one idea. What if I’ll remove tropy folder from .config directory, create new project, upload several images and… Yes, I saw them in the image viewer.
There were some differences in state.json (frameless, debug, theme) but changing original one to resemble new one didn’t enabled viewing images with original config folder.
OK, I deleted electron, GPUCache and blob_storage folders from the original Tropy config folder. And yes, it is working now. Removing only electron folder is sufficient.
That should be first thing to do – remove config folder, I totally forgot to do that.
I’m including log of
tropy 15 in Wayland with deleted electron folder (8.5 KB) Maybe this Tropy uses canvas although I see no differences between different logs.
Thank you for such fast and kind assistance!
Both the 1.14 and 1.15 logs in Wayland have webgl disabled so they’re using the fallback renderer (which should be fine for all basic operations, pan, zoom, etc., but does not support shaders).
If you don’t need the filters we don’t really need to debug this further. But if you’d like to figure it out, I think we first need to establish if 1.14 is or isn’t working with webgl enabled on Wayland. If that’s the case the issue in 1.15 is most certainly linked to either the version of Electron or Pixi.js.
I see. OK, what should I do to establish that 1.14 is working or not with webgl?
Close Tropy and, while it’s closed, enable webgl in state.json. Then Start 1.14, view an image, and check the log file (or post it here).
This is log of tropy 14 (8.7 KB) The same situation, as I see.
This is content of state.json:
So I think that I was never using Tropy with webgl.
Are there other ways to forcibly launch Tropy with webgl enabled?
No, according to the logs this did use the WebGL renderer after all. It’s a bit confusing: the flag is only there to force Tropy to ignore a list of GPUs known to cause problems. So if you set the flag to true, Tropy will force the WebGL renderer. If it’s false, it will still try to use WebGL and in your case that’s what happened. So 1.14 works on Wayland with WebGL enabled.
So this means we should be able to get it to work in 1.15 too.
Difference in logs is
"opts" with webgl instead of
"args" when without it, as now I see :).
I wouldn’t even know that I’m working without webgl if I’d just removed electron folder from Tropy config after error :).
I don’t see any errors after that removal and can view images in last version. And both versions have saturation, contrast and other the same tools, I can use these tools in both versions too. Only difference I can see is different size of hand when above image (it is much bigger in 1.14).
Oh, so it’s working in 1.15 after all? Contrast, saturation, etc. are all implemented using shaders, so if those have an effect it’s definitely WebGL.
So, WebGL stopped working in Wayland, but clearing the electron folder in
.config/tropy fixed it?
Yes, I can see and use all tools. That’s
the log (8.6 KB)