Skip to content

Keep ubuntu running with lid closed. " I decided to use my Eee PC 1001HA as a home server. But there are many reasons you might want your computer to stay awake—maybe you're listening to music and don't want the screen visible, you use your laptop as a desktop computer with an external monitor, or you're watching a movie or presentation on a connected display or TV. After I close the lid it just shuts off the screen and stays on. Dec 6, 2015 · As such, I don't want the screen on all day, however i do want the cpu running 24x7. Figure 1: Open Terminal for Ubuntu Open a Terminal for Red Hat Enterprise 7 using the keyboard command of Ctrl + Alt + T. Find it through the following steps: In Windows 7, the only options you have for performing actions when you close the lid are in Power Options in the Control Panel. If you had a different setting here, you should check if you are able to suspend Ubuntu by closing the Feb 16, 2024 · Open a Terminal following the steps below for your specific operating system: . Sep 5, 2022 · Ubuntu Linux provides a straightforward way to change the laptop lid close behavior to “ignore,” allowing users to avoid automatic suspension when the lid is closed. 04, and Ubuntu 24. Especially with owning a TUF F15 2022. k. Stack Exchange Network. May 19, 2012 · Even after enabling it, some laptops won't boot at all with the lid closed (when they have power buttons accessible on the side) and you will have to open it, power it on, wait a few seconds, then close it. References User Guide . 04, there is no such option. Sep 7, 2022 · I'm using Anydesk to remotely access a Dell XPS 15 with Windows 11 (not sure if this is Windows 11 specific). I then unplugged the computer and left for an hour. See my power saving screen shot. gnome. sudo pmset -b sleep 0; sudo pmset -b disablesleep 1. e. Does anyone know how I can keep Ubuntu Server in my laptop with the lid closed from hibernating? When you close the lid of your laptop, your computer will suspend in order to save power. target hibernate. Is there such an option in proxmox? If you want to keep Music running with the lid closed, follow these steps: Click on the Amphetamine icon in the menu bar. The problem is that when I sign off on that particular server, ngrok will close out and I will lose my tunnel. I have it connected through Wi-Fi to the router, running Ubuntu Server 12. systemd-logind[917]: Lid opened. I would like to find a way to have the lcd display power off when I close the lid. patreon. target Dec 16, 2013 · This my first time using Ask Ubuntu so something might go wrong. Nov 9, 2023 · If you'd like to use your Windows 11 laptop with an external monitor, mouse, and keyboard, it's often nice to keep the lid closed. To tell Ubuntu what to do when your notebook plugged, also remove # from #HandleLidSwitchExternalPower=suspend line and change its value. 04, as I'm typing to you with my laptop lid closed, using external keyboard, bluetooth mouse and monitor. Check your Settings->Power configuration. Per Energy Saving tab: System Settings > Power Management > Energy Saving > On AC Power (or another tab) > Button Event Handling > When laptop lid closed, and choose desired action. But in such a configuration, it appears that the graphics performance is low as compared to when the lid is not closed. S: It works perfectly with the lid open May 9, 2019 · You'll need to manually put your laptop to sleep, hibernate it, or shut it down using its power buttons or in the options in the Start menu rather than simply closing the lid. Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. The behavior is not affected if the external monitor setup is mirror/extended. May 25, 2012 · Turn off laptop screen when closed. If I close the lid it goes into sleep mode, which I do not want, because I want to have it running and interact with it using SSH and VNC. ), so I have it set that way, but if I then unplug it with the lid down, it seems the power How to keep your laptop on when closed. Set to performance mode when plugged in and battery saving mode when unplugged. Nov 30, 2010 · # run this in the as the same user (or root) that xwindow is using # test for required parameter --> empty not allowed if [ "$1" == "" ]; then echo "Please provide true or false" echo "True means keep running when lid is closed" echo "False means suspend the computer when lid is closed" exit; fi # "running true" means keep running even if the Jun 22, 2023 · I have Ubuntu Server installed on my laptop and it works fine when I leave the lid of my laptop uncovered. Sep 2, 2022 · After a lot of search, I have found two methods to do it. Everything worked fine on Ubuntu 22. After checking this post I also checked this command Jul 4, 2024 · Whenever you close the lid, your laptop will keep running just as it did with the lid open. If I close the lid of the laptop, it goes to suspend/sleep mode and when I open the lid, it wakes up. Jun 3, 2016 · Hi I installed Ubuntu on this laptop. If you want to keep your work safe, you should choose to have the laptop lock. May 11, 2020 · Edit: My Ubuntu version is 18. May 24, 2017 · The title says "server stay on on screen close", yet the question is "screen turn off [on lid close]", kinda confusing :-\ – ckujau Commented May 24, 2017 at 5:41 Jul 27, 2019 · Keep Ubuntu Server running on a laptop with the lid closed? (6 Solutions!)Helpful? Please support me on Patreon: https://www. My issue is that the display is on constantly and if I close the lid, proxmox goes to sleep. After any changes you will to run: Code: I recently upgraded to the latest version (13. I start it by using the obvious, ngrok. Here’s how to stop that. Nov 4, 2022 · (Image credit: Future) Select the Do nothing option for the "On Battery" setting. Both screens are turned on. so i think you have to change it manually. 04, it suspends Ubuntu by default. We are going to tweak the logind. Any idea how to disable that? On most Linux and windows, there is a setting in the os to ignore closing the lid and keep running. Instead of suspending, the external monitor continues to operate. Click on Hardware and Sound. conf file or utilizing the Gnome Tweaks application, users can keep their laptop running even when the screen is closed. Furthermore, if I close the lid and then open it again (without running the previous command) the network-manager never restarts, and so I loose my internet connection permanently until I either reboot or run the previous command. Go to System Settings and then click on Power. 1. However, I didn't want to leave the lid of my laptop open all the time. Select Do Nothing to keep your computer on and awake when the lid is closed. Undo the above steps before following this. I’m trying proxmox out and running it on a spare laptop I have. But then, the system hibernates. Came back and winced in pain touching the laptop. I want to close the laptop lid but not even lock the screen! I generally use TeamViewer from my phone and thus I need my Laptop to stay on all the time. But that might not be the best option if want to keep your laptop on for listening to music or downloading a file. In my mind, I am sure that the lid event is not being ignore by some Nov 13, 2022 · Normally, closing the lid of your laptop will make it go to sleep. Available actions are: Do nothing; Sleep; Hibernate; Shut down; You cannot create custom actions here to assign to the lid close event. Is there a way to change this so that it will always be running? P. Prevent Sleep/Hibernate from Inactivity. Here’s how to keep your Windows 10 laptop on with the lid closed. Oct 4, 2021 · When I close the ubuntu lid and try to remote connect or try to ping the machine, it's not reachable. i would like to be able to close the laptop lid and store it under my desk while using the external monitor. Nov 11, 2023 · Lid settings in Control Panel. In this tutorial, we are going to configure this default lid close behavior in Ubuntu 20. To change the default behavior of Windows 10 when you close the lid, right-click the battery icon in the system tray, and then click on "Power Options. 04, nouveau driver. Save and close. power lid-close-ac-action 'nothing'. I intend to use external monitor with notebook lid closed. thanks, gukarma Nov 26, 2023 · Here, you can choose among several options to find what best fits your needs: do nothing, sleep, hibernate, or shut down. To undo simply: gsettings set org. 10 server laptop to keep running with the lid closed but I loose any attempts to connect to it by ssh. 04 server with text boot; Ubuntu/Linux Check SSD trim status (And to Enable/Disable the Trim) Tips for Let’s Encrypt (certbot etc. power lid-close-ac-action 'suspend'. I have an external monitor still and all that is working fine, but I want to the laptop screen to remain ON even when the lid is fully closed. I’m using debian with no gui and am trying to make the laptop stay on and continue running the mc server while the lid is closed. conf file to change the action of lid in Ubuntu. Some laptops just don't allow you operate the laptop with the lid closed at all too. You can resume it by opening the lid. Modifying the HandleLidSwitch parameter in the login . I just want my laptop to keep running as usual with the lid closed. Click Save Changes . 04 in system settings - power i had chosen 'when lid is closed do nothing' but now, after the upgrade to 13. Apr 28, 2024 · This simple tutorial shows how to change the action (e. 1 LTS on an old laptop. If you want to save power, you should choose to have the laptop sleep, suspend, or hibernate. I recently upgraded to the latest version (13. Battery settings set to 50% max charge in BIOS. Change user_name with your Apr 29, 2017 · The command will still be running (it will continue running when you log out) and you will be able to see its stdout and stderr just as though you'd never logged out: tmux pythonScript. com/roelvandepaarWith t Jun 22, 2023 · I have Ubuntu Server installed on my laptop and it works fine when I leave the lid of my laptop uncovered. Mar 4, 2019 · Or, if don’t want to interrupt an ongoing file download, but for some reason you need to close the lid. Aug 5, 2018 · My laptop (Ryzen HP Envy) keeps running out of power while the lid is closed. 04, it used to give a "Suspend when lid is closed" option in the General section, but in Ubuntu 24. g. Feb 20, 2010 · Hi I'm thinking about buying a monitor for my laptop. I did test the behavior for closing lid when I have an external monitor attached and that part seems to work okay (meaning: with the lid closed, i can use the actual machine when i have external mouse/keyboard/monitor). I've changed the power management settings on my Ubuntu 10. Click on Power Options. Click for larger image. There are option pull-downs to select what happens "when the lid is closed. sudo apt-get install gnome-tweaks Then open the gnome-tweaks and follow below steps: Aug 24, 2013 · Stack Exchange Network. Here’s everything you need to know about how to keep your Windows 10 laptop on when it’s closed. May 13, 2020 · Stack Exchange Network. It was extremely hot all over and a slight May 3, 2018 · There are two ways to achieve the desired result. 04, while it suspends Ubuntu by default. This will disable any action when the lid gets closed, and the laptop is plugged into AC. Though a locked screen can be unlocked but i after i read your question, i checked my system settings. Then, connect again the next day, run tmux attach again and you're back where you started. i want to leave the laptop running when the laptop lid is closed and when i switch monitor to a different computer on the kvm. I'm making a server (Not a Ubuntu server) and I need to 24/7, I normally have my laptop charging and the lid closed. My situation in short: Apr 22, 2001 · My Ubuntu 22. 04 and when the lid of my laptop is closed the wifi disconnects and needs to be turned on manually when the lid is opened. In the power setting, make sure that option for ‘When the lid is closed’ is set to Suspend. More: I want to close the lid of my laptop, turn the screen off, but keep RDP-connection enabled I already tried to edit May 19, 2022 · Even if you have an external monitor, running a Windows 11/10 laptop with its lid closed might force the PC to go to sleep. Is there a tutorial/literature explaining what script gets run upon the laptop lid closing / re-opening? Sep 27, 2016 · I am running Ubuntu 16. 04 laptop depends on your needs. Click on Choose what closing the lid does in the left menu. Jan 20, 2022 · Windows 10. Tried search for an hour, but couldn't fi Jun 20, 2018 · Run apt-get install gnome-tweaks in a terminal, launch Gnome tweaks, and go to the power section in the GUI and disabling suspend when laptop lid is closed Share Improve this answer Dec 11, 2017 · I would like to learn how to customize the behavior of Ubuntu when the laptop lid closes. Aug 1, 2023 · Or do you? Thankfully, you can keep your monitor on when your laptop is closed. Nov 15, 2020 · It detects the lid actions, but It just doesn't suspend my pc. Prevent Your Laptop from Shutting Down When You Close the Screen First, open Windows Settings by pressing Windows+i on your keyboard. Methods I Was coming here to say this, and it's why I leave the lid open for an hour or so before closing it. Nov 2, 2017 · To disable suspend on lid-close. This works for me on a new install of Ubuntu Server LTS 18. Here's how to close the lid without putting your PC to sleep. com) Change the “When I close the lid” setting for “Plugged in” to “Do nothing. Lately, the remote screen freezes when the lid is being closed, as soon as the laptop screen turns off (close lid actions are deactivated in the power setting). If that still does not work, press the power button. Device Home Page - References and Resources – Learn about your Device - Solve Problems I have an HP EliteBook 8560W which is retired from its original development work on Windows and is now running Ubuntu Mate 20. Apr 28, 2023 · To change the lid close action on Windows 11, open Control Panel > Hardware and Sound > Power Options, and click “Choose what closing the lid does,” use the “When I close the lid” setting and choose the action for “On Battery” and “Plugged in:” “Do nothing –” keeps the device running when closing the lid. If it does not resume, try clicking the mouse or pressing a key. . target suspend. sh and paste /home/your_user/lid_event just after #!/bin/bash. Feb 14, 2018 · You close the lid of your laptop but it keeps on running instead of going into suspend mode? Here are a few ways how you can make Ubuntu suspend when the lid is closed. But I found out that my monitor was staying on even when the lid was closed (a. ; Quick note: If you use this device on the go, it's best to keep the lid setting the same unless you will be OK Mar 5, 2024 · I just want my laptop to keep running as usual with the lid closed. any other methods I might have to go through to force the lid to not affect the system? whenever I "wake" the system from that state. 04, Ubuntu 22. I just need to find out how to let my Ubuntu terminal running even if my lid is closed, and when its not charged. Oct 31, 2009 · hi there, i have an acer 5672 connected to a 24" samsung monitor. Or if you want to continue an online audio streaming with the laptop closed. The example above is from my own laptop, and that’s exactly what I do. the following text shows up on the screen Nov 4, 2022 · (Image credit: Future) Select the Do nothing option for the "On Battery" setting. Also, SAVE ALL YOUR WORK, the second command would require you to reboot. ) May 17, 2020 · When laptop lid is closed in Ubuntu 20. I am running Ubuntu 13. , power off, hibernate, do nothing, or lock) when laptop lid is closed in Ubuntu 20. 3 LTS. conf, settings are set to suspend Aug 21, 2015 · Now you need to edit your /etc/acpi/lid. May 30, 2022 · To change lid close action without any condition, enable the #HandleLidSwitch=suspend line and change the value to ignore, lock, poweroff, etc. Methods I however. power lid-close-battery-action 'blank' As you see, you can set different actions depending on whether the computer is on AC power (lid-close-ac-action) or on battery power (lid-close-battery-action). When I closed a laptop lid, then the laptop screen is turned off and an external montor was still turned on. Tried the BIOS and nothing, no option about the lid. Re-enable sleeping when the lid is closed running on battery. (Screenshot: askleo. Jul 26, 2018 · gsettings set org. All the answers I've found involve the GUI which I do not have. My suspicion is that the laptop isn't saving the state to the HDD (Hibernate) and instead saving it to RAM and still consuming power. If you've hooked up an external monitor to your laptop, you might prefer closing the laptop's lid and maybe placing the device on a vertical stand Most users keep their lid open to avoid putting the laptop to sleep and use it with an external monitor. 4 I googled power management and downloaded an app through Ubuntu Software which has a setting for when the lid is closed. Under settings - power - Suspend and power button, I only have two options, one for automatic suspend (on for both plugged and unplugged after 20 min), and when power Jan 4, 2022 · I want my laptop running Ubuntu Server 20. 10 it is changed in 'when lid is closed suspend'. 10). Any help would be greatly appreciated. generating unnecessary heat). But after updating to 22. Does anyone know how I can keep Ubuntu Server in my laptop with the lid closed from hibernating? Aug 2, 2023 · Most people seem to want to keep their laptops running with the lid closed when connected to an external monitor and this is now the default behavior in Ubuntu 22. EDIT: The worst hot spot is located in the are of the power led indicators in the top center of the TUF F15 Dash 2022 and, if hot enough, could impact your monitor. Don't want to burned it out. in ubuntu 13. 01 (dual booted along with windows on my HP laptop) keeps shutting down when I close the lid. I prefer to link with the lid action of my laptop. After working on some tasks (Word, Slack, Browser), I closed the lid, assuming the computer would go to sleep. Jan 22, 2022 · Installed pop_os on an old laptop, where i want to run couple of servers (nessus, docker/minecraft, etc). 04 0 Ubuntu 20. I can only guess that a script is run when the laptop lid is closed. I have looked at several similar questions and tried the below methods already. Is it safe to keep my laptop on when the lid is closed? It’s generally safe, but make sure your laptop has proper ventilation to prevent overheating. I decided to use my Eee PC 1001HA as a home server. Regards, Tom Keep laptop running with lid closed I am trying to use a laptop as a server, but can't get it to stay on with the lid closed. sudo pmset -b sleep 5; sudo pmset -b disablesleep 0. Oct 4, 2023 · I've installed Ubuntu 22. and the os "freezes" until I open the lid and press a button ssh is also unresponsive in that state. To save some energy: I want to have my screen blank, but in that case, I can NOT connect anymore with RDP. 04. Any idea on how to fix? I've tried the solution here: Keep Ubuntu Server running on a laptop with the lid closed? How do I keep my laptop on when I close it Ubuntu? Make sure to enable suspend for lid close action. It's an HP notebook. 04, computer keeps shutting down when I close the lid, I've already checked logind. That’s the expected behavior. gksudo gedit /etc/acpi/lid. This inhibits the suspend action, but it nevertheless locks the screen, which you can see if you use your laptop with an external monitor. right now, when i close the lid the system goes into standby. But! You can use the Task Scheduler to schedule a task when a certain event is Hey all, VERY new to linux as a whole and am using an old laptop to run a minecraft server. The instructions above will ensure your laptop remains on when the lid is closed. Click on Quick Settings. It saves the battery as well as your work. Sep 19, 2017 · Disable Sleeping when the lid is closed running on battery. However, by default, Windows will still enter sleep or hibernate mode after a specific period of inactivity. As soon as I open the lid the desktop appears with the icons etc- for a second and then the PC reboots. keeps shutting down when I close the lid. So, I tried to put the lid on my laptop. Jan 23, 2021 · Hibernation fails with closed lid and external monitor connected Ubuntu 18. " I've set my "when the lid is closed" options to "do nothing" for both "on battery power" and "when plugged in" settings. Can the 'lid close' switch be configured somehow to simply turn off the screen but otherwise the laptop is running as normal? FYI: I'm running coreos, but i'm willing to switch to another docker container OS if it makes life easier. Jun 14, 2018 · I have ngrok running on a server I remote into. Basically it's as if I send the request to reboot or power-off to Ubuntu but it won't do it as long as the lid is closed. It is set to suspend. Click on Start ⊞ and select Control Panel. ” Click Save changes and your laptop will now keep running with the lid closed. Mar 6, 2024 · I just want my laptop to keep running as usual with the lid closed. Aug 6, 2022 · In order to make the laptop keep on running after closing the lid run these following commands on the Terminal, While on AC; gsettings set org. The most common reason to want to keep a MacBook from sleeping when the lid is closed is if you're going to use it with an external monitor and keyboard. To change lid close action without any condition, enable (remove ‘#’) the #HandleLidSwitch=suspend line and change the value to ‘ignore‘, ‘lock‘, ‘poweroff‘, etc. 04 LTS. Will this setting affect how my laptop goes to sleep or shuts . Aug 3, 2018 · It shouldn't happen under Ubuntu 18. Currently, when I close the lid to the notebook, the notebook display turns off. I want the opposite, and that now seems to be impossible. , the laptop doesn’t sleep when the lid is closed. Have this laptop connect to a 4 port hdmi-kvm. – Feb 14, 2018 · One of the ways to save battery on Ubuntu without losing work is to use the suspend mode. power lid-close-battery-action 'nothing' Mar 9, 2015 · I decided to use my Eee PC 1001HA as a home server. I have tried setting "HandleLidSwitch=ignore" on both normal and external power, and changing "lid-close-ac-action" to nothing through dconf. I tried Sep 25, 2016 · Notebook Asus N56VJ, Ubuntu 16. Open a Terminal for Ubuntu (Figure 1): . Is there a way I can keep the ngrok tunnel running even when I have signed off the machine? Jul 5, 2023 · When you close your laptop lid, the computer will usually go to sleep. plugins. ; Quick note: If you use this device on the go, it's best to keep the lid setting the same unless you will be OK Jul 5, 2020 · If you cannot access the "When I close the lid" setting, then, Power menu—Select Change Settings that are currently unavailable. From windows, I can connect with the RDP-protocol, no problem. power lid-close-ac-action 'nothing' While on Battery; gsettings set org. Aug 31, 2022 · If you use Ubuntu on a laptop, you might have noticed that the system is suspended when you close the lid. To the right of "When I close the lid" > Select "Do nothing" from the drop-down menu. i. whenever I close the lid. Nov 25, 2021 · gsettings set org. You can change a few settings to run the laptop with the lid closed in Windows. I have it running on an old laptop. py Once you've launched that, just close the PuTTY window. 3 LTS and configured all my environments, but when I was about to close my laptop lid, I encountered an issue. Method 1: Using GNOME Tweaks First we have to install gnome-tweaks-tool. Dec 9, 2011 · Running Ubuntu Server 11. You can also choose to set what closing the lid does when your laptop is Jun 29, 2019 · How to: Fix Ubuntu Install/upgrade/update dependency issue (snapd,snap, ubuntu-core-launcher, snap-confie) How to: Ubuntu switch php-fpm version; Turn off display automatically on Ubuntu 18. gedit ~/lid_event and paste the following. exe http 80. Now you need to create a script for close event so that you can lock your screen. 04 LTS, I successfully used the following to disable suspend: sudo systemctl mask sleep. You lift the lid, the system wakes up, and you can log in and continue your work. settings-daemon. target hybrid-sleep. The answer from @user386160 worked great to prevent my laptop from going to sleep. Here's how to change that setting. Since the upgrade, whenever I close the laptop lid, it goes to sleep mode. Jun 2, 2016 · I have a Lenovo P70 running Ubuntu 16. I want to keep the notebook screen ON when the lid is closed. Feb 16, 2024 · No, with the lid closed, you typically can’t use the built-in keyboard and touchpad. I have tried the following without any success: su May 6, 2024 · I am using Ubuntu 24. Jun 19, 2024 · Since you typically don't need to use your MacBook when the lid is closed, the default setting is for the display to turn off and the MacBook to sleep whenever the lid is closed. I can move a mouse pointer to the closed screen and windows are opened sometimes on the closed laptop screen. But the thing is, there is no need to keep the lid open just to keep the laptop running. To enable lock on lid-close. power lid-close-ac-action 'blank' gsettings set org. My wlan0 is a RaLink RT3090. You’ll need to connect external devices. The clearest explanation I have found of how its intended to work is from Poettering himself here. 3 LTS to not shut off when closing the lid. Jun 28, 2016 · I want the machine to stay on when I close the lid when plugged in (keep things running overnight, etc. How can I ensure that the laptop suspends when the lid is closed? I also installed the Tweaks (gnome-tweaks) tool and in Ubuntu 22. The best option for what happens when you close the lid of your Ubuntu 22. It’s simple: Click on the magnifier (Search Windows) icon in the lower left corner of the screen. to have internet again with the lid closed. Everything works fine except this annoying problem: when I close the lid, the ssh server stops working and, I guess, wlan0 too. I can't see an option in the power settings to keep the laptop running when the lid is closed and connected to an external monitor. Remember to re-enable or manually sleep your machine before putting it into a bag. Jan 5, 2024 · By default, your PC is put to sleep when you close the lid, which isn't ideal if you want your laptop out of sight while it's docked on your workspace. Aug 1, 2021 · On Ubuntu 16. the screen still turns off. It is set to suspend when the lid is closed but nothing happens. sudo apt-get install gnome-tweak-tool Launch Tweaks, go to the "Power" section and disable suspend on lid-close. a. sh file which catch lid open and close event. 10 the behaviour was changed. Feb 27, 2018 · I decided to use my Eee PC 1001HA as a home server. Methods I Dec 23, 2022 · I'm running Ubuntu 22. systemd-logind[917]: Lid closed. This means that the computer is not actually turned off — it has just gone to sleep. How to Keep the Screen on When Your Laptop Lid Is Closed Windows provides a simple toggle to let you keep your laptop screen on, even when it's closed. 10 on a laptop. Here's how. Install Tweaks (gnome-tweak-tool) by running. $ sudo journalctl -b -u systemd-logind I can see these in the last 2 lines of the output of above line. uzhrl pujr ahejf qccz vqhje aop lwmqw adafyleo gzdmj jir