You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case of bug report: Expected behaviour you didn't see
Laptop should not suspend when external monitors connected.
In case of bug report: Unexpected behaviour you saw
Laptop suspend on login screen, virtual terminal and during shutdown/reboot
In case of bug report: Steps to reproduce the problem
Close the lid. On the login screen the laptop suspends. During shutdown/reboot the laptop suspends. (In KDE powerdevil ensures it does not suspend)
Okay, here's how far I got debugging this myself. We're running with a closed lid and external monitor connected. Now the first sign of trouble is that there is no multi-monitor inhibitor:
$ systemd-inhibit
Who: Screen Locker (UID 1000/wouter, PID 5647/ksmserver)
What: sleep
Why: Ensuring that the screen gets locked before going to sleep
Mode: delay
Who: PowerDevil (UID 1000/wouter, PID 5685/org_kde_powerde)
What: handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch
Why: KDE handles power events
Mode: block
Who: NetworkManager (UID 0/root, PID 1104/NetworkManager)
What: sleep
Why: NetworkManager needs to turn off networks
Mode: delay
3 inhibitors listed.
Digging deeper, we see this is because logind does not think we're "Docked" (which includes external monitor connected):
$ busctl get-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager Docked
b false
Now the reason for this is that my external monitor reports status:connected but enabled:disabled in sysfs. Note the external monitor is on DP-1, the panel is on eDP-1.
$ grep -s . /sys/class/drm/*/a
/sys/class/drm/card0-DP-1/enabled:disabled <--- I am driving this external monitor
/sys/class/drm/card0-DP-1/status:connected <--- I am driving this external monitor
/sys/class/drm/card0-DP-2/enabled:disabled
/sys/class/drm/card0-DP-2/status:disconnected
/sys/class/drm/card0-eDP-1/enabled:disabled
/sys/class/drm/card0-eDP-1/status:connected <-- this is the panel, lid is closed
/sys/class/drm/card0-HDMI-A-1/enabled:disabled
/sys/class/drm/card0-HDMI-A-1/status:disconnected
While at the same time I am happily viewing this on my external monitor with the lid closed. xrandr is happy (somehow eDP-1 is called DP-0 in xrandr):
Screen 0: minimum 8 x 8, current 2560 x 1440, maximum 32767 x 32767
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 connected (normal left inverted right x axis y axis)
3840x2160 60.02 +
DP-1 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
2560x1440 59.95*+
1920x1200 59.88
1920x1080 60.00 59.94 50.00 23.97 60.05 60.00 50.04
1680x1050 59.95
1600x1200 60.00
1280x1024 75.02 60.02
1280x800 59.81
1280x720 60.00 59.94 50.00
1152x864 75.00
1024x768 75.03 60.00
800x600 75.00 60.32
720x576 50.00
720x480 59.94
640x480 75.00 59.94 59.93
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
So the big question for me to make further progress is whether
a) it is a driver bug that /sys/class/drm/*/enabled are not set to enabled even when the connectors are
b) it is a logind bug to use the enabled field to check for these connectors being driven
FWIW, I am using the proprietary nvidia driver 375.66 on a GeForce GTX 1070
Changing setups with Xrandr or the KDE screen configuration utility happily sets the resolution. Yet these files always report "disabled".
I hope you can help me answer (a) vs (b) so I can target my debugging further.
The text was updated successfully, but these errors were encountered:
wmkoolen
changed the title
External monitors are always disabled, so laptop suspends
External monitor is "disabled" in /sys/class/drm/*/enabled, so laptop suspends
Jun 19, 2017
wmkoolen
changed the title
External monitor is "disabled" in /sys/class/drm/*/enabled, so laptop suspends
Laptop suspends because external monitor reads "disabled" in /sys/class/drm/*/enabled
Jun 19, 2017
wmkoolen
changed the title
Laptop suspends because external monitor reads "disabled" in /sys/class/drm/*/enabled
Laptop suspends because external monitor reports "disabled" in /sys/class/drm/*/enabled
Jun 19, 2017
This is a kernel driver problem, which reports incorrect information to userspace. Please ping your kernel/driver maintainers, we can't really help you here. Sorry!
Submission type
systemd version the issue has been seen with
Used distribution
In case of bug report: Expected behaviour you didn't see
In case of bug report: Unexpected behaviour you saw
In case of bug report: Steps to reproduce the problem
Okay, here's how far I got debugging this myself. We're running with a closed lid and external monitor connected. Now the first sign of trouble is that there is no multi-monitor inhibitor:
$ systemd-inhibit
Who: Screen Locker (UID 1000/wouter, PID 5647/ksmserver)
What: sleep
Why: Ensuring that the screen gets locked before going to sleep
Mode: delay
3 inhibitors listed.
Digging deeper, we see this is because logind does not think we're "Docked" (which includes external monitor connected):
$ busctl get-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager Docked
b false
Now the reason for this is that my external monitor reports status:connected but enabled:disabled in sysfs. Note the external monitor is on DP-1, the panel is on eDP-1.
$ grep -s . /sys/class/drm/*/a
/sys/class/drm/card0-DP-1/enabled:disabled <--- I am driving this external monitor
/sys/class/drm/card0-DP-1/status:connected <--- I am driving this external monitor
/sys/class/drm/card0-DP-2/enabled:disabled
/sys/class/drm/card0-DP-2/status:disconnected
/sys/class/drm/card0-eDP-1/enabled:disabled
/sys/class/drm/card0-eDP-1/status:connected <-- this is the panel, lid is closed
/sys/class/drm/card0-HDMI-A-1/enabled:disabled
/sys/class/drm/card0-HDMI-A-1/status:disconnected
While at the same time I am happily viewing this on my external monitor with the lid closed. xrandr is happy (somehow eDP-1 is called DP-0 in xrandr):
Screen 0: minimum 8 x 8, current 2560 x 1440, maximum 32767 x 32767
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 connected (normal left inverted right x axis y axis)
3840x2160 60.02 +
DP-1 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
2560x1440 59.95*+
1920x1200 59.88
1920x1080 60.00 59.94 50.00 23.97 60.05 60.00 50.04
1680x1050 59.95
1600x1200 60.00
1280x1024 75.02 60.02
1280x800 59.81
1280x720 60.00 59.94 50.00
1152x864 75.00
1024x768 75.03 60.00
800x600 75.00 60.32
720x576 50.00
720x480 59.94
640x480 75.00 59.94 59.93
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
So the big question for me to make further progress is whether
a) it is a driver bug that /sys/class/drm/*/enabled are not set to enabled even when the connectors are
b) it is a logind bug to use the enabled field to check for these connectors being driven
FWIW, I am using the proprietary nvidia driver 375.66 on a GeForce GTX 1070
Changing setups with Xrandr or the KDE screen configuration utility happily sets the resolution. Yet these files always report "disabled".
I hope you can help me answer (a) vs (b) so I can target my debugging further.
The text was updated successfully, but these errors were encountered: