You are not logged in.

#1 2014-03-17 17:56:24

chetjan
Member
Registered: 2012-07-30
Posts: 17

[SOLVED] System Sleep During Boot / Cannot Boot

I am having a problem where the system seems to go to sleep during boot. I'll try and give an overview of what led up to it, and how I have tried debugging, but I must admit I am not an expert so any debugging suggestions would be appreciated.

It started after I installed ntp. As soon as I executed

systemctl enable ntpd.service

The system turned off. I believe it entered sleep as I am 70% sure that the sleep light was on, and pressing the power button would not start the machine (I believe I had to reset the power for the boot to start). Then booting crashed a short time after a screen solution adjustment I believe. After some searching, I added debug to the boot line (replacing quite). Unfortunately it boots displaying at a reasonable rate, clears the screen, then a bunch of text comes up very quickly, then gets cleared again a briefly flashes some lines indicating it is going to sleep. I tried filming the process, and below is the frame before clearing the screen to say it is going to sleep.

Full Screen

Then I tried booting of a flash drive with the arch linux install medium, chrooting and everything works as it used to. I then disable the ntp by issueing

systemctl disable ntpd.service

Then rebooted and it was still not booting successfully. To get a better look I tried filming the lower left corner to see what was causing the issue. The strange thing was that it seems the ntp deamon was still starting. Edit: this has been resolved, but has not fixed the problem.
Corner

A couple of other notes:
1. Pressing scroll lock does not seem to pause the boot
2. I cannot find a boot log after booting on a flash drive.
3. After a "boot", pressing the power button will not turn on the system (sometime it seems to try for a second and then fail). I need to kill the power and then boot fresh.

I would appreciate any other hints or ideas on how to solve this smile. Let me know if there is any other info that might be helpful.

Edit: Images changed to thumbnails. Click for full size.
Edit2: Added some more images of another boot lower corner
978497869793
Also, I got a picture of what pops up when pressing the power button now to wake from "sleep"
4ik4P1rt.png

Last edited by chetjan (2014-03-24 14:21:38)

Offline

#2 2014-03-17 18:08:07

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] System Sleep During Boot / Cannot Boot

Please post just the thumbnails instead of huuuuge photos https://wiki.archlinux.org/index.php/Fo … s_and_Code

Offline

#3 2014-03-17 18:34:12

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

Re: [SOLVED] System Sleep During Boot / Cannot Boot

systemd puts links into respective directories under /etc/systemd/system/ to control wether a unit is enabled/disabled.

The link for ntpd.service is put under /etc/systemd/system/multi-user.target.wants/ (by default).

You could navigate there, using the changeroot, to see wether it's still there. You can manually remove/add links/files there. Additionally you could check where /etc/systemd/system/default.target is linking (use "ls -l").

Last edited by rebootl (2014-03-17 18:36:50)


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

Offline

#4 2014-03-17 18:37:57

chetjan
Member
Registered: 2012-07-30
Posts: 17

Re: [SOLVED] System Sleep During Boot / Cannot Boot

I forgot to mention that I tried to move the ntpd.service from /etc/systemd/system/multi-user.target.wants/ to my home folder and rebooting but that did not help. (Then I moved it back and tried using the systemctl disable). I'll double check to see if it is still there and what default.target is linking and update this post with the results.

Update: It seems that I did not correctly disable ntpd.service (forgot to elevate privilege?), but correctly disabling ntpd.service did not fix my problem, only removed the ntp starting from the log. I do not have a default.target file.

Last edited by chetjan (2014-03-17 19:23:06)

Offline

#5 2014-03-17 20:05:58

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

Re: [SOLVED] System Sleep During Boot / Cannot Boot

Do you have one under /usr/lib/systemd/system/ ?
Where is it pointing ? "ls -l /usr/lib/systemd/system/default.target"


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

Offline

#6 2014-03-17 20:16:09

chetjan
Member
Registered: 2012-07-30
Posts: 17

Re: [SOLVED] System Sleep During Boot / Cannot Boot

I do! It points to graphical.target. I can post the contents if that would be helpful?

Offline

#7 2014-03-17 20:27:41

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

Re: [SOLVED] System Sleep During Boot / Cannot Boot

It's weird, something got messed up... I suspected that something is pulling the suspend.target. You could check the contents of the /etc/systemd/system/ * .target.wants directories for "things that don't belong there" but I'm only guessing. I don't know if there's a "magical" command that shows a dependency tree of units/targets, would be useful though...


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

Offline

#8 2014-03-17 20:48:40

chetjan
Member
Registered: 2012-07-30
Posts: 17

Re: [SOLVED] System Sleep During Boot / Cannot Boot

I found something that could graph the dependencies systemd-analyze (systemd-analyze is provided with the systemd package I believe), so I'll try that when I get back to the office tomorrow and update. Hopefully I can find something pointing to suspend, though I'm not entirely sure how that could have happened.

Offline

#9 2014-03-17 21:04:09

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

Re: [SOLVED] System Sleep During Boot / Cannot Boot

Temporarly you could disable graphical.target and use multi-user.target instead, by issuing

ln -s /usr/lib/systemd/system/multi-user.target /etc/systemd/system/default.target

(w/ sudo or as root in the chroot)
Then reboot to see if it helps. If it does you would know that it has something to do w/ graphical.target or one of the services-->"programs" that get's called by it (which are under /etc/systemd/system/graphical.target.wants, that's how it looks in the log you posted). Then investigate there further.

Ah, yes systemd-analyze. However I think it's more for time optimization. I was thinking of something where I could enter let's say graphical.target and then I get a graph of everything that's pulled like in "man bootup"...

Good luck

Last edited by rebootl (2014-03-17 21:04:32)


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

Offline

#10 2014-03-19 15:24:23

chetjan
Member
Registered: 2012-07-30
Posts: 17

Re: [SOLVED] System Sleep During Boot / Cannot Boot

I tried symlinking as suggested and while it removes the graphical target from coming up during boot it unfortunately did not fix the problem. I took a couple more pictures which may be helpful:
Vertical end of log: uXg1fuLt.png Horizontal for full line view: ZFSdjsXt.png Just before (Difficult to read): MyAlbuut.png

I tried to look for what could be calling suspend / sleep and it seems nothing does. I don't see anything that leads to a suspend. Here are the following grep results, maybe I missed something.

$grep -r 'suspend\|sleep' /usr/lib/systemd/system/*
/usr/lib/systemd/system/hybrid-sleep.target:BindsTo=systemd-hybrid-sleep.service
/usr/lib/systemd/system/hybrid-sleep.target:After=systemd-hybrid-sleep.service
/usr/lib/systemd/system/netctl-sleep.service:Description=netctl sleep hook
/usr/lib/systemd/system/netctl-sleep.service:Before=sleep.target
/usr/lib/systemd/system/netctl-sleep.service:WantedBy=sleep.target
/usr/lib/systemd/system/suspend.target:BindsTo=systemd-suspend.service
/usr/lib/systemd/system/suspend.target:After=systemd-suspend.service
/usr/lib/systemd/system/systemd-hibernate.service:Documentation=man:systemd-suspend.service(8)
/usr/lib/systemd/system/systemd-hibernate.service:Requires=sleep.target
/usr/lib/systemd/system/systemd-hibernate.service:After=sleep.target
/usr/lib/systemd/system/systemd-hibernate.service:ExecStart=/usr/lib/systemd/systemd-sleep hibernate
/usr/lib/systemd/system/systemd-hybrid-sleep.service:Documentation=man:systemd-suspend.service(8)
/usr/lib/systemd/system/systemd-hybrid-sleep.service:Requires=sleep.target
/usr/lib/systemd/system/systemd-hybrid-sleep.service:After=sleep.target
/usr/lib/systemd/system/systemd-hybrid-sleep.service:ExecStart=/usr/lib/systemd/systemd-sleep hybrid-sleep
/usr/lib/systemd/system/systemd-suspend.service:Documentation=man:systemd-suspend.service(8)
/usr/lib/systemd/system/systemd-suspend.service:Requires=sleep.target
/usr/lib/systemd/system/systemd-suspend.service:After=sleep.target
/usr/lib/systemd/system/systemd-suspend.service:ExecStart=/usr/lib/systemd/systemd-sleep suspend
$grep -r 'suspend\|sleep' /etc/systemd/system/*
Returns nothing.
$grep -r 'suspend\|sleep' /etc/systemd/*
/etc/systemd/logind.conf:#HandleSuspendKey=suspend
/etc/systemd/logind.conf:#HandleLidSwitch=suspend

Last edited by chetjan (2014-03-19 15:37:55)

Offline

#11 2014-03-19 16:06:04

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

Re: [SOLVED] System Sleep During Boot / Cannot Boot

Ok, then maybe try the rescue.target. I remembered that you can set the target also by adding the appropriate kernel option to your boot loader command line, see: https://wiki.archlinux.org/index.php/sy … _boot_into

Good idea w/ the grepping.

Maybe also try to set the two options you found in logind.conf to ignore. They're defaulting to suspend. Uncomment them by removing the #. Like

HandleSuspendKey=ignore
HandleLidSwitch=ignore

. Could one of the switches be physically blocked? It's somewhat ridiculous but it's the only idea I have. I really don't know what's going on... Edit: It doesn't really make sense since it's working, when booting from the flash drive...

Last edited by rebootl (2014-03-19 16:12:31)


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

Offline

#12 2014-03-21 14:52:56

chetjan
Member
Registered: 2012-07-30
Posts: 17

Re: [SOLVED] System Sleep During Boot / Cannot Boot

Resuce.target does work, and I can boot and login as root. I have still not been able to find what ends up calling sleep. Unfortunatey changing the logind.conf did not help anything. I think I'll wipe the system and start fresh unless someone else has some suggestions.

The only other thing I can think of trying is doing a diff on my systemd files and someone elses who is working. I'll try and see if I can get them from a collegue, but I don't think it will end up helping.

Offline

#13 2014-03-21 15:38:57

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

Re: [SOLVED] System Sleep During Boot / Cannot Boot

You said it started after you installed ntpd, at that time something else got updated ?
If yes you could try to downgrade.

Are you using laptop-mode-tools ?
If yes disable it.

It seems there's a similar problem on Acer Aspire One machines https://bbs.archlinux.org/viewtopic.php?id=178047, but I'm not sure it's connected.


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

Offline

#14 2014-03-24 14:20:33

chetjan
Member
Registered: 2012-07-30
Posts: 17

Re: [SOLVED] System Sleep During Boot / Cannot Boot

Thank you for all the help, I have managed to resolve my issue smile. After suggesting downgrading, I uninstalled ntp, rebooted and it worked. Then I even tried reinstalling it, enabling the service and everything works how it should. Still incredibly confused why it was broken, but at least it's working. Thanks again for all the help.

Last edited by chetjan (2014-03-24 14:21:57)

Offline

Board footer

Powered by FluxBB