Bug 456003 - When connecting laptop to a docking station with LID closed, internal screen inappropriately remains the primary one
Summary: When connecting laptop to a docking station with LID closed, internal screen ...
Status: REPORTED
Alias: None
Product: KScreen
Classification: Plasma
Component: common (show other bugs)
Version: 5.25.4
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-27 08:24 UTC by frederic.parrenin@univ-grenoble-alpes.fr
Modified: 2023-03-06 17:25 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description frederic.parrenin@univ-grenoble-alpes.fr 2022-06-27 08:24:24 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Use a laptop with LID closed, suspend state (Dell XPS13 9370 in my case)
2. Connect it to a usb-c docking station (Dell DS-1000 in my case) connected to an external screen
=> the greeter for unlocking goes to the external screen, which is good.
3. Enter your password for unlocking
=> The external screen is empty (just wallpaper) since the screen is set to secondary. The primary screen is the internal screen, which is bad since the LID is closed. You have to open the LID and then close it so that the external screen becomes the primary.

OBSERVED RESULT
The primary screen is the internal one, although the LID is closed

EXPECTED RESULT
The primary screen should be the external one, and the internal one should be deactivated.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian 12
KDE Plasma Version: 5.24.5/X11
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.4
Comment 1 Nate Graham 2022-06-27 18:41:33 UTC
Can you see if it's fixed in Plasma 5.25? We did a lot of multimonitor robustness work there. Thanks!
Comment 2 Bug Janitor Service 2022-07-12 04:36:52 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Bug Janitor Service 2022-07-27 04:36:09 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 4 frederic.parrenin@univ-grenoble-alpes.fr 2022-07-27 15:44:46 UTC
This bug still exists for me in 5.25.3.
Comment 5 frederic.parrenin@univ-grenoble-alpes.fr 2022-08-26 13:44:13 UTC
Still repro in 5.25.4.
Comment 6 frederic.parrenin@univ-grenoble-alpes.fr 2022-09-02 09:43:00 UTC
So, actually, to be precise, it seems the problem is slightly different now in 5.25.
When connecting the laptop to the docking station with LID closed and in suspend state, the laptop wakes up but the greeter goes to the laptop screen.
So you have to open the LID, unlock, and then close the LID.
There is another issue when unplugging the docking station with LID closed, that I will report separately.
Basically, it means that when plugging/unplugging a docking station, you have to open the LID, which is not optimal.
I hope these issues can be fixed.
Comment 7 frederic.parrenin@univ-grenoble-alpes.fr 2022-09-09 15:31:51 UTC
Just to add that this problem does not always happen, it is not 100% reproducible.
I would say something like 50% on average.
It is not clear to me in which circumstances it happens.
Comment 8 frederic.parrenin@univ-grenoble-alpes.fr 2022-09-16 10:19:06 UTC
Now I tried on the KDE Wayland session.
Connecting to a docking station with LID closed, the greeter does go to the external screen, so that is OK.
But once you unlocked the screen, the laptop screen is activated.
So you have to open and close the LID, so that KDE understand that the LID is really closed.
Comment 9 Nate Graham 2022-11-10 17:57:12 UTC
This should hopefully be fixed with the big screen arrangement refactor for Plasma 5.27.
Comment 10 frederic.parrenin@univ-grenoble-alpes.fr 2023-02-21 09:57:40 UTC
I do not experience this bug anymore.
I am on 5.27beta.
Comment 11 Nate Graham 2023-02-21 14:39:11 UTC
Excellent! It makes sense because 5.27 has a ton of fixes for multiscreen issues.
Comment 12 frederic.parrenin@univ-grenoble-alpes.fr 2023-02-23 13:27:10 UTC
Hmm, I think I spoke too quickly.
It still sometimes happen to me that the screen laptop is still activated when I connect the laptop to the docking station, despite the LID being closed.
There should be better checking that the LID is closed when waking up from suspend.
Comment 13 Nate Graham 2023-02-27 19:56:09 UTC
So you're saying that when you plug in the docking station while the lid is closed, the laptop wakes up and starts displaying output on the laptop screen despite the lid being closed?
Comment 14 frederic.parrenin@univ-grenoble-alpes.fr 2023-02-28 07:58:33 UTC
Yes, indeed, this is what seems to happen.
For example, I saw that when minimizing an app by clicking on its icon on the task bar, the window seems to come from the left of the screen, while there should be just one screen activated.
Comment 15 Nate Graham 2023-02-28 19:34:50 UTC
That's really weird! Can paste the output of running `kscreen-doctor -o` in a terminal window after it happens?
Comment 16 frederic.parrenin@univ-grenoble-alpes.fr 2023-03-02 16:00:55 UTC
OK, I will try to do it next time this happens.
Comment 17 frederic.parrenin@univ-grenoble-alpes.fr 2023-03-03 09:13:34 UTC
This again happened to me today.
I connected the laptop to the docking station with LID closed, and the laptop screen gets activated.
This is the output from kscreend-doctor:

$ kscreen-doctor -o
QSocketNotifier: Can only be used with threads started with QThread
Output: 1 eDP-1 enabled connected priority 2 Panel Modes: 0:3840x2160@60*! 1:3840x2160@48 Geometry: 0,0 1920x1080 Scale: 2 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: Automatic
Output: 2 DP-5 enabled connected priority 1 DisplayPort Modes: 0:3840x2160@30*! 1:2560x1440@60 2:2048x1280@60 3:2048x1152@60 4:1920x1200@60 5:2048x1080@24 6:1920x1080@60 7:1920x1080@60 8:1920x1080@60 9:1920x1080@50 10:1920x1080@24 11:1920x1080@24 12:1600x1200@60 13:1680x1050@60 14:1280x1024@75 15:1280x1024@60 16:1280x800@60 17:1152x864@75 18:1280x720@60 19:1280x720@60 20:1280x720@50 21:1024x768@75 22:1024x768@60 23:800x600@75 24:800x600@60 25:720x576@50 26:720x576@50 27:720x480@60 28:720x480@60 29:720x480@60 30:720x480@60 31:640x480@75 32:640x480@60 33:640x480@60 34:640x480@60 35:720x400@70 Geometry: 1920,0 1920x1080 Scale: 2 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: Automatic
Comment 18 frederic.parrenin@univ-grenoble-alpes.fr 2023-03-03 09:14:51 UTC
Then if I open and close the LID, things get back to normal again.