You are not logged in.

#1 2014-08-28 03:21:17

SuperBo
Member
Registered: 2012-02-20
Posts: 45

Computer suddenly suspend while using

Recently, when I'm using my computer, it suddenly suspend.
How can i check log to know what happened to my computer?

Offline

#2 2014-08-28 04:11:19

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

Re: Computer suddenly suspend while using

Wake it up and read the journal ( look at the output of sudo journalctl )


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 2014-08-28 09:09:42

SuperBo
Member
Registered: 2012-02-20
Posts: 45

Re: Computer suddenly suspend while using

$ sudo journalctl -xn
Aug 28 16:05:44 SuperBo-Lap sudo[2843]: pam_unix(sudo:session): session closed for user root
Aug 28 16:05:49 SuperBo-Lap sudo[2857]: superbo : TTY=pts/0 ; PWD=/home/superbo ; USER=root ; COMMAND=/usr/bin/journalctl -xn
Aug 28 16:05:49 SuperBo-Lap sudo[2857]: pam_unix(sudo:session): session opened for user root by superbo(uid=0)

This is the log message, I can't understand what happening

Offline

#4 2014-08-28 19:13:09

rebootl
Member
Registered: 2012-01-10
Posts: 431
Website

Re: Computer suddenly suspend while using

Yeah, I'm having a similar issue, but I didn't investigate it yet...
Do you have configured something in /etc/systemd/logind.conf ? e.g.:

IdleAction=suspend
IdleActionSec=45min

Do you use a DE (Desktop environment) ?

Edit: As for your log, using the '-n' option you don't get enough lines to see what happened (see 'man journalctl' for more explanations of the options.) E.g. using '-b' you get the current boot including suspends.

Last edited by rebootl (2014-08-28 22:10:53)


Personal website: reboot.li
GitHub: github.com/rebootl

Offline

#5 2014-08-28 23:49:15

SuperBo
Member
Registered: 2012-02-20
Posts: 45

Re: Computer suddenly suspend while using

rebootl wrote:

Yeah, I'm having a similar issue, but I didn't investigate it yet...
Do you have configured something in /etc/systemd/logind.conf ? e.g.:

IdleAction=suspend
IdleActionSec=45min

Do you use a DE (Desktop environment) ?

Edit: As for your log, using the '-n' option you don't get enough lines to see what happened (see 'man journalctl' for more explanations of the options.) E.g. using '-b' you get the current boot including suspends.

I have the same config as you. Yesterday, I changed some thing in logind.conf to this, as a result, instead of suddenly suspending, it went to halt state

IdleAction=halt
IdleActionSec=30min

There's something wrong with logind????

Offline

#6 2014-08-29 01:14:07

rebootl
Member
Registered: 2012-01-10
Posts: 431
Website

Re: Computer suddenly suspend while using

Do you use a desktop environment ?

I tried this setting last week and was quite disappointed to find out that you need a desktop environment (that supports this feature) for this to work properly... sad

'man logind.conf':

       IdleAction=
           Configures the action to take when the system is idle. Takes
           one of "ignore", "poweroff", "reboot", "halt", "kexec",
           "suspend", "hibernate", "hybrid-sleep", and "lock". Defaults to
           "ignore".

           Note that this requires that user sessions correctly report the
           idle status to the system. The system will execute the action
           after all sessions report that they are idle, no idle inhibitor
           lock is active, and subsequently, the time configured with
           IdleActionSec= (see below) has expired.

https://www.libreoffice.org/bugzilla/sh … i?id=77671
http://www.freedesktop.org/wiki/Softwar … ironments/

To disable it comment the entries out (using '#').
Edit: I think you need to restart systemd-logind (this may kill your X session) or then reboot, to make it effective.

Last edited by rebootl (2014-08-29 01:29:34)


Personal website: reboot.li
GitHub: github.com/rebootl

Offline

#7 2014-08-29 06:43:30

Carfax
Member
Registered: 2013-10-30
Posts: 30

Re: Computer suddenly suspend while using

In my case they are already commented out. And i didn't tamper with the logind.conf

#IdleAction=ignore
#IdleActionSec=30min

Offline

#8 2014-09-03 00:16:37

SuperBo
Member
Registered: 2012-02-20
Posts: 45

Re: Computer suddenly suspend while using

rebootl wrote:

Do you use a desktop environment ?

I tried this setting last week and was quite disappointed to find out that you need a desktop environment (that supports this feature) for this to work properly... sad



https://www.libreoffice.org/bugzilla/sh … i?id=77671
http://www.freedesktop.org/wiki/Softwar … ironments/

To disable it comment the entries out (using '#').
Edit: I think you need to restart systemd-logind (this may kill your X session) or then reboot, to make it effective.

I'm using awesome wm @@

Offline

#9 2014-09-03 11:11:52

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: Computer suddenly suspend while using

rebootl wrote:

Do you use a desktop environment ?

I tried this setting last week and was quite disappointed to find out that you need a desktop environment (that supports this feature) for this to work properly... sad

The behaviour you want to see is that the computer shuts down or goes to suspend after a certain time without user input right?
You do not need a desktop environment to get that feature, similar results can be achieved using xautolock instead of systemd.
For example:

xautolock -time 20 -locker "systemctl suspend" -detectsleep

Edit: Should work with awesome wm, too.

Last edited by teateawhy (2014-09-03 11:12:53)

Offline

#10 2014-09-03 16:08:23

rebootl
Member
Registered: 2012-01-10
Posts: 431
Website

Re: Computer suddenly suspend while using

Yes, that's what I'm using as well. I was just disappointed by systemd, cause it offers that many features (logind, session-control aso.), but it's not able to do this w/o a DE. It would be nice if systemd could do it natively, because systemd can do everything wink.

However I noticed that this (xautolock) sometimes doesn't work well, after resumes it sometimes went to sleep again immediately, so you'd need to care about this. Which you may do by the sleep/suspend hooks of systemd disabling and reenabling xautolock before and after the suspend. Edit: Or does the -detectsleep switch care about this, just saw it in your command ? I can research it for myself, I'm just in a rush atm.
Edit: Ok, it seems -detectsleep is for this:

 -detectsleep        : reset timers when awaking from sleep.

That's actually great smile.

Thanks

Last edited by rebootl (2014-09-03 20:03:32)


Personal website: reboot.li
GitHub: github.com/rebootl

Offline

Board footer

Powered by FluxBB