Bug 1358306 - [systemd] Lenovo ThinkPad T400 suspends upon boot in basic graphics mode when docked and lid closed
Summary: [systemd] Lenovo ThinkPad T400 suspends upon boot in basic graphics mode when...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 25
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-20 13:27 UTC by Joachim Frieben
Modified: 2017-12-12 10:30 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-12-12 10:30:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
boot log journalctl -k -b (127.91 KB, text/x-vhdl)
2016-11-17 13:28 UTC, Russell Teague
no flags Details

Description Joachim Frieben 2016-07-20 13:27:47 UTC
Description of problem:
For current Fedora 23, systemd causes a Lenovo ThinkPad T400 which is attached to a docking station (plus external monitor) with its lid closed to suspend while booting in basic graphics mode (thus, without modesetting).
Upon pressing the power button in order to resume, it suspends again within a few seconds.

Version-Release number of selected component (if applicable):
systemd-222-15.fc23

How reproducible:
Always.

Steps to Reproduce:
1. Boot system.

Actual results:
Instead of displaying the login manager, the system suspends.

Expected results:
The login manager is displayed and it is possible to log in.

Additional info:
The system is usable only after opening the lid, either using the internal display or after redirecting the monitor output to the external monitor.

Comment 1 Russell Teague 2016-11-15 20:59:12 UTC
I confirm this same behavior on current F24 with Lenovo ThinkPad W541.
Linux 4.8.6-201.fc24.x86_64

System docked, lid closed, single external display
Press power button
Enter LUKS password
System suspends before login screen is displayed
Press power button
System resumes and displays login
Enter login credentials, press enter
System suspends before desktop is displayed
Press power button
System resumes and displays desktop
Suspend/Resume functions normally at this point

Comment 2 Russell Teague 2016-11-17 13:28:47 UTC
Created attachment 1221555 [details]
boot log journalctl -k -b

Updated to the latest packages available, and rebooted.  This boot had only one suspend/resume event just prior to reaching the login screen.

Comment 3 Russell Teague 2016-11-17 19:55:42 UTC
In troubleshooting this issue further, I found systemd-logind was initiating the suspend event.  By default, logind will ignore the lid switch when docked.  There are two cases which logind tests for being docked, checking /dev/input events to see if a button reports SW_DOCK or by counting the number of external displays.  In the case of my ThinkPad UltraDock (could be others), it does not report as being docked through input events.  Additionally, counting the external displays results in 0 due to device types.  logind decides the system is not docked and has no external displays and suspends the system.  Once gdm starts up, it appears to take over the lid switch subsystem and properly handles lid open/close events.

To resolve the suspend on boot issue, I used this workaround:

Add the following to /etc/systemd/logind.conf
HandleLidSwitch=ignore

This prevents logind from attempting to suspend the system when the lid is closed.

Troubleshooting Notes:
----------------------
Test if SW_DOCK is reported by input events:
[root@rteague ~]# for d in /dev/input/event*; do if ! evtest --query $d EV_SW SW_DOCK; then echo $d; fi; done

Does logind see the system as docked?:
[root@rteague ~]# gdbus introspect --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1 | grep Docked
      readonly s HandleLidSwitchDocked = 'ignore';
      readonly b Docked = false;

What type of graphics devices are in the system?
[root@rteague ~]# udevadm info -a -n /dev/fb0

  looking at device '/devices/pci0000:00/0000:00:01.0/0000:01:00.0/graphics/fb0':
    KERNEL=="fb0"
    SUBSYSTEM=="graphics"
    DRIVER==""
    ATTR{bits_per_pixel}=="32"
    ATTR{blank}==""
    ATTR{console}==""
    ATTR{cursor}==""
    ATTR{mode}==""
    ATTR{modes}=="U:1024x768p-0"
    ATTR{name}=="nouveaufb"
    ATTR{pan}=="0,0"
    ATTR{rotate}=="0"
    ATTR{state}=="1"
    ATTR{stride}=="4096"
    ATTR{virtual_size}=="1024,768"
...

[root@rteague ~]# udevadm info -a -n /dev/fb1

  looking at device '/devices/pci0000:00/0000:00:02.0/graphics/fb1':
    KERNEL=="fb1"
    SUBSYSTEM=="graphics"
    DRIVER==""
    ATTR{bits_per_pixel}=="32"
    ATTR{blank}==""
    ATTR{console}==""
    ATTR{cursor}==""
    ATTR{mode}==""
    ATTR{modes}=="U:1920x1080p-0"
    ATTR{name}=="inteldrmfb"
    ATTR{pan}=="0,0"
    ATTR{rotate}=="0"
    ATTR{state}=="0"
    ATTR{stride}=="7680"
    ATTR{virtual_size}=="1920,1080"
...

Comment 4 Fedora End Of Life 2016-11-25 09:27:09 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Russell Teague 2016-11-28 18:07:05 UTC
Confirmed this issue is still present on F25.

kernel-4.8.8-200.fc24.x86_64
systemd-231-10.fc25.x86_64

Comment 6 Russell Teague 2016-11-28 18:10:37 UTC
Correction on kernel referenced above:

[root@rteague ~]# uname -r
4.8.8-300.fc25.x86_64

Comment 7 Freddy Willemsen 2017-01-12 08:11:57 UTC
I have the same issue on a Dell Latitude E6540, F25, kernel 4.9.2-200.fc25.x86_64, systemd-231-10.fc25.x86_64. Seem to happen more often when using Glamor (not using the intel DDX).

Comment 8 Fedora End Of Life 2017-11-16 19:03:48 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 9 Fedora End Of Life 2017-12-12 10:30:16 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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