2

This laptop is acting as a server, so these are not only completely irrelevant and unnecessary, but also a serious PITA because the server was suspending when I closed the lid. I've set them to "ignore" in logind.conf, but it still says in journal:

Dec 02 19:29:59 webapp systemd-logind[10874]: Watching system buttons on /dev/input/event4 (Power Button)
Dec 02 19:29:59 webapp systemd-logind[10874]: Watching system buttons on /dev/input/event2 (Lid Switch)
Dec 02 19:29:59 webapp systemd-logind[10874]: Watching system buttons on /dev/input/event3 (Sleep Button)
Dec 02 19:30:00 webapp systemd-logind[10874]: Watching system buttons on /dev/input/event0 (AT Translated Set 2 keyboard)
Dec 02 19:30:00 webapp systemd-logind[10874]: Watching system buttons on /dev/input/event5 (ThinkPad Extra Buttons)

How can I completely disable/remove these?

  • For posterity, after setting HandleLidSwitch=ignore have you restarted using systemctl restart systemd-logind.service? Also, have you considered masking the sleep/suspend/hibernate services? – kemotep Dec 3 at 13:34
  • @kemotep 1. Yes, and 2. I did use systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target, but it flooded journal with 200 warnings per second (~32GB of writes to SSD per day) before I realized it, which brought me here. – dvtan Dec 3 at 16:45
  • Many people report that issue. They say to beat that by limiting the logs and using log rotate. BTW on a modern consumer SSD the write tolerances are ridiculously high. A 500 GB Samsung 960 is rated for an average of 400TB of writes. At 50 GB of writes a day that gives you over 21 years. Now if your solid state drive is several years old it likely cannot handle that. If it is necessary for you to use your system in the manner you describe you may need to replace the drive to actually have the performance you need. – kemotep 2 days ago
  • wtf lol that is seriously the dumbest comment/suggestion ever. For posterity: Many people report that issue. They say to beat that by limiting the logs and using log rotate. BTW on a modern consumer SSD the write tolerances are ridiculously high. A 500 GB Samsung 960 is rated for an average of 400TB of writes. At 50 GB of writes a day that gives you over 21 years. Now if your solid state drive is several years old it likely cannot handle that. If it is necessary for you to use your system in the manner you describe you may need to replace the drive to actually have the performance you need. – dvtan 2 days ago
  • What part is dumb? Limiting logs? I would certainly agree with that sentiment. What exactly is it flooding your logs with though? Perhaps there is a systemd unit you are using that has a dependency on sleep,suspend, or hibernate and thus is failing constantly. – kemotep 2 days ago

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.