Bug 490081 - Wayland: 2nd screen black, but display is on
Summary: Wayland: 2nd screen black, but display is on
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: platform-drm (show other bugs)
Version: 6.1.2
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-11 07:18 UTC by Lassi Väätämöinen
Modified: 2024-07-17 08:09 UTC (History)
1 user (show)

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


Attachments
Journal from the boot-up showing the incident (609.52 KB, text/plain)
2024-07-11 07:18 UTC, Lassi Väätämöinen
Details
Journal from the successful boot afterwards, 2nd screen OK (560.73 KB, text/plain)
2024-07-11 07:36 UTC, Lassi Väätämöinen
Details
Drm info, 2nd screen black (380.73 KB, text/plain)
2024-07-16 07:57 UTC, Lassi Väätämöinen
Details
Drm info, screens OK (380.73 KB, text/plain)
2024-07-16 07:58 UTC, Lassi Väätämöinen
Details
Screenshot, left display black, screenshot OK (1.73 MB, image/png)
2024-07-16 07:58 UTC, Lassi Väätämöinen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lassi Väätämöinen 2024-07-11 07:18:31 UTC
Created attachment 171558 [details]
Journal from the boot-up showing the incident

SUMMARY
Second display in the setup is showing black, but windows can be moved from/to the second display. Display is hence identified and powered on, and desktop is functional, but nothing is shown.

This seems to happen systematically on every first boot of the day, since upgrading to Plasma 6.1.2.


STEPS TO REPRODUCE
1. Upgrade to Plasma 6.1.2
2. Boot up the machine in the morning
3. Log in from SDDM greeter

OBSERVED RESULT
Second screen is black on the first boot

EXPECTED RESULT
Second screen should show the desktop as normal.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 6.0
KDE Plasma Version: 6.1.2
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.0
Kernel Version: 6.2.0-33-generic (64-bit)
Graphics Platform: Wayland
Processors: 16 × 11th Gen Intel® Core™ i7-11850H @ 2.50GHz
Memory: 46,8 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Manufacturer: LENOVO
Product Name: 20YRS21300
System Version: ThinkPad P15 Gen 2i


ADDITIONAL INFORMATION
After re-login, the desktop seems to work. (At least yesterday. At the time of writing I am still on my first boot, so desktop is black.)
Comment 1 Lassi Väätämöinen 2024-07-11 07:21:29 UTC
Not sure if this is notable, but it looks like the "Log Out" function is also broken. Log out screen shows up, but confirming log out has no effect. And re-doing the log out action again, no effect again.
Comment 2 Lassi Väätämöinen 2024-07-11 07:22:24 UTC
(In reply to Lassi Väätämöinen from comment #1)
> Not sure if this is notable, but it looks like the "Log Out" function is
> also broken. Log out screen shows up, but confirming log out has no effect.

Same with Reboot.
Comment 3 Lassi Väätämöinen 2024-07-11 07:34:25 UTC
One more thing: SDDM is displayed on both screen, as it has always been (with some glithces, but still). After the login and handover to Wayland the second screen is always black for a while, going to powersave, but starts up properly after a second or two.

Now with this problem, the screen just stays black, but powered on. Wayland just is not running on the second screen.
Comment 4 Lassi Väätämöinen 2024-07-11 07:36:41 UTC
Created attachment 171560 [details]
Journal from the successful boot afterwards, 2nd screen OK
Comment 5 Lassi Väätämöinen 2024-07-11 07:46:54 UTC
I have no idea what is the role of 'kwin_screencast', but there are no lines displaying that in the broken case.

In the OK-case, there are lines like these in the journal:

heinä 11 10:31:04 mopo kwin_wayland[2539]: kwin_core: authorized "/usr/bin/plasmashell" "zkde_screencast_unstable_v1"
heinä 11 10:31:04 mopo kwin_wayland[2539]: kwin_screencast: "org.kde.konsole" state changed unconnected  ->  connecting
heinä 11 10:31:04 mopo kwin_wayland[2539]: kwin_screencast: "org.kde.konsole" stream created, drm format: "AR24 little-endian (0x34325241)" with DMA-BUF: true
heinä 11 10:31:04 mopo kwin_wayland[2539]: kwin_screencast: "org.kde.konsole" state changed connecting  ->  paused
heinä 11 10:31:07 mopo kwin_wayland[2539]: kwin_screencast: "org.kde.konsole" Stream dmabuf modifiers received, offering our best suited modifier true
heinä 11 10:31:07 mopo kwin_wayland[2539]: kwin_screencast: "org.kde.konsole" Stream format found, defining buffers
heinä 11 10:31:07 mopo kwin_wayland[2539]: kwin_screencast: "org.kde.konsole" announcing stream params. with dmabuf: true
heinä 11 10:31:07 mopo kwin_wayland[2539]: kwin_screencast: "org.kde.konsole" state changed paused  ->  streaming
heinä 11 10:31:08 mopo kwin_wayland[2539]: kwin_screencast: "org.kde.konsole" state changed streaming  ->  paused
heinä 11 10:31:08 mopo kwin_wayland[2539]: kwin_screencast: "org.kde.konsole" state changed paused  ->  unconnected
heinä 11 10:31:10 mopo kwin_wayland[2539]: kwin_core: authorized "/usr/bin/plasmashell" "zkde_screencast_unstable_v1"
heinä 11 10:31:10 mopo kwin_wayland[2539]: kwin_screencast: "org.kde.konsole" state changed unconnected  ->  connecting
heinä 11 10:31:10 mopo kwin_wayland[2539]: kwin_screencast: "org.kde.konsole" stream created, drm format: "AR24 little-endian (0x34325241)" with DMA-BUF: true
heinä 11 10:31:10 mopo kwin_wayland[2539]: kwin_screencast: "org.kde.konsole" state changed connecting  ->  paused
heinä 11 10:31:10 mopo kwin_wayland[2539]: kwin_screencast: "org.kde.konsole" Stream dmabuf modifiers received, offering our best suited modifier true
heinä 11 10:31:10 mopo kwin_wayland[2539]: kwin_screencast: "org.kde.konsole" Stream format found, defining buffers
heinä 11 10:31:10 mopo kwin_wayland[2539]: kwin_screencast: "org.kde.konsole" announcing stream params. with dmabuf: true
heinä 11 10:31:10 mopo kwin_wayland[2539]: kwin_screencast: "org.kde.konsole" state changed paused  ->  streaming
heinä 11 10:31:10 mopo kwin_wayland[2539]: kwin_screencast: "org.kde.konsole" state changed streaming  ->  paused
heinä 11 10:31:10 mopo kwin_wayland[2539]: kwin_screencast: "org.kde.konsole" state changed paused  ->  unconnected
Comment 6 Zamundaaa 2024-07-11 14:49:36 UTC
Please attach the output of drm_info when the screen is working, and when it's black.
If you take a screenshot of all displays, does the content on it show up even though you don't see it yourself?
Comment 7 Lassi Väätämöinen 2024-07-12 08:50:03 UTC
(In reply to Zamundaaa from comment #6)
> Please attach the output of drm_info when the screen is working, and when
> it's black.

OK, I'm prepared to check it the next time. This morning the first boot was fine, surprisingly, so both screens were fine.

But occasionally I do observe the same second screen going blank for a second and it comes back right after. But this has been a longer time issue, not just with Plasma 6.X
Comment 8 Lassi Väätämöinen 2024-07-16 07:57:34 UTC
Created attachment 171701 [details]
Drm info, 2nd screen black
Comment 9 Lassi Väätämöinen 2024-07-16 07:58:03 UTC
Created attachment 171702 [details]
Drm info, screens OK
Comment 10 Lassi Väätämöinen 2024-07-16 07:58:34 UTC
Created attachment 171703 [details]
Screenshot, left display black, screenshot OK
Comment 11 Lassi Väätämöinen 2024-07-16 08:03:13 UTC
Added the requested logs.

Also, there seems to be an auxiliary issue that occurs in the same setup as this "black screen"-issue; Logout, Shutdown etc. functions do not work.

For example, when trying logout, journal says this:

heinä 16 10:54:54 mopo dbus-daemon[11471]: [session uid=1000 pid=11471] Successfully activated service 'org.kde.Shutdown'
heinä 16 10:54:54 mopo kwin_wayland[11508]: kwin_core: storing session "saved at previous logout" in phase 0
heinä 16 10:54:54 mopo kwin_wayland[11508]: kwin_core: storing session "saved at previous logout" in phase 1
heinä 16 10:54:54 mopo kwin_wayland[11508]: kwin_core: Closing windows
heinä 16 10:54:54 mopo systemd[11448]: Stopped target plasma-workspace-wayland.target.


The open windows on the desktop do close, but the session stays on, and fully functional otherwise.
Comment 12 Lassi Väätämöinen 2024-07-16 08:27:00 UTC
(In reply to Lassi Väätämöinen from comment #11)
> Also, there seems to be an auxiliary issue that occurs in the same setup as
> this "black screen"-issue; Logout, Shutdown etc. functions do not work.

Actually the logout/shutdown failure seems to happen also when the using the laptop internal screen only.
Comment 13 Lassi Väätämöinen 2024-07-16 08:52:35 UTC
MORE INFORMATION

When I do:

'killall kwin_wayland'

It takes a while the screen flashes to "powersave" mode, as it does normally when no input signal is received. Then after a while the desktop appears normally.

BUT: when I move the mouse pointer to the second screen. it goes black.
Comment 14 Lassi Väätämöinen 2024-07-16 08:58:12 UTC
(In reply to Lassi Väätämöinen from comment #13)
> BUT: when I move the mouse pointer to the second screen. it goes black.

This is what appears in 'journalctl -xef' , when I moved the mouse pointer to the 2nd screen and it went black:

>heinä 16 11:54:23 mopo kwin_wayland[7827]: kwin_scene_opengl: 0x20092: Program/shader state performance warning: Fragment shader in program 4 is being recompiled based on GL state.


These lines shown too, but not sure if they are related:

>heinä 16 11:54:29 mopo plasma_waitforname[7719]: org.kde.plasma.waitforname: WaitForName: Service was not registered within timeout
>heinä 16 11:54:29 mopo dbus-daemon[2632]: [session uid=1000 pid=2632] Activated service 'org.kde.KSplash' failed: Process org.kde.KSplash exited with status 1
Comment 15 Lassi Väätämöinen 2024-07-16 09:03:05 UTC
Killing the kwin_wayland really does not remedy the issue. The screen goes black every time the mouse cursor moves to the 2nd screen.

It still requires a reboot to remedy, but it is quite sporadic. It may work 30-50% of the cases, 50-70% boots showing the faulty behavior.
Comment 16 Lassi Väätämöinen 2024-07-16 15:24:38 UTC
SYSTEM INFO
NOTE: Lenovo Thunderbolt 4 dock used for connecting the displays. (Displayport + USB-C)
Comment 17 Lassi Väätämöinen 2024-07-17 08:09:05 UTC
There seems to be some kind of cross-dependency to bug 490081.

See for example todays use cases: https://bugs.kde.org/show_bug.cgi?id=490344#c2