LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 03-31-2017, 10:50 AM   #1
webmanoffesto
LQ Newbie
 
Registered: May 2010
Posts: 26

Rep: Reputation: 0
Lid Close, Laptop Doesn't Suspend, HP ProBook 450 G3


I have a new HP ProBook 450 G3 15.6″ Laptop.

I installed Ubuntu 16.10 Gnome on it. I'm using a SSD (no spinning disk). The laptop doesn't Suspend (i.e. Suspend-to-RAM) when I shut the lid and carry it elsewhere. When I get to my destination either the laptop is hot or the battery is dead.

I know that shutting the lid can cause a number of different states (sleep, suspend, hibernate). I believe that what I want is correctly called Suspend-to-RAM (monitor off, and details saved to RAM for a speedy return to work). This laptop, on lid-close, shuts off the monitor but all else continues working.

When I call up "gnome-tweak-tool" the setttings appear to be correct (i.e. they tell the laptop to suspend-to-RAM when I close the lid)
"When laptop lid is closed
- On Battery Power - Suspend
- When Plugged In - Suspend
Don't Suspend on Lid Cose - Off"
When I changed "Suspend" to "Hibernate" the laptop continued to do nothing except shut off the monitor when I close the lid.

How can I do that? I found some out of date posts on this but no solution yet.
In Settings / Power I see "Power" and "Suspend and Power Button" but no place to specify action to occur on lid-close. I tried Gconf-Editor but I wasn't able to find the correct settings.


Based on www DOT linux DOT com/news/how-suspe...op-under-linux
I think this is relevant
Code:
$ cat /sys/power/state
freeze mem disk

Seems relevant too:
wwwDOTkernelDOTorg/doc/Documenta.../interfaceDOTtxt I read that
/sys/power/state is the system sleep state control file. it returns a list of supported sleep states, encoded as:
'freeze' (Suspend-to-Idle)
'standby' (Power-On Suspend)
'mem' (Suspend-to-RAM)
'disk' (Suspend-to-Disk)
 
Old 03-31-2017, 12:05 PM   #2
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Depending on how you did your install, the tools needed to do that may not have been installed (most desktop users don't need it). The acpi side of things handles events AFAIK, like issuing shutdown when the power button is touched. And suspend when the lid is closed. I actually like my laptop to NOT suspend when I close the lid. But most of my laptops have 6+ hours of battery life and are the fanless silent types.

$ sudo apt-get install acpi-support
 
Old 03-31-2017, 12:58 PM   #3
webmanoffesto
LQ Newbie
 
Registered: May 2010
Posts: 26

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Shadow_7 View Post
$ sudo apt-get install acpi-support
$ acpi-support is already the newest version (0.142)
 
Old 03-31-2017, 06:01 PM   #4
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
I always get them backwards, but suspend and hibernate are two different things. One saves RAM to disk (swap). The other wakes up and keeps RAM alive every minute plus which continues to burn battery life, just a lot slower. It sounds like you want the one that writes ram to disk, which likely requires swap space at least as big as your RAM. Otherwise it probably wont do that option.
 
Old 03-31-2017, 07:18 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
My better half has a HP something-or-other (touch screen, folds right over so as to be a tablet) - similar symptoms running Mint Mate. I eventually deduced that the lid-close wasn't being detected. But lid-open is.
I set the power button to suspend and she eventually got used to using it. Does the job, and it fires back up when the lid is opened.

I gave up chasing a reason.
 
Old 03-31-2017, 10:58 PM   #6
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,801

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
I have a new HP ProBook 450 G3 15.6″ Laptop.

I installed Ubuntu 16.10 Gnome on it. I'm using a SSD (no spinning disk). The laptop doesn't Suspend (i.e. Suspend-to-RAM) when I shut the lid and carry it elsewhere. When I get to my destination either the laptop is hot or the battery is dead.
I'm not an Ubuntu user, but AFAIU systemd is in use so the lid-close behaviour can be controlled via /etc/systemd/logind.conf configuration. Look for the entry '#HandleLidSwitch=' and uncomment it. Valid options are

Quote:
HandlePowerKey=, HandleSuspendKey=, HandleHibernateKey=, HandleLidSwitch=, HandleLidSwitchDocked=
Controls how logind shall handle the system power and sleep keys and the lid switch to trigger actions such as system power-off or suspend. Can be one of "ignore", "poweroff",
"reboot", "halt", "kexec", "suspend", "hibernate", "hybrid-sleep", and "lock". If "ignore", logind will never handle these keys. If "lock", all running sessions will be
screen-locked; otherwise, the specified action will be taken in the respective event. Only input devices with the "power-switch" udev tag will be watched for key/lid switch
events. HandlePowerKey= defaults to "poweroff". HandleSuspendKey= and HandleLidSwitch= default to "suspend". HandleLidSwitchDocked= defaults to "ignore".
HandleHibernateKey= defaults to "hibernate". If the system is inserted in a docking station, or if more than one display is connected, the action specified by
HandleLidSwitchDocked= occurs; otherwise the HandleLidSwitch= action occurs.

A different application may disable logind's handling of system power and sleep keys and the lid switch by taking a low-level inhibitor lock ("handle-power-key",
"handle-suspend-key", "handle-hibernate-key", "handle-lid-switch"). This is most commonly used by graphical desktop environments to take over suspend and hibernation handling,
and to use their own configuration mechanisms. If a low-level inhibitor lock is taken, logind will not take any action when that key or switch is triggered and the Handle*=
settings are irrelevant.
For more info refer to
Code:
man logind.conf
 
