maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Completely Power Off Your Device After a Few Reboots! (https://talk.maemo.org/showthread.php?t=37431)

Pedrolot 2009-12-16 19:10

Re: Completely Power Off Your Device After a Few Reboots!
 
I was on 9...just restarted the device.


Cheers.

Laughingstok 2009-12-16 19:12

Re: Completely Power Off Your Device After a Few Reboots!
 
Quote:

Originally Posted by Pedrolot (Post 430821)
I was on 9...just restarted the device.


Cheers.

Hopefully you meant you shut it down. :)

Restarting is counter-intuitive.

Pedrolot 2009-12-16 19:14

Re: Completely Power Off Your Device After a Few Reboots!
 
Quote:

Originally Posted by Laughingstok (Post 430825)
Hopefully you meant you shut it down. :)

Restarting is counter-intuitive.

Well i powered off and powered back on again using the hardware button.


Its the oonly way i know how to restart/shutdown the device apart from taking the battery out. :)

2disbetter 2009-12-16 21:22

Re: Completely Power Off Your Device After a Few Reboots!
 
Quote:

Originally Posted by jebba (Post 430753)
If you put a 50 in there (or maybe 51) and reboot, your system will hang like:

* (*) * * *

(picture those bootup dots or "balloons")

From the bug report:


Also from report:


AFAICT "testing" in this case is internal Nokia testing, not Maemo's extras-testing.

Also, the bug report provides a temporary workaround:




Code:

echo_g "Houston, we have a problem, powering off..."
+sleep 10
+poweroff
def_runlevel=0


-Jeff

@Jeff, since no one seems to being paying any attention to your post, which provides a resolution, could I be the first to ask a question? Inside of the preint file, would I add the selected portion before, after, or in between the brackets? Secondly does the location of the above snipet matter? Ie should it be before the if queries or after? Also how is this command actually checking the reboot count, it looks to me like it just runs and powers down the device? Am I missing something? Thanks!

2d

kwotski 2009-12-16 21:32

Re: Completely Power Off Your Device After a Few Reboots!
 
Quote:

Originally Posted by 2disbetter (Post 431026)
Inside of the preint file, would I add the selected portion before, after, or in between the brackets? Secondly does the location of the above snipet matter?

The code excerpt is sort of in patch format.

What it means is that you should find the existing lines reading

Quote:

echo_g "Houston, we have a problem, powering off..."
def_runlevel=0
("Houston" only occurs once in that file, so you can just search for that to find these lines.)

Then you put the new lines (indicated by '+') between them, so that it would read:

Quote:

echo_g "Houston, we have a problem, powering off..."
sleep 10
poweroff
def_runlevel=0
when you're done.

Edit: Note, the '+' sign is only to indicate which lines are added, it shouldn't be actually put in the file.

2disbetter 2009-12-16 21:49

Re: Completely Power Off Your Device After a Few Reboots!
 
Quote:

Originally Posted by kwotski (Post 431036)
The code excerpt is sort of in patch format.

What it means is that you should find the existing lines reading



("Houston" only occurs once in that file, so you can just search for that to find these lines.)

Then you put the new lines (indicated by '+') between them, so that it would read:



when you're done.

Edit: Note, the '+' sign is only to indicate which lines are added, it shouldn't be actually put in the file.

Thanks, I'm using Midnight commander to edit the file, but am having a problem saving it. Probably becuase I don't have root access to the file. How would i be able to get to said mode from within MC? Or do I need to go through the terminal and sudo it?

Edit: For those also curious, yes you need to have root control before editing the file.

Another question I'm having is, this two new lines we've added, as far as I can tell, will run in the event that all other scenarios under that (what looks like a function) don't pan out.

Just so I understand what I've just done, this basically will force the device to shut down, and then reset the reboot counter, when the the reboot count has risen too high?

2d

jebba 2009-12-16 21:58

Re: Completely Power Off Your Device After a Few Reboots!
 
Also note, editing that file is not one you want to screw up, as it controls the boot, so you pooch that one, you're hosed.

kwotski 2009-12-16 22:01

Re: Completely Power Off Your Device After a Few Reboots!
 
2d: You'd certainly need to be root to write to the file.

But seriously, I wouldn't bother making this edit unless I had the spontaneous reset problem reported by some here.

I got confused by the terminology "reboot" into thinking that this applied to normal shutdowns as done by issuing a reboot command, but as I understand it this is only happening when the machine resets without going through normal shutdown.

That is why using the power button, then pressing "switch off", and then powering up the device is the recommended way to put the counter back to 0 (this is the only out-of-the-box method of doing a controlled reboot, I think)

(I hope someone will correct me if I'm wrong on this)

The file in question is undoubtedly one of those ones that can necessitate flashing the device if an error is introduced, so anyone unwilling to do that (as I would be!) should be very nervous about editing it, especially in an unfamiliar environment!

Take care :)

jebba 2009-12-17 18:45

Re: Completely Power Off Your Device After a Few Reboots!
 
I've put this in some other places but I figure it wouldn't hurt to have it here too:

Ok, here's a new recovery method which is easier as it doesn't need the flasher:

https://bugs.maemo.org/show_bug.cgi?id=6350#c42

* take battery out
* insert USB cable (to boot device with charging boot reason)
* insert battery & put back cover back
* remove USB cable


-Jeff
http://wiki.maemo.org/User:Jebba

2disbetter 2009-12-17 19:34

Re: Completely Power Off Your Device After a Few Reboots!
 
Good news on the reboot probm only dealing with people having forced reboots and not those of us manually rebooting (ie: after using wi-fi, etc.). Is this confirmed though? Are we indeed talking about this affecting people being forced to reboot or all reboots in general?

2d

Posted using the N900.


All times are GMT. The time now is 20:52.

vBulletin® Version 3.8.8