Bug 492641 - Monitor not detected by sddm if connected after boot but before login
Summary: Monitor not detected by sddm if connected after boot but before login
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.1.4
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-04 09:48 UTC by matterhorn103
Modified: 2025-05-06 16:45 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description matterhorn103 2024-09-04 09:48:09 UTC
SUMMARY
In my simple, single 1080p monitor setup, connected via HDMI, if the monitor is first connected after sddm has already started (presumably) and the login screen has been reached, the monitor is not detected and the PC continues to output no signal.

STEPS TO REPRODUCE
1. Disconnect monitor cable from output port on PC
2. Power on PC, wait until fan activity has died down or other indicator that boot process is complete and sddm should have been started
3. Reconnect monitor to PC
4. Observe no change

OBSERVED RESULT
Behaviour in different scenarios:

1. If the monitor is connected and on at boot, the sddm login screen displays fine and everything is ok.
2. If the monitor is connected and *off* at boot, but the monitor is then turned on, the monitor is detected and the login screen appears.
3. If the monitor is disconnected/switched off *while logged into a desktop Plasma session*, then reconnected/switched back on, the monitor is detected and everything reappears just fine.
4. If the monitor is *not connected at boot*, then connected before/at login, nothing is detected and nothing appears on screen; the monitor indicates that it is receiving no signal.

The results of trying different things after reaching case 4:

4a. If it is simply assumed that, even though it is not being displayed, the sddm login screen is indeed the current one, and an attempt is made to log in by typing the user password and pressing enter, the monitor is brought to life; however, it is the sddm login screen that appears, with an empty password field, not the Plasma desktop, as if sddm was simply restarted.
4b. Switching to an alternative tty using Ctrl+Alt+F4 etc. works fine, and from there sddm can simply be restarted using e.g. `sudo systemctl restart sddm.service`, at which point the login screen appears.
4c. Changing the input on the monitor to VGA and back to HDMI changes nothing.

EXPECTED RESULT
Attaching a new monitor should be successfully detected and displayed in the same way pre-login (by sddm) as is done mid-boot (not sure what by) and post-login (by Plasma shell presumably).

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: OpenSUSE Tumbleweed 20240829
Kernel: 6.10.5
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION
- Inspecting `/etc/sddm.conf` and `/etc/sddm.conf.d/kde_settings.conf` seems to indicate that sddm is running on the default X11 not Wayland (by absence of anything described at https://bbs.archlinux.org/viewtopic.php?id=289612) but Plasma is running under Wayland on my system.
- Display output is via HDMI from the GPU, which is an AMD Ryzen RX 6600.
Comment 1 matterhorn103 2024-09-04 09:56:39 UTC
Couple of additional observations:

- Re: 4a; simply pressing enter without typing the password first does nothing.
- It is not about whether something is physically plugged in to the GPU's HDMI port or not, as doing the disconnection/reconnection at the monitor's HDMI port has the same result.
Comment 2 Zamundaaa 2024-09-04 18:49:27 UTC
> Inspecting `/etc/sddm.conf` and `/etc/sddm.conf.d/kde_settings.conf` seems to indicate that sddm is running on the default X11 not Wayland
Does it work if you change that?
Comment 3 matterhorn103 2024-09-06 21:26:58 UTC
> > Inspecting `/etc/sddm.conf` and `/etc/sddm.conf.d/kde_settings.conf` seems to indicate that sddm is running on the default X11 not Wayland
> Does it work if you change that?

I'll check that in the coming days some time.

> 4a. If it is simply assumed that, even though it is not being displayed, the sddm login screen
> is indeed the current one, and an attempt is made to log in by typing the user password and
> pressing enter, the monitor is brought to life; however, it is the sddm login screen that appears,
> with an empty password field, not the Plasma desktop, as if sddm was simply restarted.

Correction โ€“ if the password is typed correctly, I am logged in, the monitor gets detected, and the Plasma desktop appears. Presumably that other time I made some error typing my password.
Comment 4 matterhorn103 2024-09-13 08:40:57 UTC
(In reply to Zamundaaa from comment #2)
> > Inspecting `/etc/sddm.conf` and `/etc/sddm.conf.d/kde_settings.conf` seems to indicate that sddm is running on the default X11 not Wayland
> Does it work if you change that?

My attempt to make sddm use Wayland resulted in a frozen black screen + cursor on every boot. So can't really confirm either way.

I struggled to find an official description of how to enforce Wayland, so I just created `/etc/sddm.conf.d/10-wayland.conf` as described on the forum https://discuss.kde.org/t/sddm-wayland-keyboard/7863 and on the Arch wiki https://wiki.archlinux.org/title/SDDM#Wayland
Comment 5 Bug Janitor Service 2024-09-28 03:47:08 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Zamundaaa 2025-05-06 16:45:52 UTC
As you can't test it with Wayland, KWin isn't involved.

FWIW I can't get my computer to properly boot without a screen connected either, but it doesn't seem to even reach SDDM. If I unplug the display and restart SDDM (using kwin_wayland), then reconnecting the screen makes it show up just fine.