Changes Made in Dconf Editor don't take effect

Asked by makan

I am using dconf Edior to change the "lid-close-ac-action" on Ferya Stable .i change the Value To "nothing" but that doesn't work and the laptop still goes to suspend when i close the lid .
Hope someone knows what's going on,
Thanks already

Question information

Language:
English Edit question
Status:
Solved
For:
Switchboard Edit question
Assignee:
No assignee Edit question
Solved by:
makan
Solved:
Last query:
Last reply:
Revision history for this message
Akshay Shekher (voldyman) said :
#1

You need to edit the file

/usr/lib/systemd/logind.conf

uncomment the line

HandleLidSwitch=suspend

and change it to

HandleLidSwitch=ignore

Revision history for this message
Akshay Shekher (voldyman) said :
#2

oh and run this command afterwards

sudo restart systemd-logind

Revision history for this message
makan (mohammmadreza-shabani) said :
#4

Thank you for your reply, but there is no "logind.conf" file in /usr/lib/systemd/ .
when i try to open it ,the Scratch gives me this error :

Scratch.vala:219: Error when getting information for file '/usr/lib/systemd/logind.conf': No such file or directory

Revision history for this message
makan (mohammmadreza-shabani) said :
#5

I found the solution!

1. open the terminal. When it opens, run the command below to open the configuration file via Scratch:

sudo scratch-text-editor /etc/systemd/logind.conf

2. Find out the line #HandleLidSwitch=suspend, remove the # and change it to:

    HandleLidSwitch=poweroff to shutdown computer when lid is closed
    HandleLidSwitch=hibernate to hibernate computer when lid is closed
    HandleLidSwitch=ignore to do nothing

3. Save the file and restart the service or just restart your laptop to apply changes.

sudo restart systemd-logind

That’s it. Enjoy!

Akshay Shekher (voldyman)

Revision history for this message
makan (mohammmadreza-shabani) said :
#6

Akshay Shekher (voldyman) Thank you again