RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1092905 - Laptop won't suspend when undocked with lid closed
Summary: Laptop won't suspend when undocked with lid closed
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: xorg-x11-drv-intel
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Adam Jackson
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks: 1203710
TreeView+ depends on / blocked
 
Reported: 2014-04-30 08:29 UTC by Michal Domonkos
Modified: 2021-12-10 14:24 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-06 17:17:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
inhibit locks (782 bytes, text/plain)
2015-01-06 16:42 UTC, Michal Domonkos
no flags Details
xrandr output (969 bytes, text/plain)
2015-01-06 16:43 UTC, Michal Domonkos
no flags Details

Description Michal Domonkos 2014-04-30 08:29:39 UTC
Description of problem:
Normally, when a laptop is undocked with its lid being already closed, it is expected to suspend after 30 seconds.  This really works, except for the case when the lid was already closed at the time the current GNOME session started.

I originally filed this as bug 1081093 against gnome-settings-daemon but according to comment 28 in that bug it seems like systemd might be a better place to look.

The culprit seems to be logind that, once its lid inhibitor is released by g-s-d on undocking, won't poll the lid state again (since there was no lid open event before) and thus won't issue a suspend call.

Version-Release number of selected component (if applicable):
systemd-208-11.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. Have the laptop docked and the lid closed
2. Log in to GNOME
3. Undock
4. Wait for ~30 seconds

Actual results:
Laptop doesn't suspend (waiting any longer makes no difference).

Expected results:
Laptop suspends.

Comment 2 Lukáš Nykrýn 2014-06-12 15:56:22 UTC
Would it be possible in g-s-d to react on the "undock" event, check state of the lid and accordingly initiate suspend (well after some safe period of time)?

Comment 3 Rui Matos 2014-06-13 09:32:30 UTC
(In reply to Lukáš Nykrýn from comment #2)
> Would it be possible in g-s-d to react on the "undock" event, check state of
> the lid and accordingly initiate suspend (well after some safe period of
> time)?

It's possible but note that this is still an issue if you're not running GNOME.

Comment 4 Bastien Nocera 2014-06-16 15:25:54 UTC
(In reply to Lukáš Nykrýn from comment #2)
> Would it be possible in g-s-d to react on the "undock" event, check state of
> the lid and accordingly initiate suspend (well after some safe period of
> time)?

We don't listen to any dock related events, only to displays coming and going.

Comment 5 Bastien Nocera 2014-12-17 09:10:37 UTC
Seems that the X server isn't detecting that you're disconnecting the display (through disconnecting the laptop from the dock).

What display chipset does your laptop use? What's the output of "xrandr -q" once the docking station is disconnected? You can do that by running:
sleep 10; xrandr -q ; systemd-inhibit --list
before disconnecting the machine from the dock, and disconnecting it straight away. Wait a little while until the command gets run, and attach the output here.

(In reply to Lukáš Nykrýn from comment #2)
> Would it be possible in g-s-d to react on the "undock" event, check state of
> the lid and accordingly initiate suspend (well after some safe period of
> time)?

gnome-settings-daemon shouldn't have to do that. From the moment that it drops the inhibitor, it's up to logind to act upon the state of the machine.

Comment 7 Michal Domonkos 2015-01-06 16:41:54 UTC
(In reply to Bastien Nocera from comment #5)
> Seems that the X server isn't detecting that you're disconnecting the
> display (through disconnecting the laptop from the dock).
> 
> What display chipset does your laptop use? What's the output of "xrandr -q"
> once the docking station is disconnected? You can do that by running:
> sleep 10; xrandr -q ; systemd-inhibit --list
> before disconnecting the machine from the dock, and disconnecting it
> straight away. Wait a little while until the command gets run, and attach
> the output here.

I'm attaching the requested outputs.

Note that physically I had one monitor attached to the docking station (via the DisplayPort) that corresponds to DP2 in the xrandr output.  So apparently it was recognized being disconnected when I undocked the laptop.

Comment 8 Michal Domonkos 2015-01-06 16:42:54 UTC
Created attachment 976865 [details]
inhibit locks

Output of "systemd-inhibit --list" after undocking.

Comment 9 Michal Domonkos 2015-01-06 16:43:20 UTC
Created attachment 976866 [details]
xrandr output

Output of "xrandr -q" after undocking.

Comment 10 Michal Domonkos 2015-01-06 16:45:54 UTC
Regarding the display chipset, it's a ThinkPad T520 with a single GPU being an onboard Intel.

Comment 11 Bastien Nocera 2015-02-16 13:01:05 UTC
"Multiple displays attached" and the xrandr output shows:
DP3 disconnected (normal left inverted right x axis y axis)
  1920x1080 (0x53)  148.5MHz
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock   67.5KHz
        v: height 1080 start 1084 end 1089 total 1125           clock   60.0Hz

Seems like X server can't see the output disappearing. Reassigning to the xorg intel driver.


Note You need to log in before you can comment on or make changes to this bug.