Bug 492183 - joplin and vivaldi (both apps built with the ozone toolkit afaik) sometimes either dont open or show strange windows behaviour initially
Summary: joplin and vivaldi (both apps built with the ozone toolkit afaik) sometimes e...
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: core (other bugs)
Version First Reported In: 6.1.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-25 21:44 UTC by Liz Lee
Modified: 2024-08-28 11:08 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
journalctl -f joplin (5.60 KB, text/plain)
2024-08-25 21:44 UTC, Liz Lee
Details
journalctl -f vivaldi (2.60 KB, text/plain)
2024-08-25 21:45 UTC, Liz Lee
Details
kwin support information (6.07 KB, text/plain)
2024-08-25 21:47 UTC, Liz Lee
Details
wayland info center (10.39 KB, text/plain)
2024-08-25 21:47 UTC, Liz Lee
Details
journalctl -f with exact description of actions (5.31 KB, text/plain)
2024-08-28 10:45 UTC, Liz Lee
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Liz Lee 2024-08-25 21:44:31 UTC
Created attachment 172949 [details]
journalctl -f joplin

joplin and vivaldi show the same weird behaviour. both apps are built with the ozone toolkit afaik, and none of my other apps show this weird behavior.

both apps are installed via flatpak.
i run wayland. the x11 and the fallback x11 flatpack-permissions are NOT granted to either of the apps.

STEPS TO REPRODUCE
launch joplin/vivaldi

OBSERVED RESULT
- sometimes: the window is either not drawn at all (but the task manager shows it as launched). killing it and some attempts to launch it again usually helps in this case. 
- sometimes: the window is drawn but its treated as "maximized" though it has a "normal" (i.e. neither minimized nor maximized or even fullscreen) size. cliking the maximize/restore button does not work. it is not opened centered (as all other windows are) but rather on the top left. no shadwos are drawn. i can neither move nor resize the window with the mouse. minimizing the app to the tray and opening it from the tray helps in this case.
- sometimes (vivaldi only): the app is initially launched without problems. (joplin is never initially launched without problems)

EXPECTED RESULT
apps should be launched without problems.


SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 40
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.10.6-200.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Graphics Processor: AMD Radeon R9 380 Series



flatpak info joplin:
===============
     ID: net.cozic.joplin_desktop
         Ref: app/net.cozic.joplin_desktop/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 3.0.15
     License: MIT
      Origin: flathub
  Collection: org.flathub.Stable
Installation: system
   Installed: 760,5 MB
     Runtime: org.freedesktop.Platform/x86_64/23.08
         Sdk: org.freedesktop.Sdk/x86_64/23.08


flatpak info vivaldi:
================
ID: com.vivaldi.Vivaldi
         Ref: app/com.vivaldi.Vivaldi/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 6.8.3381.57
     License: LicenseRef-proprietary
      Origin: flathub
  Collection: org.flathub.Stable
Installation: system
   Installed: 407,3 MB
     Runtime: org.freedesktop.Platform/x86_64/23.08
         Sdk: org.freedesktop.Sdk/x86_64/23.08
Comment 1 Liz Lee 2024-08-25 21:45:01 UTC
Created attachment 172950 [details]
journalctl -f vivaldi
Comment 2 Liz Lee 2024-08-25 21:47:06 UTC
Created attachment 172951 [details]
kwin support information
Comment 3 Liz Lee 2024-08-25 21:47:22 UTC
Created attachment 172952 [details]
wayland info center
Comment 4 Nate Graham 2024-08-27 20:37:47 UTC
Are they running in native Wayland mode?

Do the issues go away if you restore X11 permissions to them?
Comment 5 Liz Lee 2024-08-28 09:07:43 UTC
short answer:
yes, they do in fact run wayland native mode (i tested it with xwininfo) and yes, the problems do in fact go away when the window is running in xwayland-mode.

long answer:

i did the following test:
(the flatpak permissions were managed by the kde system settings)
------------------------------------------------------------
1st test:

command to start the program:
/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=joplin-desktop --file-forwarding net.cozic.joplin_desktop @@u %u @@

notable cmd parameter:
(none specific)

flatpak permissions:
[v] wayland windowing system
[ ] x11 windowing system
[ ] fallback to x11 windowing system

=> results:
=> test with xwinfinfo: wayland native is used
=> problems do occur as described :(
------------------------------------------------------------
2nd test:

command to start the program:
/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=joplin-desktop --file-forwarding net.cozic.joplin_desktop @@u %u @@

notable cmd parameter:
(none specific)

flatpak permissions:
[v] wayland windowing system
[v] x11 windowing system
[v] fallback to x11 windowing system

=> results:
=> test with xwinfinfo: wayland native is used
=> problems do occur as described :(
------------------------------------------------------------
3rd test:

command to start the program:
/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=joplin-desktop --file-forwarding net.cozic.joplin_desktop @@u %u @@

notable cmd parameter:
(none specific)

flatpak permissions:
[ ] wayland windowing system
[v] x11 windowing system
[v] fallback to x11 windowing system

=> results:
=> test with xwinfinfo: xwayland or x11 window is being used
=> problems do NOT occur :)
------------------------------------------------------------
4th test:

command to start the program:
/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=joplin-desktop --file-forwarding net.cozic.joplin_desktop @@u %u @@ --ozone-platform=wayland

notable cmd parameter:
--ozone-platform=wayland

flatpak permissions:
[v] wayland windowing system
[ ] x11 windowing system
[ ] fallback to x11 windowing system

=> results:
=> test with xwinfinfo: wayland native is used
=> problems do occur as described above :(
------------------------------------------------------------
5th test:

command to start the program:
/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=joplin-desktop --file-forwarding net.cozic.joplin_desktop @@u %u @@ --ozone-platform=wayland

notable cmd parameter:
--ozone-platform=wayland

flatpak permissions:
[v] wayland windowing system
[v] x11 windowing system
[v] fallback to x11 windowing system

=> results:
=> test with xwinfinfo: wayland native is used
=> problems do occur as described above :(
------------------------------------------------------------
it does not make any difference wether the
[device access:]
[ ] direct graphic rendering
permission is granted or not.
------------------------------------------------------------
the flatpak permissions are:
$ flatpak info --show-permissions net.cozic.joplin_desktop
[Context]
shared=network;ipc;
sockets=wayland;pulseaudio;pcsc;cups;
devices=all;
features=bluetooth;
filesystems=home;

[Session Bus Policy]
org.kde.StatusNotifierWatcher=talk
org.freedesktop.Notifications=talk
com.canonical.AppMenu.Registrar=talk

[System Bus Policy]
org.freedesktop.Avahi=talk

[Environment]
GTK_PATH=/app/lib/gtkmodules
Comment 6 Liz Lee 2024-08-28 10:45:26 UTC
Created attachment 173036 [details]
journalctl -f with exact description of actions

i also attached a detailed description of actions und their resulting journalctl -f entries
Comment 7 Liz Lee 2024-08-28 11:08:29 UTC
one further observation:

setting up (or unsetting) kwin window rules (e.g. position, maximized vertically, maximized horizontally) somehow affect if joplin _is_ drawn the first time after opening it from the tray. _if_ it is drawn it will be in the wrong way as is described above: "the window is drawn but its treated as "maximized" though it has a "normal" (i.e. neither minimized nor maximized or even fullscreen) size. cliking the maximize/restore button does not work. it is not opened centered (as all other windows are) but rather on the top left. no shadwos are drawn."

nonetheless the rules do NOT affect _how_ it is drawn. any values of the kwin rule will be ignored.

it is unfortunately not in the slightest way reproducible. all i can say is that kwin rules do affect the behavior, but how they affect it is very erratic.