You are not logged in.

#1 2010-08-03 05:48:53

juanpablo
Member
Registered: 2009-07-11
Posts: 12

Arch reboots instead of shutting down.

Hi, when I tell my computer to shutdown using shutdown -h now, halt or telinit 0 it actually reboots instead of shutting down. Everything was working and I'm not sure what broke it. Dmesg doesn't report anything weird. I'm using the 2.6.34-ARCH kernel. All my other Linux installations shutdown just fine and I can still shut down just fine using sys requests. I'm guessing init is telling the kernel to reboot instead of shutting down. Is there any place where I can configure this?

Thanks!

Last edited by juanpablo (2010-08-03 05:56:50)

Offline

#2 2010-08-03 05:58:39

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

Re: Arch reboots instead of shutting down.

A similar thread https://bbs.archlinux.org/viewtopic.php?id=98416 but offers no solutions or explanations.

Offline

#3 2010-08-03 05:59:19

nXqd
Member
Registered: 2010-07-01
Posts: 173
Website

Re: Arch reboots instead of shutting down.

Do you alias your shutdown in bashrc or zshrc ?
It happens when you copy another people's settings .


When you live for a strong purpose, then hard work isn't an option. It's a necessity. - Steve Pavlina
dotFiles

Offline

#4 2010-08-03 06:02:19

juanpablo
Member
Registered: 2009-07-11
Posts: 12

Re: Arch reboots instead of shutting down.

I don't alias my shutdown. I crafted my bashrc myself. Also, init actually says that it's switching to runlevel 0.

Offline

#5 2010-08-03 06:05:41

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

Re: Arch reboots instead of shutting down.

juanpablo wrote:

I don't alias my shutdown. I crafted my bashrc myself. Also, init actually says that it's switching to runlevel 0.

- Look, up in the sky!
- It's a bird!
- It's a plane!
- It's a boomerang runlevel 0!

I'm really curious about what could have triggered such behavior but unfortunately I've run out of ideas a while ago.

Offline

#6 2010-08-03 06:20:04

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: Arch reboots instead of shutting down.

Perhaps related to this

 $ cat /sys/power/disk 
[platform] test testproc shutdown reboot

Then try

# echo shutdown > /sys/power/disk

Though I don't know if this works only for hibernating.

Last edited by DonVla (2010-08-03 06:22:47)

Offline

#7 2010-08-03 06:27:47

juanpablo
Member
Registered: 2009-07-11
Posts: 12

Re: Arch reboots instead of shutting down.

I think I found the problem. At the end of rc.shutdown there is this code

if [ "$RUNLEVEL" = "0" ]; then

        printsep
        printhl "${C_H2}POWER OFF"
        /sbin/poweroff -d -f -h -i
else
        printsep
        printhl "${C_H2}REBOOTING"
        # if kexec is installed and a kernel is loaded, use it
        [ -x /sbin/kexec ] && /sbin/kexec -e > /dev/null 2>&1
        /sbin/reboot -d -f -i
fi

It turns out I don't have a RUNLEVEL variable set so it always reboots. So I tried

export RUNLEVEL=0 && halt

and voila! the computer shuts down! So does anyone know how can I make init set the RUNLEVEL variable? Do you guys have a RUNLEVEL variable set?

Offline

#8 2011-03-10 12:40:07

scratchy
Member
Registered: 2010-12-07
Posts: 2

Re: Arch reboots instead of shutting down.

Hi. I suspect I have the same issue. I'm using the 2.6.37-ARCH kernel.

I'm unsure what you mean by:

export RUNLEVEL=0 && halt

Do you add that to rc.shutdown?

I look forward to the advice you receive and will also try and implement it. Thanks OP

Offline

#9 2011-03-10 17:57:01

ithil
Member
Registered: 2011-01-06
Posts: 11

Re: Arch reboots instead of shutting down.

Try using this command:

sudo shutdown -hP 0

I had the same problem until i added the capital P; Shutdowns fine now.

Offline

#10 2011-03-11 09:04:28

admiralspark
Member
From: Alaska, USA
Registered: 2011-01-07
Posts: 87

Re: Arch reboots instead of shutting down.

If you call the '/sbin/poweroff -d -f -h -i' command, does it shutdown or reboot? The runlevel variable should be checking itself against the current runlevel, which would be 0 when the system is told to shutdown. That means that somehow it's not able to do so...have you modified /etc/rc.shutdown?
EDIT: Try 'poweroff' straight as well.

Last edited by admiralspark (2011-03-11 09:05:10)


Team Ignition Kernel Developer
linux-ideapad developer/maintainer
Flame Kernel developer for Galaxy Nexus and Galaxy S3
Want a cheap, reliable VPS with AWESOME customer service?

Offline

#11 2011-03-11 15:14:32

scratchy
Member
Registered: 2010-12-07
Posts: 2

Re: Arch reboots instead of shutting down.

(Thanks for your support, help and advice)

None of the above options shut down the laptop, it still reboots.

I get init runlevel 0
I get the power off message.
The monitor switches off but the power light stays on, then the laptop reboots.

I have personally not changed files - I noticed this after an update.

My rc.shutdown file (if this helps)

#!/bin/bash
#
# /etc/rc.shutdown
#

. /etc/rc.conf
. /etc/rc.d/functions

run_hook shutdown_start

# avoid staircase effect
/bin/stty onlcr

echo " "
printhl "Initiating Shutdown..."
echo " "

# avoid NIS hanging syslog-ng on shutdown by unsetting the domainname
[[ -x /bin/domainname ]] && /bin/domainname ""
[[ -x /etc/rc.local.shutdown ]] && /etc/rc.local.shutdown

kill_everything shutdown

stat_busy "Saving Random Seed"
RANDOM_SEED=/var/lib/misc/random-seed
[[ -d ${RANDOM_SEED%/*} ]] || mkdir -p ${RANDOM_SEED%/*}
: > $RANDOM_SEED
/bin/chmod 0600 $RANDOM_SEED
POOL_FILE=/proc/sys/kernel/random/poolsize
if [[ -r $POOL_FILE ]]; then
    read POOL_SIZE <$POOL_FILE
else
    POOL_SIZE=512
fi
/bin/dd if=/dev/urandom of=$RANDOM_SEED count=1 bs=$POOL_SIZE &> /dev/null
stat_done

stat_busy "Saving System Clock"
if [[ $TIMEZONE && -e /usr/share/zoneinfo/$TIMEZONE ]]; then
    /bin/rm -f /etc/localtime
    /bin/cp "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
fi

HWCLOCK_PARAMS="--systohc"
case $HARDWARECLOCK in
    UTC) HWCLOCK_PARAMS="$HWCLOCK_PARAMS --utc";;
    localtime) HWCLOCK_PARAMS="$HWCLOCK_PARAMS --localtime";;
    *) HWCLOCK_PARAMS="";;
esac
[[ $HWCLOCK_PARAMS ]] && /sbin/hwclock $HWCLOCK_PARAMS
stat_done

# removing psmouse module to fix some reboot issues on newer laptops
/sbin/modprobe -r psmouse >/dev/null 2>&1

# Write to wtmp file before unmounting
/sbin/halt -w

stat_busy "Deactivating Swap"
/sbin/swapoff -a
stat_done

# stop monitoring of lvm2 groups before unmounting filesystems
if [[ $USELVM =~ yes|YES && -x /sbin/lvm && -d /sys/block ]]; then
    stat_busy "Deactivating monitoring of LVM2 groups"
    /sbin/vgchange --monitor n >/dev/null 2>&1
    stat_done
fi

stat_busy "Unmounting Filesystems"
/bin/umount -a -r -t noramfs,notmpfs,nosysfs,noproc,nodevtmpfs -O no_netdev
stat_done

# Kill non-root encrypted partition mappings
if [[ -f /etc/crypttab && $CS ]]; then
    stat_busy "Deactivating encrypted volumes:"
    do_lock() {
            stat_append "${1}.."
            if $CS remove "$1" >/dev/null 2>&1; then
                stat_append "ok "
        else
                stat_append "failed "
        fi
        }
        read_crypttab do_lock
    stat_done
fi

if [[ $USELVM =~ yes|YES && -x /sbin/lvm && -d /sys/block ]]; then
    stat_busy "Deactivating LVM2 groups"
    /sbin/vgchange --sysinit -a n >/dev/null 2>&1
    stat_done
fi

stat_busy "Remounting Root Filesystem Read-only"
/bin/mount -n -o remount,ro /
stat_done

run_hook shutdown_poweroff

# Power off or reboot
printsep
if [[ $RUNLEVEL = 0 ]]; then
    printhl "${C_H2}POWER OFF"
    /sbin/poweroff -d -f -h -i
else
    printhl "${C_H2}REBOOTING"
    # if kexec is installed and a kernel is loaded, use it
    [[ -x /sbin/kexec ]] && /sbin/kexec -e > /dev/null 2>&1
    /sbin/reboot -d -f -i
fi

# End of file
# vim: set ts=2 sw=2 noet:
 

Again, thanks for the advice.

Last edited by scratchy (2011-03-11 15:15:08)

Offline

#12 2011-03-13 07:45:47

CPUnltd
Member
From: Milwaukee, WI
Registered: 2009-12-05
Posts: 470
Website

Re: Arch reboots instead of shutting down.

any progress on this topic?  I have been suffering from the same problem for quite some time now and thought it was just me till I found this thread... I am also running on a laptop and the local MLUG group thought it may be a bios issue, but I can't find anything that could look like the culprit within bios.  I have been stumped about this for quite some time and have resorted to taking the battery out before an actual reboot officially initiates...  there has GOT to be an answer to this issue somewhere...


Help grow the dev population... have your tech trained and certified!

Offline

#13 2011-03-24 04:15:37

CPUnltd
Member
From: Milwaukee, WI
Registered: 2009-12-05
Posts: 470
Website

Re: Arch reboots instead of shutting down.

guess this is officially a dead topic... oh well...


Help grow the dev population... have your tech trained and certified!

Offline

#14 2011-04-18 09:24:34

thiemel
Member
Registered: 2011-04-18
Posts: 2

Re: Arch reboots instead of shutting down.

CPUnltd wrote:

guess this is officially a dead topic... oh well...

Hi,
I have the same issue - it is lastest 2.6 KENEL's PROBLEM with ACPI. It is related to "acpi_power_off" kernel call (see http://wifizabreh.net/DSC00724.JPG )
If I run kernel26-lts kernel, PC shutdowns normally.

I have ASUS's "slim PC" with nVidia's ION (MCP79) - "Pegatron tower L6 ION"

If you disable ACPI during boot (kernel boot parameter "acpi=off") PC should shutdown correctly even with the latest kernel.

Offline

#15 2011-04-18 14:19:45

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,059

Re: Arch reboots instead of shutting down.

I have seen this issue on my desktop as well, but its random. 1 in 3 shutdown commands will restart the machine for me. So I am not sure what to do other than to keep an eye on this thread sad


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#16 2011-04-18 14:28:26

ehlo
Member
From: England
Registered: 2010-04-04
Posts: 65

Re: Arch reboots instead of shutting down.

https://bbs.archlinux.org/viewtopic.php?id=115489

I have this problem when I run on battery

Offline

#17 2011-04-19 19:48:02

ReaphSharc
Member
From: the Netherlands
Registered: 2007-11-05
Posts: 138
Website

Re: Arch reboots instead of shutting down.

Same problem here, I hit 'shutdown' and my box reboots. Very annoying. Wondering what is causing it and how to solve it. Or is it an upstream issue?


Do you want a Bubble Icon? Feel free to submit your requests or personal creations to be included in future releases.
I'm 100% Linux!

Offline

#18 2011-04-19 20:51:17

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,059

Re: Arch reboots instead of shutting down.

try

shutdown -hP now

Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#19 2011-04-20 01:43:18

CPUnltd
Member
From: Milwaukee, WI
Registered: 2009-12-05
Posts: 470
Website

Re: Arch reboots instead of shutting down.

inxsible: been there, done that... Problem persists for me...


Help grow the dev population... have your tech trained and certified!

Offline

#20 2011-04-23 05:45:52

zuargo
Member
From: Concepción, Chile
Registered: 2009-08-20
Posts: 116

Re: Arch reboots instead of shutting down.

Same problem here.

When I run:

$ sudo shutdown -h now

from KDE, the system is not power off, instead, is restarting.

Trying from Lancelot > Exit > Exit, I have the same behaviour

Only by exiting of the X server and running shutdown command, in the previous same way, I can power off the computer.

Last edited by zuargo (2011-04-23 05:49:57)

Offline

#21 2011-04-24 03:39:15

fphillips
Member
From: Austin, TX
Registered: 2009-01-24
Posts: 201

Re: Arch reboots instead of shutting down.

No one has mentioned if they have plymouth/slim (see second post)?

Offline

#22 2011-04-24 03:54:23

Novartum
Member
From: Sweden
Registered: 2011-02-03
Posts: 33

Re: Arch reboots instead of shutting down.

I am experiencing the same issue.  I first noticed ~2 months ago, when it happened a few times intermittently.  It did not persist, however, and I thought the issue was resolved with some update.

Recently the problem has resurfaced.  I am on a laptop, and it seems to only happen when I am on battery wireless.  It has happened the past three times I tried, but did not when I plugged in laptop...

@fphillips - don't use plymouth/SLiM; I have had and still experience issues with console-kit though .  I start my X session with "exec ck-launch-session dwm"
ck-list-sessions shows "active = false" though

EDIT: my error sounds identical to xiaq's below me.  When it does reboot, the last message is actually POWER OFF not REBOOTING

Last edited by Novartum (2011-04-24 03:58:16)

Offline

#23 2011-04-24 03:55:04

xiaq
Member
From: somewhere in China...
Registered: 2011-03-06
Posts: 88

Re: Arch reboots instead of shutting down.

Point me out if it's more appropriate to start a new thread.

I have a similar problem. When I do "sudo shutdown -h now", the system sometimes reboots. I can confirm that the last message line is always "POWER OFF" not "REBOOTING". By sometimes I mean a chance of about 40%. It's pretty weird, and I doubt it's related to the acpi kernel module.

Offline

#24 2011-04-24 14:14:42

zuargo
Member
From: Concepción, Chile
Registered: 2009-08-20
Posts: 116

Re: Arch reboots instead of shutting down.

fphillips wrote:

No one has mentioned if they have plymouth/slim (see second post)?

I don't use plymouth or slim.

But I start x server by running xinit.

my .xinitrc file:

exec ck-launch-session startkde

I have noticed, many people who has this problem in some way they have manipulated .xinitrc file or start graphical server with some "trick"

Last edited by zuargo (2011-04-24 14:19:27)

Offline

#25 2011-05-23 06:20:30

CPUnltd
Member
From: Milwaukee, WI
Registered: 2009-12-05
Posts: 470
Website

Re: Arch reboots instead of shutting down.

I use plymouth, and there is a fix that is mentioned in ArchWiki's plymouth page for this issue (if you're using plymouth tongue)...


Help grow the dev population... have your tech trained and certified!

Offline

Board footer

Powered by FluxBB