So here are the things related with my problem:
- I uncommented these lines
$ grep -v '^#' /etc/systemd/logind.conf
[Login]
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
HandleLidSwitchDocked=ignore
- It detects the lid actions, but It just doesn't suspend my pc.
$ sudo journalctl -b -u systemd-logind
I can see these in the last 2 lines of the output of above line
systemd-logind[917]: Lid closed.
systemd-logind[917]: Lid opened.
- After checking this post I also checked this command
$ systemd-inhibit --list --mode=block
WHO  UID  USER  PID  COMM           WHAT                                    >
alk  1000 alk   1592 gsd-power      handle-lid-switch                       >
alk  1000 alk   1590 gsd-media-keys handle-power-key:handle-suspend-key:hand>
So on the output WHO and USER columns are not gdm (it is in the post that I linked). That's why I didn't want to create a kill script without being sure.
What should I do?
 
     
     
    