Bug 413174 - 5.17 lost the ability to detect when a monitor is unplugged during a session
Summary: 5.17 lost the ability to detect when a monitor is unplugged during a session
Status: RESOLVED DUPLICATE of bug 372837
Alias: None
Product: KScreen
Classification: Plasma
Component: common (show other bugs)
Version: 5.17.0
Platform: Manjaro Linux
: HI major
Target Milestone: 1.0
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2019-10-19 07:12 UTC by Michał Dybczak
Modified: 2019-11-12 22:09 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Dybczak 2019-10-19 07:12:22 UTC
Before I could plug the HDMI cable and the secondary monitor showed up and the option to choose what to with the screen was made active. When I unplugged the cable, the option was grayed out and the monitor defaulted to its usual one monitor setup.

After 5.17 update that is no longer true. When plugging in the secondary monitor nothing happens. I must at least reload session but this produces incredibly buggy effects so the real solution now is to REBOOT the system to get the second monitor working.
The same issue is when I detach or turn off the secondary monitor. The system still "thinks" the other monitor is on and providing output for it. The multi-monitor options are active. Again, the reboot is the only real workable solution now.

To sum up, a reboot is needed for proper detection of the additional monitor was plugged in or off. Something is failing hard here. Again, reloading session somewhat helps but produces incredibly buggy results so the issue somewhat persists between sessions.

Together with other multi-monitor issues, Plasma 5.17 crippled the experience seriously.
Comment 1 Nate Graham 2019-10-19 14:22:12 UTC
Just fixed!
Comment 2 Michał Dybczak 2019-10-20 11:44:53 UTC
Awesome! Thanks :). I'll wait for the update then and report if it helped.
Comment 3 Roman Gilg 2019-10-20 16:58:58 UTC
(In reply to Nate Graham from comment #1)
> Just fixed!

How should

https://cgit.kde.org/kscreen.git/commit/?h=Plasma/5.17&id=2ab4c2f136c5d7c00cd08e99f43670b55a2a6a58

fix the issue described here?

I could use some more information from you: run xrandr -q before and after the hot plug. What does the screen configuration KCM KScreen show?
Comment 4 Michał Dybczak 2019-10-20 19:51:34 UTC
Laptop's screen:

Screen 0: minimum 320 x 200, current 3520 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+1600+0 (normal left inverted right x axis y axis) 382mm x 215mm


Secondary monitor:

HDMI-1-3 connected 1600x900+0+0 (normal left inverted right x axis y axis) 434mm x 236mm



After I unplugged it, the system didn't detect it, but when I ran command xrandr -q it blinked and recognized the other monitor is off.

So somehow using xrandr updates the state but without it, it's not.

The other way is true as well. I plugged in the second monitor, monitor detected that something was plugged and showed "scanning HDMI signal" but there was no signal because the system didn't react to it. This wasn't changing untill I used xrandr command again, screens flickered, the picture in secondary monitor showed up. By the way, browser and terminal window moved to the second screen although they were originally in the first one. One could write a book about multi-monitor setup inconsitencies and weird things.
Comment 5 Michał Dybczak 2019-10-23 19:14:46 UTC
I updated to Plasma 5.17.1, rebooted, unplugged the secondary monitor and no change. The system still isn't aware of that fact and is outputting to the unexisting monitor.

It looks like the concerns and doubts of some users here came true. The fix wasn't addressing this issue at all.
Comment 6 Michał Dybczak 2019-10-24 16:23:02 UTC
Today I plugged in the second monitor and it was detected automatically, so it looks like I need to gather more data to judge what is going on and if the patch really helped or not.
Comment 7 Nate Graham 2019-10-24 16:30:14 UTC
Darn.

In my recent experience, it detects monitors that are plugged in, but has trouble with monitors that are unplugged.
Comment 8 Michał Dybczak 2019-10-27 09:01:52 UTC
Yes, that is my experience too. So it got better with 5.17.1 update but partially. This is not done yet.
Comment 9 Nate Graham 2019-11-10 17:50:50 UTC
I went to debug this with Roman today but found that I'm no longer able to reproduce the issue with either Plasma 5.17.3 or git master. Are you?
Comment 10 Nate Graham 2019-11-10 21:21:37 UTC
Out of curiosity, can you reproduce this only when you unplug the device while it's off/asleep, or can you also reproduce it when you unplug the device while it's displaying something?
Comment 11 Nate Graham 2019-11-10 21:24:03 UTC

*** This bug has been marked as a duplicate of bug 372837 ***
Comment 12 Guo Yunhe 2019-11-10 22:35:12 UTC
Some friends said the problem disappeared after upgrading to kernel 5.3.8. I also didn't reproduce this problem for the whole week, plugging and unplugging HDMI many times. If any of you can still reproduce this, what is the kernel version you are using? Can you try to upgrade to kernel 5.3.8 and retry?
Comment 13 Michał Dybczak 2019-11-12 22:09:39 UTC
I have kernel 5.3.10 and just upgraded to Plasma 5.17.3. Unplugging secondary monitor don't trigger any reaction. So the issue is still there :(