Bug 467582 - GTK windows are mis-rendered and can't be interacted with after resuming session
Summary: GTK windows are mis-rendered and can't be interacted with after resuming session
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 5.27.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-19 18:58 UTC by David
Modified: 2023-04-16 12:34 UTC (History)
2 users (show)

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


Attachments
gtk_window_is_cut_off (164.24 KB, image/png)
2023-03-19 18:58 UTC, David
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David 2023-03-19 18:58:50 UTC
Created attachment 157427 [details]
gtk_window_is_cut_off

SUMMARY
Once plasma reaches the point of turning off the screen, if I resume the session, GTK apps apps will not be usable anymore until closed and launched again, as they become a static picture of their top-left corner put on top of a black background and don't react to input (see attached picture).

STEPS TO REPRODUCE
1. Launch some GTK app like sublime or evolution.
2. Go away for half an hour so that plasma would lock the screen, then turn it off automatically (or however the next thing it does is called).
3. Resume the session by pressing some key and re-entering your user password.

OBSERVED RESULT
All or most windows of GTK apps now become static (they have a fixed picture). The top-left corner of the window will have a snapshot of whatever was there before the screen got locked, while the rest turns into a black patch. if the lockscreen showed the music player controls, those will keep being shown over the black patch at the top-right corner where they would show on the lock screen. Sometimes, if there are many windows of the same app open, some random window might survive this and return usable like QT windows do.

EXPECTED RESULT
All apps should resume normally.

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux 12
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.0-6-amd64 (64-bit)
Graphics Platform: X11
Processors: 20 × 12th Gen Intel® Core™ i7-12700H
Memory: 62.5 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: SLIMBOOK
Product Name: Executive
ADDITIONAL INFORMATION
Comment 1 Nate Graham 2023-04-04 21:17:55 UTC
If you toggle compositing off and back on with Alt+Shift+F12, does the issue go away?

If not, does it work to restart KWin with `systemctl restart --user plasma-kwin_x11.service` in a terminal window?
Comment 2 David 2023-04-05 16:58:24 UTC
(In reply to Nate Graham from comment #1)
> If you toggle compositing off and back on with Alt+Shift+F12, does the issue
> go away?
> 
> If not, does it work to restart KWin with `systemctl restart --user
> plasma-kwin_x11.service` in a terminal window?

With Alt+Shift+F12, there's no effect - windows are still mostly blacked out.

With 'systemctl restart --user plasma-kwin_x11.service', there is a different effect: now opening any windows of the app where this happened will show a screenshot of what my screen was showing at the moment I issued that command, without showing any trace of the actual app window other than the titlebar.
Comment 3 Nate Graham 2023-04-06 14:56:14 UTC
How utterly bizarre.
Comment 4 Fushan Wen 2023-04-13 16:22:23 UTC
Looks like some evil bugs in Mesa. Is the bug also reproducible on GNOME?
Comment 5 David 2023-04-16 12:34:10 UTC
(In reply to Fushan Wen from comment #4)
> Looks like some evil bugs in Mesa. Is the bug also reproducible on GNOME?

No, it doesn't happen in GNOME. Although I'm not sure if it should, since screen locking in gnome works differently than in KDE (e.g. display turns off much quicker, then enters suspend).