You are not logged in.
Pages: 1
Recently, when I'm using my computer, it suddenly suspend.
How can i check log to know what happened to my computer?
Offline
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
$ 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
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
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
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...
'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
In my case they are already commented out. And i didn't tamper with the logind.conf
#IdleAction=ignore
#IdleActionSec=30min
Offline
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...
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
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...
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
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 .
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 .
Thanks
Last edited by rebootl (2014-09-03 20:03:32)
Personal website: reboot.li
GitHub: github.com/rebootl
Offline
Pages: 1