Results 1 to 6 of 6

Thread: Disable sleep when laptop lid is closed

  1. #1
    Join Date
    2013-May
    Posts
    1

    Disable sleep when laptop lid is closed

    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


    Code:
    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



    Code:
    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.

  2. #2
    Code:
    gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action nothing
    or for while on battery power
    Code:
    gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action nothing

    or install gnome-tweak-tool
    Last edited by reaperz73; 2013-05-09 at 23:05.

  3. #3
    Join Date
    2013-Apr
    Posts
    6
    Thank you, I have been looking for a solution to this very problem

  4. #4
    Join Date
    2014-Jan
    Posts
    3

    NO PC SUSPEND ON LID SHUT startup script :-)

    Quote Originally Posted by yelow79 View Post
    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 :-)

  5. #5
    Join Date
    2014-Jan
    Posts
    3
    Quote Originally Posted by yelow79 View Post
    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 :-)

  6. #6
    Join Date
    2016-Mar
    Posts
    1
    Quote Originally Posted by reaperz73 View Post
    Code:
    gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action nothing
    or for while on battery power
    Code:
    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.
    Last edited by GrantLi; 2022-04-16 at 11:36.

Similar Threads

  1. Prevent Laptop from shutting down if cover is closed
    By devhadez in forum General Archive
    Replies: 0
    Last Post: 2021-12-10, 18:44
  2. Replies: 0
    Last Post: 2019-07-09, 21:45
  3. Trying to disable battery in laptop
    By Codelocker in forum General Archive
    Replies: 3
    Last Post: 2018-06-04, 13:34
  4. Laptop overheats and drains battery even with lid closed
    By Dgameman1 in forum General Archive
    Replies: 1
    Last Post: 2015-07-15, 18:20
  5. How do I disable sleep mode in Kali?
    By zombiebyte in forum General Archive
    Replies: 1
    Last Post: 2013-09-16, 15:41

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •