Bug 504692 - java applications do not render their UI any more
Summary: java applications do not render their UI any more
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: xwayland (other bugs)
Version First Reported In: 6.4.80
Platform: Other Linux
: VHI grave
Target Milestone: ---
Assignee: KWin default assignee
URL: https://bugs.java.com/bugdatabase/vie...
Keywords: regression
Depends on:
Blocks:
 
Reported: 2025-05-23 09:20 UTC by slartibart70
Modified: 2025-05-27 14:19 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.5.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description slartibart70 2025-05-23 09:20:32 UTC
Hi,

severe problem: all java apps (e.g. jdownloader or dbvisualizer) do not render their UI any more in 6.4-dev version of plasma.

This was working fine a couple of days ago, but some of the recent updates broke this.
Intellij-Idea (also java) is an exception, they run under xwayland and this is still ok

What i tried so far:
- different java versions (21, 24)
- using envVars like
   export GDK_BACKEND=x11
   unset WAYLAND_DISPLAY
   QT_QPA_PLATFORM=xcb

but no success so far.

Interestingly, the java apps are not dead - they still work and e.g. in dbvisualizer, you can click in the (not drawn/black) ui where the menus are supposed to be. If you hit the right spot, the menu will open (properly drawn) and it also works correctly (functionality-wise, not ui-wise of course)

Any help on this?
Comment 1 slartibart70 2025-05-23 09:20:48 UTC
Operating System: Fedora Linux 42
KDE Plasma Version: 6.4.80
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.0
Kernel Version: 6.14.7-301.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Comment 2 slartibart70 2025-05-23 09:30:08 UTC
another effect:
if the app (if i hit the right spot, of course when clicking blindly in the app) opens a subwindow, like 'settings' or 'about' then the window contents are drawn initially and correctly.
But, the window-contents do not react on any resizing of the window - they are stuck to their initial size
Comment 3 slartibart70 2025-05-23 09:36:31 UTC
another machine i did not update is running

Operating System: Fedora Linux 42
KDE Plasma Version: 6.3.80
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.0
Kernel Version: 6.14.5-300.fc42.x86_64 (64-bit)

Here, java apps are still fine
Comment 4 Vlad Zahorodnii 2025-05-23 09:54:20 UTC
I can confirm jdownloader not rendering the contents.
Comment 5 Vlad Zahorodnii 2025-05-23 10:35:29 UTC
Recently we made kwin a non-reparenting window manager. Unfortunately, JDK has hardcoded that kwin is a reparenting window manager. As a workaround, try setting _JAVA_AWT_WM_NONREPARENTING=1 environment variable.
Comment 6 slartibart70 2025-05-23 10:40:25 UTC
can confirm:
The workaround fixes jdownloader and dbvisualizer
Comment 7 Bug Janitor Service 2025-05-23 12:23:11 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5518
Comment 8 Vlad Zahorodnii 2025-05-27 06:55:27 UTC
Git commit 167b331943c757f92766ca34f99fdd5b02d685bf by Vlad Zahorodnii.
Committed on 27/05/2025 at 06:37.
Pushed by vladz into branch 'master'.

startkde: Set _JAVA_AWT_WM_NONREPARENTING environment variable

AWT has a hard coded list of non-reparenting window managers. If a Java
application misdetects that the window manager reparents windows, it can
reject ConfigureNotify events and paint nothing on the screen.

Recently, kwin_wayland had been changed so it doesn't reparent windows
anymore. This broke some Java applications because of hardcoded WM
behaviors in AWT. There is no "nice" way to fix it, but an environment
variable can be set to instruct AWT that it's a non-reparenting window
manager.

M  +2    -0    startkde/config-startplasma.h.cmake
M  +10   -0    startkde/startplasma-wayland.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/167b331943c757f92766ca34f99fdd5b02d685bf