LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-08-2021, 04:14 AM   #1
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

Rep: Reputation: 46
Debugging resume?


I have Debian 9 on a desktop, and my problem is resuming from suspend or hibernate.
It sounds like the machine does wake up, but only to do reboot.

I wonder if there are logs or something that could show me what's wrong.

The sleep/resume used to work (pm-utils), but I think it stopped working when Debian started using systemd. (Not sure about that, though.)
 
Old 05-08-2021, 05:49 AM   #2
obobskivich
Member
 
Registered: Jun 2020
Posts: 300

Rep: Reputation: Disabled
Does dmesg have anything relevant? (as in, if you look in dmesg, does it have a wall of obvious errors because life is easy sometimes?)

Under systemd the 'suspend' is handled by systemd-suspend.service, you can read more about it here: https://www.man7.org/linux/man-pages...service.8.html It may give you some useful things to look for in dmesg or other logs; you can check the status of the targets with systemctl:

Code:
systemctl status suspend.target
or
Code:
systemctl status systemd-suspend.service

Tangential thoughts: this may be indication of a hardware problem with the machine itself. I've seen machines with bad power supplies get stuck in 'reboot loops' like this before, and it is a pain to test it out in software. From experience, if you cannot (easily) find an obvious software explanation, I'd scrutinize the PSU before going down any in-depth software troubleshooting (to potentially save yourself a lot of hassle).

Super hacky/easy way to test: Can you disconnect the Debian 9 disk from the system (physically), and try booting a live image of some up-to-date distro (lets just say Ubuntu 20.04 for ease of example) and see if that will suspend, reboot, etc properly? If everything works when your current Debian 9 install is 'out' then you know the problem is somewhere in your install - if it still has issues then I'd go after the hardware itself, BIOS settings, etc
 
1 members found this post helpful.
Old 05-08-2021, 07:17 AM   #3
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

Original Poster
Rep: Reputation: 46
Should I worry?

root@jaa-debian:/# find . -name "systemd-sleep.conf" -print
find: ‘./run/user/1000/gvfs’: Permission denied
root@jaa-debian:/# find . -name "sleep.conf" -print
find: ‘./run/user/1000/gvfs’: Permission denied
root@jaa-debian:/# find . -name "sleep.conf.d" -print
find: ‘./run/user/1000/gvfs’: Permission denied
root@jaa-debian:/# systemctl status suspend.target
● suspend.target - Suspend
Loaded: loaded (/lib/systemd/system/suspend.target; static; vendor preset: enabled)
Active: inactive (dead)
Docs: man:systemd.special(7)
root@jaa-debian:/# systemctl status systemd-suspend.service
● systemd-suspend.service - Suspend
Loaded: loaded (/lib/systemd/system/systemd-suspend.service; static; vendor preset: enabled)
Active: inactive (dead)
Docs: man:systemd-suspend.service(8)
root@jaa-debian

root@jaa-debian:/var/log# grep suspend *
grep: apt: Is a directory
grep: cups: Is a directory
grep: exim4: Is a directory
grep: firebird: Is a directory
grep: fsck: Is a directory
grep: gdm3: Is a directory
grep: hp: Is a directory
grep: installer: Is a directory
grep: ntpstats: Is a directory
popularity-contest.new:1620432000 1568635200 systemd /lib/systemd/system/systemd-suspend.service
grep: samba: Is a directory
grep: speech-dispatcher: Is a directory
grep: unattended-upgrades: Is a directory
root@jaa-debian:/var/log#
 
Old 05-08-2021, 07:28 AM   #4
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

Original Poster
Rep: Reputation: 46
I tried to suspend less than an hour ago.
 
Old 05-09-2021, 08:25 AM   #5
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

Original Poster
Rep: Reputation: 46
Quote:
Originally Posted by obobskivich View Post
Tangential thoughts: this may be indication of a hardware problem with the machine itself. I've seen machines with bad power supplies get stuck in 'reboot loops' like this before, and it is a pain to test it out in software. From experience, if you cannot (easily) find an obvious software explanation, I'd scrutinize the PSU before going down any in-depth software troubleshooting (to potentially save yourself a lot of hassle).

Super hacky/easy way to test: Can you disconnect the Debian 9 disk from the system (physically), and try booting a live image of some up-to-date distro (lets just say Ubuntu 20.04 for ease of example) and see if that will suspend, reboot, etc properly? If everything works when your current Debian 9 install is 'out' then you know the problem is somewhere in your install - if it still has issues then I'd go after the hardware itself, BIOS settings, etc
Like I mentioned, it did work earlier using pm-utils.

Do you think disconnecting the HD is necessary for testing suspend with Ubuntu live? With the existing swap partition, I could test the hibernation too? The machine has 4G of RAM and 16G swap partition.
 
Old 05-09-2021, 05:37 PM   #6
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

Original Poster
Rep: Reputation: 46
Hmm, I switched tke PSU off to change the CMOS battery, and when I turned the PSU on again, nothing happened.
This way or that way. I have to get a new PSU.
 
Old 05-10-2021, 02:56 AM   #7
obobskivich
Member
 
Registered: Jun 2020
Posts: 300

Rep: Reputation: Disabled
Quote:
Originally Posted by turboscrew View Post
Hmm, I switched tke PSU off to change the CMOS battery, and when I turned the PSU on again, nothing happened.
This way or that way. I have to get a new PSU.
You mean even with the AC switch 'on' on the PSU, the machine now won't start? That doesn't bode well for the PSU being in tip-top shape - see how it does after swapping for a known-good PSU.
 
1 members found this post helpful.
Old 05-10-2021, 11:45 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 17,264
Blog Entries: 10

Rep: Reputation: 5161Reputation: 5161Reputation: 5161Reputation: 5161Reputation: 5161Reputation: 5161Reputation: 5161Reputation: 5161Reputation: 5161Reputation: 5161Reputation: 5161
Quote:
Originally Posted by turboscrew View Post
Should I worry?
Nothing to worry about in those messages.

Quote:
Originally Posted by turboscrew View Post
I wonder if there are logs or something that could show me what's wrong.
What's been pointed out already, plus
Code:
journalctl
If I understand the man page corrctly,
Code:
journalctl -b -1
should show all log entries from the last boot and the current one, which would be necessary to fully troubleshoot a resume-resulting-in-reboot problem.
It's a lot; don't panic. First of all, figure out the timestamps and which period you're interested in.
 
1 members found this post helpful.
Old 05-11-2021, 12:44 PM   #9
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

Original Poster
Rep: Reputation: 46
Quote:
Originally Posted by obobskivich View Post
You mean even with the AC switch 'on' on the PSU, the machine now won't start? That doesn't bode well for the PSU being in tip-top shape - see how it does after swapping for a known-good PSU.
I turned the power switch of the PSU off before I changed the battery. When I turned the PSU back on, I guess it "blew".
There was a fuse inside the PSU, but it was soldered - no holders.

With another PSU, sleep started working just fine.
 
Old 05-11-2021, 12:47 PM   #10
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

Original Poster
Rep: Reputation: 46
Quote:
Originally Posted by ondoho View Post
Nothing to worry about in those messages.


What's been pointed out already, plus
Code:
journalctl
If I understand the man page corrctly,
Code:
journalctl -b -1
should show all log entries from the last boot and the current one, which would be necessary to fully troubleshoot a resume-resulting-in-reboot problem.
It's a lot; don't panic. First of all, figure out the timestamps and which period you're interested in.
Thanks. The problem got solved, but who knows when I need to wrestle with the sleeping next time.
I have several computers, and they are not all bought "yesterday".
 
Old 05-11-2021, 02:17 PM   #11
obobskivich
Member
 
Registered: Jun 2020
Posts: 300

Rep: Reputation: Disabled
Quote:
Originally Posted by turboscrew View Post
I turned the power switch of the PSU off before I changed the battery. When I turned the PSU back on, I guess it "blew".
There was a fuse inside the PSU, but it was soldered - no holders.

With another PSU, sleep started working just fine.
Glad it got sorted, and this is one of those cases where I hate to be right - when PSUs go bad they can go really bad. Glad nothing (except the PSU) was damaged here.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
resume: could not stat the resume device file Zaskar Debian 17 03-29-2012 10:10 PM
resume: cannot stat resume device file sixerjman Linux - Kernel 0 05-27-2007 03:09 PM
Difference between kernel - debugging and application debugging topworld Linux - Software 2 03-30-2006 12:50 AM
Visual Debugging and Linux Kernel Debugging Igor007 Programming 0 09-30-2005 10:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration