Suspend not working properly with laptop lid

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
jfraga

Suspend not working properly with laptop lid

Post by jfraga »

Hey, I'm new here and I'm not sure if this is the best place for the question, but I'm running Mint 18.3 xfce and I think my problem is related to the desktop environment.

My question is how do I get my laptop (Thinkpad t470) to reliably lock and sleep when closing the lid?
The original problem I was having is when I closed the laptop at the lock screen it simple wouldn't sleep, just turn off the screen. The suspend/lock when lid is shut (power manager settings) only worked when logged in to the computer, otherwise trying to suspend from the lock screen by closing the lid would only result in a request to authenticate in order to suspend as soon as I logged back in--my battery went from full to dead overnight which is how I realized this was happening.
While trying to troubleshoot this issue I found a post that recommended editing the /etc/systemd/logind.conf file to get the laptop to suspend as desired, even at the lock screen. Editing that file as follows: HandleLidSwitch=suspend. This seemed to partially fix the original problem, but brought with it a new issue I believe.
This is where I'm at so far: I've tried adjusting the power manager to suspend when lid is closed both when plugged in and on battery, and lock the system when going to sleep. The current behavior I'm getting is when I close the lid it locks and sleeps like I want. The problem arises when I open it back up--it wakes up for about 5 seconds, everything freezes for a second and it goes back to sleep. To wake it back up I have to either close it again and reopen it or press the power button to bring it out of sleep and from there it stays awake like it should.
-The logind.conf file stated to delete it to revert to the default settings which I did but the problem persists (and now I don't have a logind.conf file if that matters). Does anyone know what might be causing this? Thanks.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
kc1di
Level 18
Level 18
Posts: 8178
Joined: Mon Sep 08, 2008 8:44 pm
Location: Maine USA

Re: Suspend not working properly with laptop lid

Post by kc1di »

first Welcome to Linux Mint,

It would help if we knew which desktop your using. It sounds like xfce4 but not sure.
also a snapshot of your system by going to a terminal and entering this command

Code: Select all

inxi -Fxz
and posting the output here within code tags please. This may be helpful also.
Easy tips : https://easylinuxtipsproject.blogspot.com/ Pjotr's Great Linux projects page.
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
jfraga

Re: Suspend not working properly with laptop lid

Post by jfraga »

Yeah I believe it is xfce4 but here's the output of that:

Code: Select all

System:    Host: thinkpadJF Kernel: 4.13.0-38-generic x86_64 (64 bit gcc: 5.4.0)
           Desktop: Xfce 4.12.3 (Gtk 2.24.28) Distro: Linux Mint 18.3 Sylvia
Machine:   System: LENOVO (portable) product: 20HDCTO1WW v: ThinkPad T470
           Mobo: LENOVO model: 20HDCTO1WW v: SDK0J40697 WIN
           Bios: LENOVO v: N1QET67W (1.42 ) date: 10/03/2017
CPU:       Dual core Intel Core i5-7200U (-HT-MCP-) cache: 3072 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 10848
           clock speeds: max: 3100 MHz 1: 700 MHz 2: 700 MHz 3: 700 MHz
           4: 700 MHz
Graphics:  Card: Intel Device 5916 bus-ID: 00:02.0
           Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa)
           Resolution: 1920x1080@60.01hz
           GLX Renderer: Mesa DRI Intel HD Graphics 620 (Kaby Lake GT2)
           GLX Version: 3.0 Mesa 17.2.8 Direct Rendering: Yes
Audio:     Card Intel Device 9d71 driver: snd_hda_intel bus-ID: 00:1f.3
           Sound: Advanced Linux Sound Architecture v: k4.13.0-38-generic
Network:   Card-1: Intel Ethernet Connection (4) I219-V
           driver: e1000e v: 3.2.6-k bus-ID: 00:1f.6
           IF: enp0s31f6 state: down mac: <filter>
           Card-2: Intel Device 24fd driver: iwlwifi bus-ID: 04:00.0
           IF: wlp4s0 state: up speed: N/A duplex: N/A mac: <filter>
Drives:    HDD Total Size: 500.1GB (2.3% used)
           ID-1: /dev/sda model: Samsung_SSD_850 size: 500.1GB
Partition: ID-1: / size: 28G used: 9.6G (37%) fs: ext4 dev: /dev/sda5
           ID-2: /home size: 46G used: 1.2G (3%) fs: ext4 dev: /dev/sda6
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 29.5C mobo: N/A
           Fan Speeds (in rpm): cpu: 0
Info:      Processes: 232 Uptime: 16:33 Memory: 2236.1/15709.1MB
           Init: systemd runlevel: 5 Gcc sys: 5.4.0
           Client: Shell (bash 4.3.481) inxi: 2.2.35
I seem to have made some progress by disabling Light Locker. I don't know if it's necessary since there was a notification in the Light Locker window stating that my settings are being controlled by xfce Power Manager. Not complaining but it seems weird that my laptop still locks after suspend since that option is under the Security (Light Locker) tab in the Power Manager settings and I supposedly disabled Light Locker. At least now my laptop doesn't go into suspend 5 secs after opening it. However I still get this message if I close the lid taking the machine to the lock screen, open the lid waking it, then repeating this process and logging on:

Image

At this point I feel like I'm hunting for bugs, but I just don't see why it should pop up. Also after tinkering with all the settings, pressing the power button no longer asks me what to do, it just turns off the laptop. In addition to that the lock button on the whisker menu isn't working although the log off button is. Hope that info helps troubleshoot.
User avatar
AZgl1800
Level 20
Level 20
Posts: 11178
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Suspend not working properly with laptop lid

Post by AZgl1800 »

In 18.3

I finally after a lot of effort trying to make it work, gave up.

I set everything to NEVER and the Lid to 'nothing'

I also have the ScreenSaver set to NEVER

anything short of that, results in a locked up laptop
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
User avatar
kc1di
Level 18
Level 18
Posts: 8178
Joined: Mon Sep 08, 2008 8:44 pm
Location: Maine USA

Re: Suspend not working properly with laptop lid

Post by kc1di »

I am afraid it is a bug in xfce4 I had a similar problem on another Distro with xfce4 also. I changed to another desktop. But that may not be an option for you.
Good luck in any event. Hope it works out for you.
Another thought if you up to some experimenting you may want to try a differen windows manager say mdm instead of lightdm, or sddm. That may fix the problem or not.
Easy tips : https://easylinuxtipsproject.blogspot.com/ Pjotr's Great Linux projects page.
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
User avatar
mint4all
Level 2
Level 2
Posts: 95
Joined: Tue Feb 13, 2018 1:16 pm

Re: Suspend not working properly with laptop lid

Post by mint4all »

Greetings!

Afaik, xfce's "Power Manager" handles laptops' lid-closures / suspense / wakeups etc ... Synaptics shows that LM18.3 comes with v 1.4.4 of that power manager, which is basically 2 years behind the bug-fix cycle. Perhaps you may want to try out the 12-27-2017 edition, v 1.6.1 (documented @ https://blog.xfce.org/ ) and easily downloaded from http://archive.ubuntu.com/ubuntu/pool/u ... r-manager/ ?

Good luck!
Locked

Return to “Xfce”