Hi all, another question! I've been googling for a bit and I can't seem to find a way to do this (if at all possible).
Is it possible to leave my windows unchanged when I close the lid of my laptop? I'm currently running a dual-monitor setup (laptop screen + external monitor). Due to limited space on my desk, I'll often close my laptop lid to do something else, but doing so causes all my open windows (terminals, GUI windows, browsers, etc.) to all default to my external display - i.e. the system thinks it's only running the one monitor now.
Is there a setting/combination of settings that would allow my laptop screen to turn off/go black, but not actually "disconnect" from the system? I'd like to have all my windows stay where they are when I close my laptop lid.
Thanks all,
- Yoshi
How to: Leave windows unchanged on laptop lid close?
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
How to: Leave windows unchanged on laptop lid close?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: How to: Leave windows unchanged on laptop lid close?
Have you checked the Power Manager settings for what happens when you close the lid?
My laptop is still running 17.3--there is an option to blank the screen when the lid is closed.
My laptop is still running 17.3--there is an option to blank the screen when the lid is closed.
Everything in life was difficult before it became easy.
Re: How to: Leave windows unchanged on laptop lid close?
If just set up XCFE on this laptop and turned off all power management settings. Tried closing the lid and re-opening it, I'm still here, So have a look in Power management. You did not say which desktop you were using, so the actual setting method may be different to XFCE
Fully mint Household
Out of my mind - please leave a message
Out of my mind - please leave a message
Re: How to: Leave windows unchanged on laptop lid close?
Have you tried editing the logind.conf file? If not, this may be of some help.
Head over to:
and enter your password. Of course, nano can be replaced with your editor of choice.
At this point, you must un-comment the lines:
HandleLidSwitch=suspend
HandleLidSwitchDocked=suspend
LidSwitchIgnoreInhibited=yes
The third line is a few down from the first two, but the first two are adjacent. These lines above will, when the switch is activated (lid closed), suspend the computer (sleep). They must be edited to say:
HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore
LidSwitchIgnoreInhibited=no
While I made this change to specifically prevent sleeping it may also work for your case because we're simply telling the computer to ignore the lid switch.
Head over to:
Code: Select all
sudo nano /etc/systemd/logind.conf
At this point, you must un-comment the lines:
HandleLidSwitch=suspend
HandleLidSwitchDocked=suspend
LidSwitchIgnoreInhibited=yes
The third line is a few down from the first two, but the first two are adjacent. These lines above will, when the switch is activated (lid closed), suspend the computer (sleep). They must be edited to say:
HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore
LidSwitchIgnoreInhibited=no
While I made this change to specifically prevent sleeping it may also work for your case because we're simply telling the computer to ignore the lid switch.
Re: How to: Leave windows unchanged on laptop lid close?
[SOLVED] My question was solved with the following link: viewtopic.php?t=214890
I also just tried editing the file you mentioned above but I am still having the same problem.
I am running Cinnamon.
Hi, I am having a problem where when I close the lid to my laptop, the system is going to sleep even though I have checked the option to "do nothing". I changed this in the gui power management settings. I have an external monitor connected and so I checked the "Perform lid-closed action even with external monitors attached" option.TopDownTom wrote: ⤴Wed Oct 24, 2018 7:44 am Have you tried editing the logind.conf file? If not, this may be of some help.
Head over to:and enter your password. Of course, nano can be replaced with your editor of choice.Code: Select all
sudo nano /etc/systemd/logind.conf
At this point, you must un-comment the lines:
HandleLidSwitch=suspend
HandleLidSwitchDocked=suspend
LidSwitchIgnoreInhibited=yes
The third line is a few down from the first two, but the first two are adjacent. These lines above will, when the switch is activated (lid closed), suspend the computer (sleep). They must be edited to say:
HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore
LidSwitchIgnoreInhibited=no
While I made this change to specifically prevent sleeping it may also work for your case because we're simply telling the computer to ignore the lid switch.
I also just tried editing the file you mentioned above but I am still having the same problem.
I am running Cinnamon.
Re: How to: Leave windows unchanged on laptop lid close?
Powerchord84, I'm glad you were able to find a solution.