25 July, 2015

how to prevent laptop from sleeping when closing lid ?

Stop Going to Sleep When Closing the Laptop

#how_to_disable_lid_on_laptop_in_terminal

  • Open Terminal
  • type in the command below (as root)

sudo gedit /etc/systemd/logind.conf
  • Now the logind.conf file will open in Gedit text editor
  • set the variable “HandleLidSwitch” to “ignore”, as in the example below:
 
[Login]
 #NAutoVTs=6
 #ReserveVT=6
 #KillUserProcesses=no
 #KillOnlyUsers=
 #KillExcludeUsers=root
 #Controllers=
 #ResetControllers=cpu
 #InhibitDelayMaxSec=5
 #HandlePowerKey=poweroff
 #HandleSuspendKey=suspend
 #HandleHibernateKey=hibernate
 HandleLidSwitch=ignore
 #PowerKeyIgnoreInhibited=no
 #SuspendKeyIgnoreInhibited=no
 #HibernateKeyIgnoreInhibited=no
 #LidSwitchIgnoreInhibited=yes
  • Now reboot
With this change, reboot your system and feel free to close your laptop lid that it will no longer go to sleep. Now you are done!
Enjoy!


i'm using that to create server on my Laptop,
less power consumptions and recycle old computer..


#Perfect server set up

No comments: