The officially official Devuan Forum!

You are not logged in.

#1 2018-12-29 14:44:07

guuml.dev1
Member
Registered: 2018-12-09
Posts: 21  

shutdown does not poweroff nor restart

Sitting at a laptop with devuan/jessie both shutdown -h now nor shutdown -r now as root doesn't poweroff the "halted" system nor "restart". The system is just "going down for shutdown", shows the appropriate messages and stops working, but hardware is still running. I have to press the power key additionally long enough to switch off power, and press again for reboot. According to an answer to an old question elsewhere (see
How to make XFCE show the Shutdown Menu?) I have found:

Short solution: Make sure that xfce4-session[1] and upower[2] are installed, and ...

[1] Package: xfce4-session 4.10.1-10+devuan1 comes right out of the box

[2]  but

apt install upower
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
Die folgenden zusätzlichen Pakete werden installiert:
  ethtool hdparm libimobiledevice4 libplist2 libpolkit-agent-1-0
  libpolkit-backend-1-0 libupower-glib1 libusbmuxd2 libx86-1 pm-utils
  policykit-1 powermgmt-base usbmuxd vbetool
Vorgeschlagene Pakete:
  apmd libusbmuxd-tools cpufrequtils wireless-tools radeontool
Die folgenden NEUEN Pakete werden installiert:
  ethtool hdparm libimobiledevice4 libplist2 libpolkit-agent-1-0
  libpolkit-backend-1-0 libupower-glib1 libusbmuxd2 libx86-1 pm-utils
  policykit-1 powermgmt-base upower usbmuxd vbetool
0 aktualisiert, 15 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
 ... (snipped)
usbmuxd (1.0.8+git20140527.e72f2f7-2) wird eingerichtet ...
Warnung: Auf das von Ihnen angegebene Home-Verzeichnis /var/lib/usbmux kann nicht zugegriffen werden: Datei oder Verzeichnis nicht gefunden
Lege Systembenutzer »usbmux« (UID 103) an ...
Lege neuen Benutzer »usbmux« (UID 103) mit Gruppe »plugdev« an ...
Erstelle Home-Verzeichnis »/var/lib/usbmux« nicht.

It's somewhat obvious that I have missed the point, the problem still persists: As root of my laptop there should be a way to poweroff or reboot via command line.

Please help me with some glue (links to further reading are ok).


guuml is an abbrevation for gü in ASCII (1967),
focused on devuan and skipping epic poems like beowulf.
Has Gü spent his last raw DVD to a chimäre? No.

Offline

#2 2018-12-29 15:42:47

msi
Member
Registered: 2017-02-04
Posts: 143  

Re: shutdown does not poweroff nor restart

guuml.dev1 wrote:

Please help me with some glue (links to further reading are ok).

Ok, reading man shutdown may help.

On a side note: If you post command output, it should better be in English. Putting LANG=C infront of a command will achieve that (on a per-command basis).

Offline

#3 2018-12-29 17:11:26

chris2be8
Member
Registered: 2018-08-11
Posts: 307  

Re: shutdown does not poweroff nor restart

How long did you wait before pressing the power button? I've heard of delays of a few minutes during shutdown, could that be happening here? That's a fairly easy thing to test.

Look in the BIOS to see if there are any options that might affect shutdown processing (or support for different OSes).

What make and model is your laptop? Search for reported problems with that make and model (and BIOS version).

Look in syslog etc to see if any interesting messages are there.

Chris

Online

#4 2018-12-29 23:34:00

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,251  

Re: shutdown does not poweroff nor restart

Do you have live-tools installed?
If so, you should disable /bin/live-medium-eject, e.g by renaming it to /bin/live-medium-ejectOFF.

Basically, live-tools inserts a next-to-final step in the shutdown sequence that by default will want to eject the live medium, and then wait indefinitely for user confirmation. That step has many failure cases that simply end in silently waiting indefinitely (before allowing halt to happen), and yet it's not a needed step at all. You might even want to patch it more elegantly, i.e., exclude it from the shutdown and reboot sequences, if this seems to fix your problem.

Offline

#5 2019-01-05 00:25:58

guuml.dev1
Member
Registered: 2018-12-09
Posts: 21  

Re: shutdown does not poweroff nor restart

Thank you for the answers and a happy new year for all!

The first glue I've got is to explain the question more briefly: I'm talking about a minimalistic devuan/jessie+xfce on an acer travelmate 2410. In mai 2017 it was straightforward to place the system in /dev/sda3 (20GB) with LANG=de_DE.UTF-8. As times goes by the debian/jessie-derived system on /dev/sda1 (20GB, too) has to be replaced with devuan/ascii+mate as soon as possible. There are two independent problems that I'm trying to understand:

  • (Problem #1): No xfce-user with UID>=1000 is able to halt, restart, hibernate or standby the machine without xfce4-session and upower, the last is introducing 14 more packages. (problem #1 solved by questioning problem #2 ;-)

  • (Problem #2): After the lines "system halted" or "system will restart" nothing more happens! The only thing remaining is press the power button long enough until the machine powers off.

On the second approach I want to reply to each provided answer:

1. bring the system down

Although I'm not a native speaker of english I am aware of reading LANG=C man shutdown, I am able to create an /etc/shutdown.allow for myself, and there are no obvious flaws in /etcinittab for me. The problem just still persists.

2. BIOS and syslog

In response to chris2be8:

How long did you wait before pressing the power button? ...

The system writes "halted" or "restart" and stops working afterwards. Then I have to press the power button long enough for powering the machine off. And later then I have to press the button again to restart again.

Look in the BIOS to see if there are any options that might affect shutdown processing ...

It's hard to believe that's the case: Since 2014 this machine runs "linuxmint debian edition MATE" and does poweroff/reboot/hibernate with sysV init as expected. This problem looks like a difference between debian/jessie (with linuxmint additions?) and devuan/jessie.

Look in syslog etc to see if any interesting messages are there.

Nice point, but which pattern I should grep in /var/log/*?

3. live-tools

ralph.ronnquist wrote:

Basically, live-tools inserts a next-to-final step in the shutdown sequence ...

Yup, there may be missings links in ls -l /etc/rc{0,6}.d/* ... at least in devuan/jessie.

Conclusion

Thanks for your suggestions and updating my knowledge about sysvinit. Up to now this problem is not solved in the oldstable jessie, but there is a good chance the problem does not exists in stable ascii.


guuml is an abbrevation for gü in ASCII (1967),
focused on devuan and skipping epic poems like beowulf.
Has Gü spent his last raw DVD to a chimäre? No.

Offline

#6 2019-01-12 16:01:46

guuml.dev1
Member
Registered: 2018-12-09
Posts: 21  

Re: shutdown does not poweroff nor restart

Thanks for the hint to

ralph.ronnquist wrote:

... the next-to-final step in the shutdown sequence ...

On my system I have found something interesting about differences in /sbin/halt between devuan/jessie and the debian/jessie system used by the LMDE2 (Linuxmint Debian Edition called "betsy"). Some details just for the records:

  • The minimalistic devuan/jessie uses /etc/rc0.d/K09halt or /etc/rc6.d/K09reboot

  • Installing live-tools move this scripts to /etc/rc0.d/K10halt and /etc/rc6.d/K10reboot. BTW: the /etc/rc?.d/K09live-tools are used for /bin/live-medium-eject.

  • The LMDE2 uses /etc/rc0.d/K12halt and /etc/rc6.d/K12reboot instead. And the system does poweroff or reboot as requested!

Due ro my special configuration I can do: (Note: /srv/mnt/hda1/ is mount point for the LMDE2 partition, and /srv/mnt/hda3/ is just a symlink to the current devuan root partition)

  • $ LANG=C diff -s /srv/mnt/hda?/etc/init.d/halt 
    Files /srv/mnt/hda1/etc/init.d/halt and /srv/mnt/hda3/etc/init.d/halt are identical

    Looking into /etc/init.d/halt reveals:

    log_action_msg "Will now halt"
    halt -d -f $netdown $poweroff $hddown
  • $ LANG=C diff -s /srv/mnt/hda?/etc/init.d/halt 
    Files /srv/mnt/hda1/etc/init.d/halt and /srv/mnt/hda3/etc/init.d/halt are identical

    Looking into /etc/init.d/reboot reveals:

    log_action_msg "Will now restart"
    halt -d -f -i

Trying some options according to man halt doesn't help but I found:

$ ls -lgG /srv/mnt/hda?/sbin/halt
-rwxr-xr-x 1 13820 Apr  6  2015 /srv/mnt/hda1/sbin/halt
-rwxr-xr-x 1 13820 Mai 29  2015 /srv/mnt/hda3/sbin/halt

Ok, the devuan /sbin/halt is slightly newer then LMDE2 /sbin/halt. And both are the same size. This is not surprising because devuan/jessie ought to be "compatible" with debian/jessie. But now:

$ LANG=C cmp -l /srv/mnt/hda?/sbin/halt
  409 337 271
((snipped))
  428 362   2

This looks like "recompiling during package building". My /sbin/halt comes from:
Package: sysvinit-core
Version: 2.88dsf-59.2+devuan2
Maintainer: Roger Leigh <rleigh@debian.org>
Homepage: https://git.devuan.org/packages-base/sysvinit

Just for the records: As of this writing I don't how and when this differences between devuan and debian (or lmde?) are introduced. Should I consider this as a "missing feature" of the now oldstable devuan?


guuml is an abbrevation for g&uuml; in ASCII (1967),
focused on devuan and skipping epic poems like beowulf.
Has Gü spent his last raw DVD to a chimäre? No.

Offline

#7 2019-01-24 00:23:18

guuml.dev1
Member
Registered: 2018-12-09
Posts: 21  

Re: shutdown does not poweroff nor restart

According to (sda3)/etc/apt/sources.list this thread is about "Debian Devuan GNU/Linux 1.0 _Jessie_ - Official Release Candidate i386 CD Binary-1 20170504-15:34", a somewhat minimalistic operating system, with entries like:

deb http://auto.mirror.devuan.org/merged/ jessie main contrib non-free
...

Some days ago I've checked "devuan_ascii_2.0.0_i386_desktop-live.iso" from an usb stick: this problem doesn't exist any more. Some hours ago I've placed this on (sda1)/etc/apt/sources.list, and that system can poweroff (at least), reboot (yes) or hibernate (not thoroughly tested) as espected.

deb http://pkgmaster.devuan.org/merged ascii main 
...

Conclusion: this thread is CLOSED.


guuml is an abbrevation for g&uuml; in ASCII (1967),
focused on devuan and skipping epic poems like beowulf.
Has Gü spent his last raw DVD to a chimäre? No.

Offline

Board footer