Old 04-01-2017, 06:53 AM   #7
webmanoffesto
LQ Newbie
 
Registered: May 2010
Posts: 26

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ferrari View Post
Look for the entry '#HandleLidSwitch=' and uncomment it.
I went to "uncomment" it, but they seem to be ALL "commented".
Code:
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
#UserTasksMax=33%
Anyway, I used "sudo nano /etc/systemd/logind.conf" to uncomment "HandleLidSwitch=suspend" and save the revised file. I closed the lid, waited a few seconds and opened it. It had not "suspended".

To complicate the situation, when I left the lid closed for a long time, like a couple of hours, when I came back it seems to me that the laptop had suspended (a brief press on the power button woke it up) but then the computer froze and I had to do a "hard restart" anyway.

Last edited by webmanoffesto; 04-01-2017 at 07:01 AM.
 
Old 04-01-2017, 10:23 AM   #8
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Do you have swap space? Is it at least as big as your RAM capacity? One reason that it might fail.

Normally commented out "options" are set to the default option. So commenting them out does basically nothing unless you change the other side of the option. When making edits to those I duplicate the commented line and change the duplicate, that way I always know what the default was and that it was customized. But I also tend to add a comment with my initials and a date/time stamp. For things that I might want to do again someday. But mostly I avoid magic configs. If a distros defaults doesn't work for me, I find another distro.
 
Old 04-01-2017, 12:42 PM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by webmanoffesto View Post
Anyway, I used "sudo nano /etc/systemd/logind.conf" to uncomment "HandleLidSwitch=suspend" and save the revised file. I closed the lid, waited a few seconds and opened it. It had not "suspended".
when you edit config files, it is quite common that the daemon reading them needs to be reloaded manually.
not sure what it would be in this case; maybe 'systemctl restart logind', maybe sth else.
 
Old 04-01-2017, 04:15 PM   #10
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,801

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
I went to "uncomment" it, but they seem to be ALL "commented".
Well yes, that's just the default configuration The administrator can configure as they like.

Quote:
Anyway, I used "sudo nano /etc/systemd/logind.conf" to uncomment "HandleLidSwitch=suspend" and save the revised file. I closed the lid, waited a few seconds and opened it. It had not "suspended".
A reboot (or restarting logind) would have been needed for this to take effect.

Quote:
To complicate the situation, when I left the lid closed for a long time, like a couple of hours, when I came back it seems to me that the laptop had suspended (a brief press on the power button woke it up) but then the computer froze and I had to do a "hard restart" anyway.
This suspend event was probably desktop-related configuration (eg my laptop is configured to suspend after X minutes when on battery), but in any case you may have additional suspend/resume issues to sort out from here.
 
Old 04-03-2017, 07:20 PM   #11
webmanoffesto
LQ Newbie
 
Registered: May 2010
Posts: 26

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ferrari View Post
This suspend event was probably desktop-related configuration (eg my laptop is configured to suspend after X minutes when on battery), but in any case you may have additional suspend/resume issues to sort out from here.
Thanks for the response.

By now I've rebooted a few times and the suspend/resume problems continue.

My present situation
1. My laptop does not automatically suspend-to-RAM when I close the lid.
2. It does suspend sometimes, apparently after some specified time period, I don't know what
3. It does not resume from the suspend, I'm usually faced with either a properly displayed monitor image (which is frozen) or a dark monitor (but some of the laptop lights are lit suggesting that it is "awake")

Where do I go from here?
 
Old 04-03-2017, 08:25 PM   #12
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,801

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
1. My laptop does not automatically suspend-to-RAM when I close the lid.
This I do find surprising. However, there have been some regressions reported like this one. Perhaps you're similarly impacted. A bug report may be necessary to help resolve.

Quote:
2. It does suspend sometimes, apparently after some specified time period, I don't know what
That is likely to be a desktop related setting. Which DE are you using?

Quote:
3. It does not resume from the suspend, I'm usually faced with either a properly displayed monitor image (which is frozen) or a dark monitor (but some of the laptop lights are lit suggesting that it is "awake")
Suspend/resume issues like this are often caused by a graphics-related issues. A separate thread ideally. You should start by sharing your graphics hardware details (chipset/driver)

One way to get that info...
Code:
/sbin/lspci -nnk|grep '\[03' -A3
 
Old 04-04-2017, 12:46 PM   #13
webmanoffesto
LQ Newbie
 
Registered: May 2010
Posts: 26

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ferrari View Post
This I do find surprising. However, there have been some regressions reported like this one. Perhaps you're similarly impacted. A bug report may be necessary to help resolve.

That is likely to be a desktop related setting. Which DE are you using?
I'm using Gnome

Quote:
Originally Posted by ferrari View Post
Suspend/resume issues like this are often caused by a graphics-related issues. A separate thread ideally. You should start by sharing your graphics hardware details (chipset/driver)

One way to get that info...
Code:
/sbin/lspci -nnk|grep '\[03' -A3
$lshw gave me
*-display
description: VGA compatible controller
product: HD Graphics 520
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 07
width: 64 bits
clock: 33MHz
capabilities: vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:127 memory:e1000000-e1ffffff memory:c0000000-cfffffff ioport:5000(size=64) memory:c0000-dffff

Further details here:
https://hastebin.com/conuvubone.http

When I create the new thread I'll put a link here.

Last edited by webmanoffesto; 04-04-2017 at 12:50 PM.
 
Old 04-04-2017, 02:20 PM   #14
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,801

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Ok, so Intel Skylake graphics hardware. A quick search turned up this bug report which may be relevant to you...
https://bugs.launchpad.net/ubuntu/+s...x/+bug/1589379
 
Old 04-04-2017, 02:23 PM   #15
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,801

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Another long-running bug report concerning broken laptop suspension...
https://bugs.launchpad.net/ubuntu/+s...d/+bug/1574120
Comment #79 onwards mentions the problem still existing in 16.10 for various laptop models.
 
  


Reply

Tags
close, suspend, suspend2ram, suspendtoram



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] CentOS with no GUI - disable suspend on laptop lid close EPLychon Linux - Laptop and Netbook 2 04-12-2015 07:30 PM
Laptop lid close suspend with i3 lzhiren Slackware 4 02-04-2015 01:35 AM
LXer: Ready for Gnome 3.2? no more suspend on laptop lid close LXer Syndicated Linux News 0 09-16-2011 02:41 AM
disable suspend when I close the laptop lid lindylex Debian 5 04-14-2009 08:53 AM
Suspend to Disk problem when I close my laptop lid xbaez Mandriva 0 06-23-2004 08:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 12:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration