You are not logged in.

#1 2020-01-04 01:32:45

charles_houston
Member
Registered: 2015-05-17
Posts: 11

Unit file suspend@user not found for system

I am trying to have my arch linux system trigger my i3lock after my computer hibernates. Right now I am looking at the arch linux wiki for Power management. I see that I need to use the hooks for systemd for suspend/resume. However when I try to enable suspend@user, systemctl says the unit file does not exist. When I look in /usr/lib/systemd/system, I find suspend.target, systemd-hibernate-resume@.service, systemd-suspend.service and other similar files, but nothing that I can enable. Do I need to make my own unit file?

Offline

#2 2020-01-04 02:08:29

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Unit file suspend@user not found for system

charles_houston wrote:

Do I need to make my own unit file?

Yes. This is why there is a sample file in the wiki...
https://wiki.archlinux.org/index.php/Po … leep_hooks


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2020-03-27 11:35:27

charles_houston
Member
Registered: 2015-05-17
Posts: 11

Re: Unit file suspend@user not found for system

I finally took the time to get this to work. It just took putting the sample file suspend@.service in /etc/systemd/system, editing it to run i3lock on suspend, and then enabling the service.

Offline

#4 2020-03-27 12:58:27

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: Unit file suspend@user not found for system

Please remember to mark your thread [SOLVED] (edit the title of your first post).

Offline

Board footer

Powered by FluxBB