You are not logged in.

#1 2015-05-23 21:17:03

jo-shva
Member
From: Sherman, TX USA
Registered: 2010-10-18
Posts: 133

Suspend Powers off the computer SOLVED

I am using systemd suspend.  At first the computer goes into suspend but it shuts itself down(powers off) after a short time.  I have no idea how to fix this or even why it is happening.  Help is appreciated.

Last edited by jo-shva (2015-05-24 10:41:53)


"Democracy is being allowed to vote for the candidate you dislike least." -- Robert Byrne
http://killhellokitty.deviantart.com/

Offline

#2 2015-05-23 22:33:25

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: Suspend Powers off the computer SOLVED

Make and model of computer might be helpful. 
At least tell us if it is a tower or laptop; whether it is running on batteries; etc...


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2015-05-23 22:52:17

jo-shva
Member
From: Sherman, TX USA
Registered: 2010-10-18
Posts: 133

Re: Suspend Powers off the computer SOLVED

Its HP envy 17 laptop. Plugged in.  I recently reinstalled Arch and on this install it doesn't work properly.  But on the previous install I had no problems with it.
This is what journalctl says:

May 22 07:04:46 rooster systemd[1]: Starting User suspend actions...
May 22 07:04:46 rooster systemd[3187]: Failed at step USER spawning /usr/bin/pkill: No such process
May 22 07:04:46 rooster systemd[3189]: Failed at step USER spawning /usr/local/bin/music.sh: No such process
May 22 07:04:46 rooster systemd[1]: suspend@jo-shva.service: control process exited, code=exited status=217
May 22 07:04:46 rooster systemd[1]: Failed to start User suspend actions.
May 22 07:04:46 rooster systemd[1]: Unit suspend@jo-shva.service entered failed state.
May 22 07:04:46 rooster systemd[1]: suspend@jo-shva.service failed.

Last edited by jo-shva (2015-05-23 23:41:09)


"Democracy is being allowed to vote for the candidate you dislike least." -- Robert Byrne
http://killhellokitty.deviantart.com/

Offline

#4 2015-05-23 23:39:19

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: Suspend Powers off the computer SOLVED

Define a 'Short time'.   Also, not all HP Envy laptops are created equal.

I post this from my HP Envy 15".  Intel processor, Intel graphics.
Suspend works okay for me, but I only watched it blink at me for a minute or so.   Is there anything interesting in the Journal regarding the suspend?
4.0.2-1 kernel.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2015-05-23 23:42:16

jo-shva
Member
From: Sherman, TX USA
Registered: 2010-10-18
Posts: 133

Re: Suspend Powers off the computer SOLVED

May 22 07:04:46 rooster systemd[1]: Starting User suspend actions...
May 22 07:04:46 rooster systemd[3187]: Failed at step USER spawning /usr/bin/pkill: No such process
May 22 07:04:46 rooster systemd[3189]: Failed at step USER spawning /usr/local/bin/music.sh: No such process
May 22 07:04:46 rooster systemd[1]: suspend@jo-shva.service: control process exited, code=exited status=217
May 22 07:04:46 rooster systemd[1]: Failed to start User suspend actions.
May 22 07:04:46 rooster systemd[1]: Unit suspend@jo-shva.service entered failed state.
May 22 07:04:46 rooster systemd[1]: suspend@jo-shva.service failed.

This is from the journal


"Democracy is being allowed to vote for the candidate you dislike least." -- Robert Byrne
http://killhellokitty.deviantart.com/

Offline

#6 2015-05-23 23:59:13

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: Suspend Powers off the computer SOLVED

You have enabled a user specific suspend service.  I have not seen one afore. 

Out of curiosity, why did you set this up? and could you share that service file with us.  It is that service failing that seems to be causing the issue.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2015-05-24 00:02:49

jo-shva
Member
From: Sherman, TX USA
Registered: 2010-10-18
Posts: 133

Re: Suspend Powers off the computer SOLVED

Its posted on the 'Power Management with Systemd page' https://wiki.archlinux.org/index.php/Po … th_systemd

/etc/systemd/system/suspend@.service

[Unit]
Description=User suspend actions
Before=sleep.target

[Service]
User=%I
Type=forking
Environment=DISPLAY=:0
ExecStartPre= -/usr/bin/pkill -u %u unison ; /usr/local/bin/music.sh stop ; /usr/bin/mysql -e 'slave stop'
ExecStart=/usr/bin/sflock

[Install]
WantedBy=sleep.target

"Democracy is being allowed to vote for the candidate you dislike least." -- Robert Byrne
http://killhellokitty.deviantart.com/

Offline

#8 2015-05-24 00:22:58

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: Suspend Powers off the computer SOLVED

That is an example.   Do you actually have an executable shell script called music.sh in /usr/local/bin ?  Unless you specifically put something there, the answer is no.
I really don't think you need to have a user specific suspend service.  Unless you can come up with a good reason as to why you need it, I would disable the service.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2015-05-24 00:25:12

jo-shva
Member
From: Sherman, TX USA
Registered: 2010-10-18
Posts: 133

Re: Suspend Powers off the computer SOLVED

I thought I needed it for mysql.  If the normal service will handle mysql also then I will change it to the normal service file.


"Democracy is being allowed to vote for the candidate you dislike least." -- Robert Byrne
http://killhellokitty.deviantart.com/

Offline

#10 2015-05-24 00:29:05

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: Suspend Powers off the computer SOLVED

I think it will.  Give it a shot.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#11 2015-05-24 00:33:26

jo-shva
Member
From: Sherman, TX USA
Registered: 2010-10-18
Posts: 133

Re: Suspend Powers off the computer SOLVED

there is no: systemctl enable suspend.service??


"Democracy is being allowed to vote for the candidate you dislike least." -- Robert Byrne
http://killhellokitty.deviantart.com/

Offline

#12 2015-05-24 01:51:29

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: Suspend Powers off the computer SOLVED

You use

systemctl suspend

to suspend with systemd.

Offline

#13 2015-05-24 07:11:25

MrEvilBreakfast
Member
From: Abbotsford, BC
Registered: 2011-11-03
Posts: 30

Re: Suspend Powers off the computer SOLVED

To suspend on my laptop, I use

echo mem > /sys/power/state

Offline

#14 2015-05-24 14:40:28

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: Suspend Powers off the computer SOLVED

I see it is marked as solved.  What was the solution?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#15 2015-05-26 20:07:29

jo-shva
Member
From: Sherman, TX USA
Registered: 2010-10-18
Posts: 133

Re: Suspend Powers off the computer SOLVED

The solution was to use Gnomes suspend and not use any systemd suspend service.


"Democracy is being allowed to vote for the candidate you dislike least." -- Robert Byrne
http://killhellokitty.deviantart.com/

Offline

Board footer

Powered by FluxBB