You are not logged in.

#1 2014-06-20 15:34:26

cgo
Member
From: Paris, France
Registered: 2010-11-05
Posts: 21

[solved] thinkpad x201 - Suspend on lid closed when docked on ultrabay

Hi all,

I have a Thinkpad x201 which works pretty well with Arch. I also have an ultrabay (docking station).

Suspend on lid close works when undocked, but not when docked, which I would like to.

However, logind sees the event when docked:

systemd-logind[374]: Lid closed.

logind.conf has mostly default values:

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes

laptop-mode-tools handles the power stuff, but it seems to be silent.

Where can I look at ?

Thanks,
Charles

Last edited by cgo (2014-06-20 19:38:01)

Offline

#2 2014-06-20 18:50:12

Rexilion
Member
Registered: 2013-12-23
Posts: 784

Re: [solved] thinkpad x201 - Suspend on lid closed when docked on ultrabay

Check the output of dmesg for both the failed and succeeded suspend attempt. Would like to see the differences.


fs/super.c : "Self-destruct in 5 seconds.  Have a nice day...\n",

Offline

#3 2014-06-20 19:11:10

cgo
Member
From: Paris, France
Registered: 2010-11-05
Posts: 21

Re: [solved] thinkpad x201 - Suspend on lid closed when docked on ultrabay

Hi,
undocked, lid close:

[  345.117838] PM: Syncing filesystems ... done.
[  345.134233] PM: Preparing system for mem sleep
[  345.134644] Freezing user space processes ... (elapsed 0.001 seconds) done.
[  345.136004] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[  345.137019] PM: Entering mem sleep
[  345.137131] Suspending console(s) (use no_console_suspend to debug)
[  345.137383] hdaps: setting ec_rate=0, filter_order=1
[  345.151922] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[  345.152827] sd 0:0:0:0: [sda] Stopping disk
[  345.725283] PM: suspend of devices complete after 587.658 msecs
[  345.737532] PM: late suspend of devices complete after 12.237 msecs
[  345.738731] ehci-pci 0000:00:1d.0: System wakeup enabled by ACPI
[  345.738908] ehci-pci 0000:00:1a.0: System wakeup enabled by ACPI
[  345.750764] PM: noirq suspend of devices complete after 13.221 msecs
[  345.750940] ACPI: Preparing to enter system sleep state S3
[  345.754317] PM: Saving platform NVS memory
[  345.755269] Disabling non-boot CPUs ...
[  345.857440] smpboot: CPU 1 is now offline
[  345.960802] smpboot: CPU 2 is now offline
[  346.064198] smpboot: CPU 3 is now offline

undocked, lid open:

[  346.065390] ACPI: Low-level resume complete
[  346.065441] PM: Restoring platform NVS memory
[  346.066118] Enabling non-boot CPUs ...
[  346.066181] x86: Booting SMP configuration:
[  346.066182] smpboot: Booting Node 0 Processor 1 APIC 0x1
[  346.076408] Initializing CPU#1
[  346.092400] CPU1 is up
[  346.092423] smpboot: Booting Node 0 Processor 2 APIC 0x4
[  346.102545] Initializing CPU#2
[  346.119081] CPU2 is up
[  346.119103] smpboot: Booting Node 0 Processor 3 APIC 0x5
[  346.129225] Initializing CPU#3
[  346.145760] CPU3 is up
[  346.148109] ACPI: Waking up from system sleep state S3
[  346.215956] ehci-pci 0000:00:1a.0: System wakeup disabled by ACPI
[  346.216203] ehci-pci 0000:00:1d.0: System wakeup disabled by ACPI
[  346.216273] PM: noirq resume of devices complete after 11.509 msecs
[  346.218371] PM: early resume of devices complete after 2.073 msecs
[  346.218478] mei_me 0000:00:16.0: irq 42 for MSI/MSI-X
[  346.218621] snd_hda_intel 0000:00:1b.0: irq 43 for MSI/MSI-X
[  346.218732] iwlwifi 0000:02:00.0: RF_KILL bit toggled to disable radio.
[  346.222376] sd 0:0:0:0: [sda] Starting disk
[  346.259160] tpm_tis 00:09: TPM is disabled/deactivated (0x6)
[  346.314604] e1000e 0000:00:19.0: irq 45 for MSI/MSI-X
[  346.419417] usb 1-1.6: reset high-speed USB device number 4 using ehci-pci
[  346.542697] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[  346.543250] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[  346.543254] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[  346.543257] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[  346.544408] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[  346.544412] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[  346.544417] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[  346.544955] ata1.00: configured for UDMA/100
[  346.545975] ata5: SATA link down (SStatus 0 SControl 300)
[  346.549292] ata6: SATA link down (SStatus 0 SControl 300)
[  346.569503] hdaps: initial mode latch is 0x05
[  346.569645] hdaps: setting ec_rate=250, filter_order=2
[  346.569867] PM: resume of devices complete after 351.277 msecs
[  346.570041] PM: Finishing wakeup.
[  346.570043] Restarting tasks ... done.
[  346.570847] video LNXVIDEO:00: Restoring backlight state
[  346.689519] e1000e 0000:00:19.0: irq 45 for MSI/MSI-X
[  346.792811] e1000e 0000:00:19.0: irq 45 for MSI/MSI-X
[  346.792970] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[  346.885047] EXT4-fs (sda2): re-mounted. Opts: discard,data=ordered,commit=600
[  346.917034] EXT4-fs (sda1): re-mounted. Opts: discard
[  347.062985] e1000e: eth0 NIC Link is Down
[  347.647197] EXT4-fs (sda2): re-mounted. Opts: discard,data=ordered,commit=600
[  347.682770] EXT4-fs (sda1): re-mounted. Opts: discard

