Bug 491868

Summary: (X11, Intel w/ hybrid graphics) Desktop containment (but not panel) is lost and becomes black on external screen (no wallpaper, icons, or context menu) until plasmashell is restarted
Product: [Plasma] plasmashell Reporter: Oleg Gorobets <oleg.goro>
Component: Desktop ContainmentAssignee: Plasma Bugs List <plasma-bugs>
Status: REPORTED ---    
Severity: normal CC: kde, kdedev, nate, notmart
Priority: NOR Keywords: multiscreen
Version: 6.1.3   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=491891
https://bugs.kde.org/show_bug.cgi?id=484431
https://bugs.kde.org/show_bug.cgi?id=490040
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Oleg Gorobets 2024-08-18 17:18:13 UTC
SUMMARY

This issue is a follow-up to this one:
https://bugs.kde.org/show_bug.cgi?id=487134  with some minor differences.

I run KDE on a laptop with external display connected over HDMI. Built-in display is disabled in "Display Configuration" and external display is configured as the only one enabled.

After boot -> startx -> logout -> startx sequence black screen is shown on external display. No wallpaper, no icons, can't get a context menu on right-click. Only task panel is visible and usable.

It happens randomly but pretty consistently.

As a workaround I use the following command which restarts plasmashell and then everything is OK again:

kquitapp6 plasmashell && kstart plasmashell &

There are no errors in journal related to KDE, only some warnings but it is hard to tell if any of those are relevant to this issue. Let me know if any particular logs can help investigate the issue.

STEPS TO REPRODUCE
1. Have a laptop and external display
2. Connect external display over HDMI
3. Using "Display Configuration" disable built-in display and enable only external one
4. Reboot
5. KDE is loaded correctly via startx
6. Log out
7. startx

OBSERVED RESULT
Black screen.

EXPECTED RESULT
Wallpaper and icons.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION
Kernel Version: 6.6.42-1-lts (64-bit)
Graphics Platform: X11
Comment 1 Nate Graham 2024-08-19 21:02:06 UTC
Does it ever happen on Wayland too, or only ever on X11?
Comment 2 Oleg Gorobets 2024-08-19 21:17:39 UTC
(In reply to Nate Graham from comment #1)
> Does it ever happen on Wayland too, or only ever on X11?

I have never seen it with Wayland. It seems to be only X11 problem.
Comment 3 Nate Graham 2024-08-19 22:40:45 UTC
Thanks. We just got report in Bug 491891 that seems similar and that's on Wayland so let's see how that shakes out before declaring this to be an X11-only bug.
Comment 4 Nate Graham 2024-08-20 18:00:59 UTC
What kind of GPU do you have, out of curiosity?
Comment 5 Oleg Gorobets 2024-08-20 18:57:18 UTC
(In reply to Nate Graham from comment #4)
> What kind of GPU do you have, out of curiosity?

Hybrid graphics Intel+Nvidia, but only Intel is used while Nvidia is sitting in idle mode.
Intel Corporation Alder Lake-P GT2 [Iris Xe Graphics] (rev 0c).
Comment 6 Oleg Gorobets 2024-08-20 18:59:32 UTC
I was just able to reproduce the same while switching from Wayland to X11, same effect. 
1) Logout from Wayland, log in to X11 via startx  = black screen.
Comment 7 Nate Graham 2024-08-20 21:00:37 UTC
Thanks. Still only ever on X11, right? Never on Wayland?
Comment 8 Oleg Gorobets 2024-08-21 06:23:36 UTC
(In reply to Nate Graham from comment #7)
> Thanks. Still only ever on X11, right? Never on Wayland?

Right, Wayland was always clean, I have been using it for couple of months and never experienced this problem. It never had the "original" problem that X had (described in bug 487134) so now I don't expect Wayland to have "logout -> startplasma-wayland" problem. However I also tested this case several times and it was always OK for me. Speaking of X, I remember original issue since KDE 5.