Skip to contentSkip to conversation

RPi model B - bluetooth-next kernel, shutdown always reboots the RPi

DISCUSSION Christoffer Holmstedt 3 participants 7 messages Jun 4, 2015 – Jun 9, 2015 IEEE 802.15.4

lore
Share & tools
lore
#0 lore raw

I know some of you are using the RPi as well so I start by asking here, perhaps linux-rpi-kernel list is the next step. When I run "shutdown -h 0" the RPi turns off but in a few seconds U-Boot starts again and boots linux, so I can't turn it off from software. The only solution is to pull the plug, which will eventually corrupt the SD card so that is not a good long-term solution.

Others have had simliar problems with kernels 3.8 - 3.12 but back then it was something about activity on some GPIO (e.g. SCL) could trigger boot. This is not the case now as my problem exists both with the Openlabs board connected and disconnected.

There are a lot of moving parts here, during shutdown Raspbian with 4.1.0-rcX kernel doesn't set proper registers perhaps or U-Boot is missing some configuration so I'm not sure how to debug this issue. Installing a fresh raspbian installation on the SD card with 3.18 kernel "shutdown -h 0" works just fine. As soon as I "install" U-Boot and the blutooth-next kernel it stops working.

Any pointers to a solution, debug steps or even a tutorial on how the shutdown/boot-up process works is appreciated, because I'm totally lost on this one.

Regards

Signature · 1 line
Christoffer Holmstedt
maintainer
#1 lore raw
Quoted 2 lines · Christoffer Holmstedt

I know some of you are using the RPi as well so I start by asking here, perhaps linux-rpi-kernel list is the next step. When I run "shutdown -h 0" the RPi

Maybe try "halt"? "halt" should shutdown your RPi, means unmounting filesystems etc. and stops there (without rebooting) Then it should be safe to pull the plug.

To poweroff the RPi, the RPi can't do that, it only can reboot itself which is solved by some watchdog timeout, I suppose. Maybe there exists self-builded solutions somewhere on RPi sites to shutdown the RPi somehow (means poweroff).

- Alex

#2 lore raw
Quoted 8 lines · Alexander Aring
Quoted 2 lines · Christoffer Holmstedt

I know some of you are using the RPi as well so I start by asking here, perhaps linux-rpi-kernel list is the next step. When I run "shutdown -h 0" the RPi

Maybe try "halt"? "halt" should shutdown your RPi, means unmounting filesystems etc. and stops there (without rebooting) Then it should be safe to pull the plug.

Quoted 6 lines

To poweroff the RPi, the RPi can't do that, it only can reboot itself which is solved by some watchdog timeout, I suppose. Maybe there exists self-builded solutions somewhere on RPi sites to shutdown the RPi somehow (means poweroff).

- Alex

"shutdown -h 0", halt, poweroff all end up with the same result. Rebooting U-Boot and eventually starting Raspbian.

Yea, I probably have to look deeper into some RPi sources and find out how it works in the 3.18.y series.

Signature · 1 line
Christoffer Holmstedt
#3 lore raw
Quoted 14 lines · Christoffer Holmstedt
Quoted 13 lines · Alexander Aring
Quoted 2 lines · Christoffer Holmstedt

I know some of you are using the RPi as well so I start by asking here, perhaps linux-rpi-kernel list is the next step. When I run "shutdown -h 0" the RPi

Maybe try "halt"? "halt" should shutdown your RPi, means unmounting filesystems etc. and stops there (without rebooting) Then it should be safe to pull the plug.

To poweroff the RPi, the RPi can't do that, it only can reboot itself which is solved by some watchdog timeout, I suppose. Maybe there exists self-builded solutions somewhere on RPi sites to shutdown the RPi somehow (means poweroff).

Quoted 7 lines
Quoted 1 line

- Alex

"shutdown -h 0", halt, poweroff all end up with the same result. Rebooting U-Boot and eventually starting Raspbian.

Yea, I probably have to look deeper into some RPi sources and find out how it works in the 3.18.y series.

This might not help much but I'm seeing the same behaviour here but did not get around to look into this.
Cheers,
-- Guido

maintainer
#4 lore raw
Quoted 20 lines · Guido Günther
Quoted 19 lines · Christoffer Holmstedt
Quoted 8 lines · Alexander Aring
Quoted 2 lines · Christoffer Holmstedt