docked, lid close:

 ... nothing ...

docked, lid open:

[  477.068906] ACPI: \_SB_.PCI0.VID_: ACPI_NOTIFY_BUS_CHECK event
[  477.069629] ACPI: \_SB_.PCI0.VID_: Bus check in hotplug_event()
[  477.069836] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[  477.069847] pci 0000:00:1e.0: PCI bridge to [bus 0e]
[  477.069876] agpgart-intel 0000:00:00.0: no hotplug settings from platform
[  477.069880] agpgart-intel 0000:00:00.0: using default PCI settings
[  477.069888] i915 0000:00:02.0: no hotplug settings from platform
[  477.069891] i915 0000:00:02.0: using default PCI settings
[  477.069900] mei_me 0000:00:16.0: no hotplug settings from platform
[  477.069903] mei_me 0000:00:16.0: using default PCI settings
[  477.069916] serial 0000:00:16.3: no hotplug settings from platform
[  477.069919] serial 0000:00:16.3: using default PCI settings
[  477.069933] e1000e 0000:00:19.0: no hotplug settings from platform
[  477.069936] e1000e 0000:00:19.0: using default PCI settings
[  477.069948] ehci-pci 0000:00:1a.0: no hotplug settings from platform
[  477.069951] ehci-pci 0000:00:1a.0: using default PCI settings
[  477.069964] snd_hda_intel 0000:00:1b.0: no hotplug settings from platform
[  477.069970] pcieport 0000:00:1c.0: no hotplug settings from platform
[  477.069976] pcieport 0000:00:1c.4: no hotplug settings from platform
[  477.069992] iwlwifi 0000:02:00.0: no hotplug settings from platform
[  477.069998] ehci-pci 0000:00:1d.0: no hotplug settings from platform
[  477.070000] ehci-pci 0000:00:1d.0: using default PCI settings
[  477.070012] pci 0000:00:1e.0: no hotplug settings from platform
[  477.070015] pci 0000:00:1e.0: using default PCI settings
[  477.070033] lpc_ich 0000:00:1f.0: no hotplug settings from platform
[  477.070036] lpc_ich 0000:00:1f.0: using default PCI settings
[  477.070049] ahci 0000:00:1f.2: no hotplug settings from platform
[  477.070052] ahci 0000:00:1f.2: using default PCI settings
[  477.070065] i801_smbus 0000:00:1f.3: no hotplug settings from platform
[  477.070067] i801_smbus 0000:00:1f.3: using default PCI settings
[  477.070080] intel ips 0000:00:1f.6: no hotplug settings from platform
[  477.070082] intel ips 0000:00:1f.6: using default PCI settings

This is strange.

When docked, udevadm monitor gives nothing, dmesg gives nothing on lid close, and logind only says "lid closed".

I'll try to run laptop-mode-tools in debug mode and see what it has to say when I dock the computer.

Offline

#4 2014-06-20 19:37:41

cgo
Member
From: Paris, France
Registered: 2010-11-05
Posts: 21

Re: [solved] thinkpad x201 - Suspend on lid closed when docked on ultrabay

Hi,

I found out:

charles@tip  ~/w/pkgbuilds/systemd/src/systemd-213/src/login$ grep -i -r dock *
logind-action.c:                /* If we are docked don't react to lid closing */
logind-action.c:                if (manager_is_docked(m)) {
logind-action.c:                        log_debug("Ignoring lid switch request, system is docked.");

End of story.

Maybe I'll file a bug regarding this, I'm not sure.

Thanks,
Charles

Last edited by cgo (2014-06-20 19:38:57)

Offline

#5 2014-06-20 19:51:56

Rexilion
Member
Registered: 2013-12-23
Posts: 784

Re: [solved] thinkpad x201 - Suspend on lid closed when docked on ultrabay

You could create a temporary work around and create an udev rule that responds to a closed lid while docked. Then you can do:

systemctl hibernate

Furthermore, I would have appreciated it if they enabled that message in non debug mode lol.

Last edited by Rexilion (2014-06-20 19:52:24)


fs/super.c : "Self-destruct in 5 seconds.  Have a nice day...\n",

Offline

#6 2014-08-27 06:10:35

cgo
Member
From: Paris, France
Registered: 2010-11-05
Posts: 21

Re: [solved] thinkpad x201 - Suspend on lid closed when docked on ultrabay

A quick update to say there is now a HandleLidSwitchDocked option in systemd.
I guess it will be available in next release.

Thanks to all,
Charles

Offline

Board footer

Powered by FluxBB