You are not logged in.
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
A similar thread https://bbs.archlinux.org/viewtopic.php?id=98416 but offers no solutions or explanations.
Offline
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
I don't alias my shutdown. I crafted my bashrc myself. Also, init actually says that it's switching to runlevel 0.
Offline
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
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
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
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
Try using this command:
sudo shutdown -hP 0
I had the same problem until i added the capital P; Shutdowns fine now.
Offline
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
(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
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
guess this is officially a dead topic... oh well...
Help grow the dev population... have your tech trained and certified!
Offline
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
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
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
https://bbs.archlinux.org/viewtopic.php?id=115489
I have this problem when I run on battery
Offline
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
try
shutdown -hP now
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
inxsible: been there, done that... Problem persists for me...
Help grow the dev population... have your tech trained and certified!
Offline
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
No one has mentioned if they have plymouth/slim (see second post)?
Offline
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
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
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
I use plymouth, and there is a fix that is mentioned in ArchWiki's plymouth page for this issue (if you're using plymouth )...
Help grow the dev population... have your tech trained and certified!
Offline