PDA

View Full Version : Disable sleep when laptop lid is closed



Rijkaard
2013-05-09, 01:16
:confused: Hello guys I need to disable sleep when the laptop lid is closed.


I've tried with gnome-power-manager but it is not installed



root@ko:~# gnome-
gnome-calculator gnome-session
gnome-character-map gnome-session-fallback
gnome-contacts gnome-session-properties
gnome-control-center gnome-session-quit
gnome-desktop-item-edit gnome-settings-daemon
gnome-dictionary gnome-shell
gnome-file-share-properties gnome-shell-extension-prefs
gnome-font-viewer gnome-shell-extension-tool
gnome-help gnome-sound-applet
gnome-keyring gnome-sound-recorder
gnome-keyring-3 gnome-system-log
gnome-keyring-daemon gnome-system-log-pkexec
gnome-menus-blacklist gnome-system-monitor
gnome-open gnome-terminal
gnome-panel gnome-terminal.wrapper
gnome-power-statistics gnome-text-editor
gnome-screensaver gnome-thumbnail-font
gnome-screensaver-command gnome-wm
gnome-screenshot gnome-www-browser
root@ko:~# gnome-power-manager
-bash: gnome-power-manager: command not found


and when I try to install it I get the following output




root@ko:~# apt-get install gnome-power-manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
gnome-power-manager is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


Any help would be appreciated.

reaperz73
2013-05-09, 22:48
gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action nothing
or for while on battery power

gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action nothing


or install gnome-tweak-tool

yelow79
2013-06-19, 19:50
Thank you, I have been looking for a solution to this very problem

m0rd3cai
2014-02-08, 06:26
Thank you, I have been looking for a solution to this very problem

My first script.

touch no-suspend-lid-shut
leafpad no-suspend lid-shut

enter following into leafpad

!#/usr/bin
gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action nothing | gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action nothing

Now save and exit leafpad.

mv no-suspend-lid-shut /usr/bin/no-suspend-lid-shut

chmod +x no-suspend-lid-shut

now click on Applications -> System Tools --> Preferences --> Startup Applications

Name : no-suspend-lid-shut
command : /usr/bin/no-suspend-lid-shut
Comment : your choice :-)

Enjoy so you dont have to type it every time you boot :-)

m0rd3cai
2014-02-08, 06:28
Thank you, I have been looking for a solution to this very problem

My first script.

Open Terminal.

touch no-suspend-lid-shut
leafpad no-suspend lid-shut

enter following into leafpad

!#/usr/bin
gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action nothing | gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action nothing

Now save and exit leafpad.

mv no-suspend-lid-shut /usr/bin/no-suspend-lid-shut

chmod +x no-suspend-lid-shut

now click on Applications -> System Tools --> Preferences --> Startup Applications

Name : no-suspend-lid-shut
command : /usr/bin/no-suspend-lid-shut
Comment : your choice :-)

Enjoy so you dont have to type it every time you boot :-)

GrantLi
2016-03-17, 09:28
gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action nothing
or for while on battery power

gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action nothing


or install gnome-tweak-tool

Hi Reaperz73, I tried this but when I close my lid it still goes into sleep mode. I really need to be able to close the lid and have my laptop stay on to do automated stuff for work. Is there any more code I could try? Thanks.