I know some of you are using the RPi as well so I start by asking here, perhaps linux-rpi-kernel list is the next step. When I run "shutdown -h 0" the RPi

Maybe try "halt"? "halt" should shutdown your RPi, means unmounting filesystems etc. and stops there (without rebooting) Then it should be safe to pull the plug.

Quoted 6 lines

To poweroff the RPi, the RPi can't do that, it only can reboot itself which is solved by some watchdog timeout, I suppose. Maybe there exists self-builded solutions somewhere on RPi sites to shutdown the RPi somehow (means poweroff).

- Alex

"shutdown -h 0", halt, poweroff all end up with the same result. Rebooting U-Boot and eventually starting Raspbian.

Quoted 6 lines
Quoted 2 lines

Yea, I probably have to look deeper into some RPi sources and find out how it works in the 3.18.y series.

This might not help much but I'm seeing the same behaviour here but did not get around to look into this.
Cheers,

I am using barebox [0] as bootloader and not seeing this issue. When I type "halt" several messages are shown and ends with:

[  127.095945] reboot: System halted

no reboot.

- Alex

[0] http://barebox.org/

#5 lore raw
In reply to Guido Günther
Quoted 20 lines · Guido Günther
Quoted 19 lines · Christoffer Holmstedt
Quoted 8 lines · Alexander Aring
Quoted 2 lines · Christoffer Holmstedt

I know some of you are using the RPi as well so I start by asking here, perhaps linux-rpi-kernel list is the next step. When I run "shutdown -h 0" the RPi

Maybe try "halt"? "halt" should shutdown your RPi, means unmounting filesystems etc. and stops there (without rebooting) Then it should be safe to pull the plug.

Quoted 6 lines

To poweroff the RPi, the RPi can't do that, it only can reboot itself which is solved by some watchdog timeout, I suppose. Maybe there exists self-builded solutions somewhere on RPi sites to shutdown the RPi somehow (means poweroff).

- Alex

"shutdown -h 0", halt, poweroff all end up with the same result. Rebooting U-Boot and eventually starting Raspbian.

Quoted 7 lines
Quoted 2 lines

Yea, I probably have to look deeper into some RPi sources and find out how it works in the 3.18.y series.

This might not help much but I'm seeing the same behaviour here but did not get around to look into this.
Cheers,
-- Guido

That is helpful, at least I know I'm not alone. Can you specify which version of U-Boot you are using (or are you using another boot loader)? Alexander isn't using U-Boot so maybe it is something there that is problematic (I'm using a really old version of U-Boot).

btw. I'm experiencing the exact same behaviour now on my new Broadwell based laptop...the plot thickens ;)

Regards

Signature · 1 line
Christoffer Holmstedt
#6 lore raw
Quoted 29 lines · Christoffer Holmstedt
Quoted 20 lines · Guido Günther
Quoted 19 lines · Christoffer Holmstedt
Quoted 8 lines · Alexander Aring
Quoted 2 lines · Christoffer Holmstedt

I know some of you are using the RPi as well so I start by asking here, perhaps linux-rpi-kernel list is the next step. When I run "shutdown -h 0" the RPi

Maybe try "halt"? "halt" should shutdown your RPi, means unmounting filesystems etc. and stops there (without rebooting) Then it should be safe to pull the plug.

Quoted 6 lines

To poweroff the RPi, the RPi can't do that, it only can reboot itself which is solved by some watchdog timeout, I suppose. Maybe there exists self-builded solutions somewhere on RPi sites to shutdown the RPi somehow (means poweroff).

- Alex

"shutdown -h 0", halt, poweroff all end up with the same result. Rebooting U-Boot and eventually starting Raspbian.

Quoted 7 lines
Quoted 2 lines

Yea, I probably have to look deeper into some RPi sources and find out how it works in the 3.18.y series.

This might not help much but I'm seeing the same behaviour here but did not get around to look into this.
Cheers,
-- Guido

Quoted 4 lines

That is helpful, at least I know I'm not alone. Can you specify which version of U-Boot you are using (or are you using another boot loader)? Alexander isn't using U-Boot so maybe it is something there that is problematic (I'm using a really old version of U-Boot).

I'm using

    v2015.04-rc4-45-g21866c3

as of commit 21866c34a1b4098a8868c9250daf01baf84c2397. Cheers,
-- Guido