How to stop laptop from going to sleep when lid closed (18.04 LTS Mate)

Bo Berglund bo.berglund at gmail.com
Mon Apr 20 15:04:07 UTC 2020


On Mon, 20 Apr 2020 09:19:02 +0100, Colin Law <clanlaw at gmail.com>
wrote:

>As a matter of possible interest, I had the opposite problem, that it
>would not suspend on closing the lid, because I have a second display
>connected and the powers that be seem to have decided that if I have a
>second display connected then I don't want to suspend when I close the
>lid.  I tried a number of possible solutions for this, I don't want to
>have to mess about finding the suspend option with the mouse, that
>takes much too long.  The solution I found was to link a keyboard
>shortcut (Ctrl+Alt+U) to the command
>gnome-terminal -e /home/me/bin/suspend.sh
>where the file contains
>#!/bin/sh
>systemctl suspend -i
>
>and that works well.  I don't remember why I couldn't just call
>systemctl from the shortcut.  So, having prevented it from suspending
>when you close the lid, and if the BIOS update I think you are
>attempting in another thread fixes the inability to resume problem,
>this might be of use to you.
>
>Colin

Thanks for the suggestion!
I sure will put such a shortcut on the Mate desktop!


-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list