LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-15-2020, 09:36 PM   #1
smallhuman
LQ Newbie
 
Registered: Jul 2020
Posts: 3

Rep: Reputation: Disabled
My laptop goes into sleep whenever I close the lid


Hi guys,

My linux is Bodhi linux 5.1.0, and my laptop is Lenovo Yoga 300.

As the title says, my laptop goes into sleep state whenever I close the lid. I don't want that, so I tried to change the power settings. But the linux does not provide detailed power setting options and almost no power setting options tool on Google does not work. I tried acpi bindings, key bindings, tlp, xconfig(something like that?) etc. And none of them work.

I am okay with one of both options.
(1) changing the action which linked with the action 'lid close'
(2) completely disable suspend or sleep mode (Hibernate is okay)

Thank you in advance!
 
Old 07-15-2020, 09:49 PM   #2
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 797

Rep: Reputation: 184Reputation: 184
Quote:
Originally Posted by smallhuman View Post
I tried acpi bindings
the default acpi binding on my bodhi 5.1.0 systems is set to suspend. you say you "tried acpi bindings", but what did you try? did you set it to some other action or delete the binding?
 
1 members found this post helpful.
Old 07-16-2020, 09:06 PM   #3
smallhuman
LQ Newbie
 
Registered: Jul 2020
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cordx View Post
the default acpi binding on my bodhi 5.1.0 systems is set to suspend. you say you "tried acpi bindings", but what did you try? did you set it to some other action or delete the binding?
It is true, and I wanted to change it. I changed the acpi setting in the Settings>Settings Panel>Input>ACPI bindings. First, I tried to change XF86 something, and it did not work. I changed 'suspend' from something else but it did not work. So I deleted all the bindings but all the bindings still alive with the default settings.

Disabling ACPI is acceptable to me. May I ask the ACPI settings file location in Bodhi linux? That will be good enough for me.
 
1 members found this post helpful.
Old 07-16-2020, 10:03 PM   #4
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,850

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
check out this thread:
https://www.linuxquestions.org/quest...on-4175642628/


or this one might give you an idea:
https://help.ubuntu.com/stable/ubunt...oselid.html.en

Good luck!
 
Old 07-17-2020, 12:09 AM   #5
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 797

Rep: Reputation: 184Reputation: 184
Quote:
Originally Posted by JJJCR View Post
that link looks like it might have some helpful guidance. i will note that acpid is not installed by default on my bodhi machines so i'm not sure about that part.

i don't know a whole lot about the acpi settings or configuration file locations. i will attempt to do some looking around on my systems here in a bit.

if it doesn't feel like you are getting the results you are looking for, i believe you can click on the "report" button at the bottom of your first post and request that it be moved to the bodhi forum here where the developers and possibly other bodhi users with more acpi experience are more likely to see it. or bodhi just recently opened its own forum if you want to try there.

Last edited by cordx; 07-17-2020 at 01:20 AM. Reason: for clarity
 
Old 07-17-2020, 02:43 AM   #6
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 797

Rep: Reputation: 184Reputation: 184
Quote:
Originally Posted by smallhuman View Post
I changed 'suspend' from something else but it did not work. So I deleted all the bindings but all the bindings still alive with the default settings.
i also tried changing the action of lid suspend to a couple o different things (open a menu and launch a program), but neither of those worked. deleting the lid closed acpi binding also did not stop my system from suspending when i closed the lid. i did not reboot between all of those changes since key bindings don't require a reboot. i suppose that might have been a helpful thing to try...

however, i read a bit on this link:

Quote:
Originally Posted by JJJCR View Post
and the easiest option i saw in this post that might also be something i could try on my system was:
Quote:
Disable systemd control of Lid Switch at /etc/systemd/logind.conf by uncommenting and adjusting this line:
Code:
HandleLidSwitch=ignore
the default for my system was #HandleLidSwitch=suspend so i removed the # to uncomment the entry and changed suspend to ignore making it look like the entry above.

after a reboot, my system now does not suspend when i shut the lid. of course if you ever want the lid to trigger an action you would need to adjust that, but hopefully it will get your system to stop suspending when you shut the lid

Last edited by cordx; 07-17-2020 at 02:44 AM.
 
1 members found this post helpful.
Old 07-17-2020, 05:35 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 16,858
Blog Entries: 10

Rep: Reputation: 5013Reputation: 5013Reputation: 5013Reputation: 5013Reputation: 5013Reputation: 5013Reputation: 5013Reputation: 5013Reputation: 5013Reputation: 5013Reputation: 5013
I think in this case it makes sense to install a power manager that can handle this.
xfce4-power-manager works without other XFCE components, and can do what OP wants.
It might require additional command line tinkering if it doesn't work ootb, but only once - then OP has a nice gui to change various settings according to current needs.
 
Old 07-22-2020, 03:05 AM   #8
smallhuman
LQ Newbie
 
Registered: Jul 2020
Posts: 3

Original Poster
Rep: Reputation: Disabled
There was a simple solution for this

https://wiki.debian.org/Suspend

>> sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

Thank all for your help!
 
1 members found this post helpful.
Old 07-22-2020, 05:01 AM   #9
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 797

Rep: Reputation: 184Reputation: 184
nice find. simple solution indeed. thanks for posting it. you could mark the thread as solved to help someone else who might have the same or similar question find their simple solution a little more easily if you are so inclined
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Is my network card bypassing "ignore lid" settings, because download still halts when I close lid? winger9 Linux - Laptop and Netbook 5 12-11-2019 05:34 AM
[SOLVED] Laptop won't go into sleep mode with lid closed Yuhan Linux - Laptop and Netbook 5 05-21-2012 05:19 AM
[SOLVED] How can I close lid without sleep? tquang Linux - Laptop and Netbook 5 07-12-2011 03:42 AM
Lid Close = Sleep mangogreg Linux - Hardware 2 08-28-2008 04:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:25 AM.

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