Re: N800 Power cycles
Hi, ext Rainer Dorsch wrote: I run into the power cycles problem again (w/o having added the text2screen output, but I will try that now). I observed two things: - I had to remove the battery to get out of the power cycles loop - after removing the battery and normal bootup (w/o power supply plugged) I found in the /var/lib/dsme/stats/ files Nokia-N800-23-14:/var/lib/dsme/stats# You don't have the latest release? for f in *; do echo $f:; cat $f; done 32wd_to: 4 lifeguard_restarts: /usr/bin/hildon-input-method : 5 /usr/sbin/ke-recv : 5 /usr/sbin/multimediad : 7 /usr/bin/esd : 8 /usr/bin/osso-media-server : 3 /usr/sbin/dsp_dld -p --disable-restart -c /lib/dsp/dsp_dld_avs.conf : 7 * /usr/bin/hildon-desktop : 3 /sbin/mce --force-syslog : 1 sw_rst: 4 Nokia-N800-23-14:/var/lib/dsme/stats# Does the * behind /usr/sbin/dsp_dld -p --disable-restart -c /lib/dsp/dsp_dld_avs.conf : 7 * mean, that caused the last reboot? Yes, I think so. What is /usr/sbin/dsp doing? AFAIK dsp_dld loads the DSP programs to DSP. That needs to be re-done after the DSP is reseted (which gets done when there's some issue with the DSP side). Does removing the battery change anything in this area? - Eero ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: N800 Power cycles
Hi Eero, Am Dienstag, 16. Juni 2009 schrieben Sie: Hi, ext Rainer Dorsch wrote: I modified that too if [ x$bootreason = xcharger ]; then echo Showing the 'charger connected' image /usr/bin/fb-chaimage -l /usr/share/images/qgn_indi_charger_connection_detected -b 0 -c -p 0 -s 15 else text2screen -t Bootreason: `cat /proc/bootreason` -H center -y 360 -s 6 -B 0x fi This way I have at least some information when I run in that problem next time. Is there any other debug information which would be useful to print? maybe statistics from /var/lib/dsme/stats/ files? I run into the power cycles problem again (w/o having added the text2screen output, but I will try that now). I observed two things: - I had to remove the battery to get out of the power cycles loop - after removing the battery and normal bootup (w/o power supply plugged) I found in the /var/lib/dsme/stats/ files Nokia-N800-23-14:/var/lib/dsme/stats# for f in *; do echo $f:; cat $f; done 32wd_to: 4 lifeguard_restarts: /usr/bin/hildon-input-method : 5 /usr/sbin/ke-recv : 5 /usr/sbin/multimediad : 7 /usr/bin/esd : 8 /usr/bin/osso-media-server : 3 /usr/sbin/dsp_dld -p --disable-restart -c /lib/dsp/dsp_dld_avs.conf : 7 * /usr/bin/hildon-desktop : 3 /sbin/mce --force-syslog : 1 sw_rst: 4 Nokia-N800-23-14:/var/lib/dsme/stats# Does the * behind /usr/sbin/dsp_dld -p --disable-restart -c /lib/dsp/dsp_dld_avs.conf : 7 * mean, that caused the last reboot? What is /usr/sbin/dsp doing? Does removing the battery change anything in this area? Many thanks, Rainer -- Rainer Dorsch Lärchenstr. 6 D-72135 Dettenhausen 07157-734133 email: rdor...@web.de jabber: rdor...@jabber.org GPG Fingerprint: 5966 C54C 2B3C 42CC 1F4F 8F59 E3A8 C538 7519 141E Full GPG key: http://pgp.mit.edu/ signature.asc Description: This is a digitally signed message part. ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: N800 Power cycles
Hi, ext Rainer Dorsch wrote: I modified that too if [ x$bootreason = xcharger ]; then echo Showing the 'charger connected' image /usr/bin/fb-chaimage -l /usr/share/images/qgn_indi_charger_connection_detected -b 0 -c -p 0 -s 15 else text2screen -t Bootreason: `cat /proc/bootreason` -H center -y 360 -s 6 -B 0x fi This way I have at least some information when I run in that problem next time. Is there any other debug information which would be useful to print? maybe statistics from /var/lib/dsme/stats/ files? Is there a way (by changing linuxrc further) to get a lot more information during boot instead of the nice but almost informationfree image? Using the text2screen utility above? I just noticed that I cannot write that file, the fs is mounted readonly: /dev/root on /mnt/initfs type jffs2 (ro) If I remount it rw mount -o remount,rw /mnt/initfs to do the change, would that break something? Initfs may be too full for changes. You need to remove things first (e.g. initfs factory test stuff you can find -name '*test*'). - Eero ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: N800 Power cycles
Eero Tamminen wrote: Hi, Is there a way (by changing linuxrc further) to get a lot more information during boot instead of the nice but almost informationfree image? Using the text2screen utility above? Some additional tips are here http://talk.maemo.org/showthread.php?t=16056 With easy modification you may see which /etc/init.d/* scripts are started and syslog may help a lot too. I just noticed that I cannot write that file, the fs is mounted readonly: /dev/root on /mnt/initfs type jffs2 (ro) If I remount it rw mount -o remount,rw /mnt/initfs to do the change, would that break something? No but it allows you (or some code running as root) to mess it up. initfs was more or less writable (i.e. mounted 'rw' but more or less full) since OS2005 days, changing mount options to 'ro' is new in Diablo. Also mounting it 'rw' eats some tiny bits of memory by having extra jffs_gcd_mtd3 garbage collection kernel thread running. Initfs may be too full for changes. You need to remove things first (e.g. initfs factory test stuff you can find -name '*test*'). It was full before Diablo. In Diablo initfs partition was enlarged so there is enough free space at least for N800 and plain N810. The wimax edition has some additional firmware and binaries so the free space may be bad again. ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: N800 Power cycles
Frantisek, many thanks for your detailed explanation. Am Dienstag, 9. Juni 2009 schrieb Frantisek Dufka: Rainer Dorsch wrote: Under which circumstances is the N800 started automatically, when the power supply is plugged in? N800 is always started when you plug it in. The difference is in unix runlevel the device boots into. Normal is runlevel 2 when maemo-desktop starts fully. When bootreason (/proc/bootreason) is 'charger' it boots into runlevel 5 with slightly different boot sequence which in final stage shows only charging icon but otherwise the system behind it is almost fully booted. So in theory you can have reboot loop which happens only in runlevel 5 and not in runlevel 2 if the failing part is specific to runlevel 5. Maybe you saw this? I was not aware of that behavior. Right now, I see exactly what you describe. When I was in the power cycle loop, I saw after plugging in the power supply, that the blue progress bar at the bottom and it completed. Now when I plug in the power supply, I do not see the blue progress bar, but the charging icon. More details is in /mnt/initfs/linuxrc in function enter_state(), normal mode is USER state, charging mode is (or is one case of?) ACTDEAD state. I hope I am not wrong about this. After investigating linuxrc the above behavior becomes clear: show_actdead_image() { bootreason=`cat /proc/bootreason` if [ x$bootreason = xcharger ]; then echo Showing the 'charger connected' image /usr/bin/fb-chaimage -l /usr/share/images/qgn_indi_charger_connection_detected -b 0 -c -p 0 -s 15 fi } It seems that /proc/bootreason was not charger in my case (and I think that is expected when the N800 crashed). I modified that too if [ x$bootreason = xcharger ]; then echo Showing the 'charger connected' image /usr/bin/fb-chaimage -l /usr/share/images/qgn_indi_charger_connection_detected -b 0 -c -p 0 -s 15 else text2screen -t Bootreason: `cat /proc/bootreason` -H center -y 360 -s 6 -B 0x fi This way I have at least some information when I run in that problem next time. Is there any other debug information which would be useful to print? Is there a way (by changing linuxrc further) to get a lot more information during boot instead of the nice but almost informationfree image? Personally I don't like this behaviour so I am always powering device by power key and if I know battery is empty I have charger prepared and plug it in just after screen lights up to avoid this charging mode. There is short window of time to do this before dsme/bme starts and decides to shutdown the system due to low battery. It is definitely worthwhile to know that there is a different behavior (and to understand the power cycle loops might be broken when booting w/o power supply). It would be interesting to modify linuxrc to go to runlevel 2 even in this charging state and see if it manages to boot normally. I do not know how to reproduce the problem, so I cannot tell. Thanks, Rainer -- Rainer Dorsch Lärchenstr. 6 D-72135 Dettenhausen 07157-734133 email: rdor...@web.de jabber: rdor...@jabber.org GPG Fingerprint: 5966 C54C 2B3C 42CC 1F4F 8F59 E3A8 C538 7519 141E Full GPG key: http://pgp.mit.edu/ ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: N800 Power cycles
Am Donnerstag, 11. Juni 2009 schrieb Rainer Dorsch: [...] More details is in /mnt/initfs/linuxrc in function enter_state(), normal mode is USER state, charging mode is (or is one case of?) ACTDEAD state. I hope I am not wrong about this. After investigating linuxrc the above behavior becomes clear: show_actdead_image() { bootreason=`cat /proc/bootreason` if [ x$bootreason = xcharger ]; then echo Showing the 'charger connected' image /usr/bin/fb-chaimage -l /usr/share/images/qgn_indi_charger_connection_detected -b 0 -c -p 0 -s 15 fi } It seems that /proc/bootreason was not charger in my case (and I think that is expected when the N800 crashed). I modified that too if [ x$bootreason = xcharger ]; then echo Showing the 'charger connected' image /usr/bin/fb-chaimage -l /usr/share/images/qgn_indi_charger_connection_detected -b 0 -c -p 0 -s 15 else text2screen -t Bootreason: `cat /proc/bootreason` -H center -y 360 -s 6 -B 0x fi This way I have at least some information when I run in that problem next time. Is there any other debug information which would be useful to print? Is there a way (by changing linuxrc further) to get a lot more information during boot instead of the nice but almost informationfree image? I just noticed that I cannot write that file, the fs is mounted readonly: /dev/root on /mnt/initfs type jffs2 (ro) If I remount it rw mount -o remount,rw /mnt/initfs to do the change, would that break something? Thanks, Rainer -- Rainer Dorsch Lärchenstr. 6 D-72135 Dettenhausen 07157-734133 email: rdor...@web.de jabber: rdor...@jabber.org GPG Fingerprint: 5966 C54C 2B3C 42CC 1F4F 8F59 E3A8 C538 7519 141E Full GPG key: http://pgp.mit.edu/ ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: N800 Power cycles
I did so (like you, not liking the same behaviour) and it started the desktop but requiring me to press the power button to enable touchscreen and input (i.e it's expecting to be booted in ACTDEAD state). All I did, however, was to change it from ACTDEAD state to USER state if it detects charger, so more may need to be done. I do not know what provides /proc/bootreason but (if it's the kernel, like I'm hoping), it may be easier to not make it say charger in bootreason if it's booted with a charger. BR, Faheem On Tue, Jun 9, 2009 at 9:53 AM, Frantisek Dufka duf...@seznam.cz wrote: Rainer Dorsch wrote: Under which circumstances is the N800 started automatically, when the power supply is plugged in? It would be interesting to modify linuxrc to go to runlevel 2 even in this charging state and see if it manages to boot normally. Frantisek ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: N800 Power cycles
Faheem Pervez wrote: I do not know what provides /proc/bootreason but (if it's the kernel, like I'm hoping), it may be easier to not make it say charger in bootreason if it's booted with a charger. linux/arch/arm/plat-omap/bootreason.c cfg = omap_get_config(OMAP_TAG_BOOT_REASON, struct omap_boot_reason_config); strncpy(boot_reason, cfg-reason_str, sizeof(cfg-reason_str)); Should be easy to replace charger for pwr_key there. ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: N800 Power cycles
Hi, ext Rainer Dorsch wrote: One thing I noticed and maybe I did not highlight that enough: - yesterday in the boot loops, the N800 started itself after I plugged the powersupply (no matter if I removed the battery before or not). - today plugging the power supply does not start the N800 anymore, just showing that it is charging the battery Under which circumstances is the N800 started automatically, when the power supply is plugged in? Always. It will then go to Charging mode. If you in that state: - unplug the charger - device powers down. - press power key - device comes fully up. - Eero ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: N800 Power cycles
Rainer Dorsch wrote: Under which circumstances is the N800 started automatically, when the power supply is plugged in? N800 is always started when you plug it in. The difference is in unix runlevel the device boots into. Normal is runlevel 2 when maemo-desktop starts fully. When bootreason (/proc/bootreason) is 'charger' it boots into runlevel 5 with slightly different boot sequence which in final stage shows only charging icon but otherwise the system behind it is almost fully booted. So in theory you can have reboot loop which happens only in runlevel 5 and not in runlevel 2 if the failing part is specific to runlevel 5. Maybe you saw this? More details is in /mnt/initfs/linuxrc in function enter_state(), normal mode is USER state, charging mode is (or is one case of?) ACTDEAD state. I hope I am not wrong about this. Personally I don't like this behaviour so I am always powering device by power key and if I know battery is empty I have charger prepared and plug it in just after screen lights up to avoid this charging mode. There is short window of time to do this before dsme/bme starts and decides to shutdown the system due to low battery. It would be interesting to modify linuxrc to go to runlevel 2 even in this charging state and see if it manages to boot normally. Frantisek ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: N800 Power cycles
Hi, ext Rainer Dorsch wrote: my N800 crashed after running navit. During the reboot, the blue bar completed, then it paused sometime and it rebooted again. This now cycles so that the N800 is doing nothing else than power cycling. With which OS version this is? Is there a better way to fix that than reflashing the device? For normal users, no. Is there a way to find out what the root cause of the problem is? If the device eventually boots up and you had syslog installed and free disk space, then yes. Otherwise you'd need serial access. Can RD mode help to be more verbose during the boot process? Weired, after waiting a few hours and booting the N800 w/o a power cable, it booted again. In this case I assume the reason for the boot loop was that navit (what is that?) trashed your rootfs contents in a very fragmented way so that JFFS2 mounting[1] took too long (1/2min without kicking the watchdog) triggered the HW watchdog. [1] The reason why I asked about OS version is that in very old releases JFFS2 garbage collecting could also happen at mount time which could take a lot of time. In later releases it's postponed. Are there any logs which show what went wrong before? Can I do something to better protect myself against such boot loops? Avoid SW that can fill your rootfs, runs as root and doesn't have proper error handling for disk writes (remove data if disk fills up, have strict limits on log etc file sizes etc). If something *running as root* fills the rootfs, your device is in boot-loop and needs to be reflashed. Explanation: The device needs a small amount of free space at bootup (JFFS2 needs some space even to remove data), otherwise it doesn't boot. There should be enough allocated for root for this purpose (user cannot fill it, only root can). However if a bad process running as root is installed that fills disk, or *anything* you install (installation happens as root) has badly behaving package install scripts, you can get screwed. Because this kind of issue may happen e.g. only in an uncommon error situations, normal testing might not catch them. Everything pre-installed to the device should behave fine, but 3rd party packages can do funny things. I'd suggest taking backups at least before installing something that's not widely used. - Eero ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: N800 Power cycles
On Mon, Jun 8, 2009 at 5:15 AM, Eero Tammineneero.tammi...@nokia.com wrote: Avoid SW that can fill your rootfs, runs as root and doesn't have proper error handling for disk writes (remove data if disk fills up, have strict limits on log etc file sizes etc). If something *running as root* fills the rootfs, your device is in boot-loop and needs to be reflashed. It would be nice if some kind of emergency menu be available where the user would either return to a previous good state (e.g. a file system image previously saved in a MMC) or at least allow to run some tasks to free space or defragment/fsck the JFFS2 partition (if that is possible). If that does already exist (even as a community tool), I'd like to know about it :) Regards, -- Anderson Lizardo OpenBossa Labs - INdT Manaus - Brazil ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: N800 Power cycles
Anderson Lizardo wrote: It would be nice if some kind of emergency menu be available where the user would either return to a previous good state (e.g. a file system image previously saved in a MMC) or at least allow to run some tasks to free space or defragment/fsck the JFFS2 partition (if that is possible). If that does already exist (even as a community tool), I'd like to know about it :) https://wiki.maemo.org/Booting_from_a_flash_card#Install_bootmenu http://fanoush.wz.cz/maemo/#initfs also search talk.maemo.org for 'bootmenu' You can either boot into clean system copy (mmc or flash) or you can log in over usb networking if you don't have full system to boot. backing up whole rootfs as jffs2 image to mmc and restoring is possible too via mtd-utils commands (search t.m.o for mkfs.jffs2) Frantisek ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: N800 Power cycles
Eero, many thanks for the detailed response. Am Montag, 8. Juni 2009 schrieben Sie: Hi, ext Rainer Dorsch wrote: my N800 crashed after running navit. During the reboot, the blue bar completed, then it paused sometime and it rebooted again. This now cycles so that the N800 is doing nothing else than power cycling. With which OS version this is? 5.2008.43-7 (should be latest greatest). Is there a better way to fix that than reflashing the device? For normal users, no. Is there a way to find out what the root cause of the problem is? If the device eventually boots up and you had syslog installed and free disk space, then yes. Otherwise you'd need serial access. Can RD mode help to be more verbose during the boot process? Weired, after waiting a few hours and booting the N800 w/o a power cable, it booted again. In this case I assume the reason for the boot loop was that navit (what is that?) trashed your rootfs contents in a very fragmented way so that JFFS2 mounting[1] took too long (1/2min without kicking the watchdog) triggered the HW watchdog. navit is an open source navigation tool, it works on openstreetmap data and can do routing w/o being online: http://wiki.navit-project.org/index.php/Navit_on_n770/n800/n810 I should do a wiki page on different navigation tools on maemo, I remember that there are at least maemo-mapper, gosmore, navit, roadnav, and navicore. Is that the omap-wd which I could disable in RD mode? [1] The reason why I asked about OS version is that in very old releases JFFS2 garbage collecting could also happen at mount time which could take a lot of time. In later releases it's postponed. Should be latest greatest OS. Are there any logs which show what went wrong before? Can I do something to better protect myself against such boot loops? Avoid SW that can fill your rootfs, runs as root and doesn't have proper error handling for disk writes (remove data if disk fills up, have strict limits on log etc file sizes etc). If something *running as root* fills the rootfs, your device is in boot-loop and needs to be reflashed. I have homeDiskFree which shows free space on the disks as an applet. I have around 16 MB on the rootfs since weeks (and I still have it after it reboots now). I would be surprised if I run out of rootfs space. Explanation: The device needs a small amount of free space at bootup (JFFS2 needs some space even to remove data), otherwise it doesn't boot. There should be enough allocated for root for this purpose (user cannot fill it, only root can). However if a bad process running as root is installed that fills disk, or *anything* you install (installation happens as root) has badly behaving package install scripts, you can get screwed. Because this kind of issue may happen e.g. only in an uncommon error situations, normal testing might not catch them. Everything pre-installed to the device should behave fine, but 3rd party packages can do funny things. I'd suggest taking backups at least before installing something that's not widely used. One thing I noticed and maybe I did not highlight that enough: - yesterday in the boot loops, the N800 started itself after I plugged the powersupply (no matter if I removed the battery before or not). - today plugging the power supply does not start the N800 anymore, just showing that it is charging the battery Under which circumstances is the N800 started automatically, when the power supply is plugged in? Thanks, Rainer -- Rainer Dorsch Lärchenstr. 6 D-72135 Dettenhausen 07157-734133 email: rdor...@web.de jabber: rdor...@jabber.org GPG Fingerprint: 5966 C54C 2B3C 42CC 1F4F 8F59 E3A8 C538 7519 141E Full GPG key: http://pgp.mit.edu/ ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: N800 Power cycles
Am Samstag, 6. Juni 2009 schrieb Rainer Dorsch: Hello, my N800 crashed after running navit. During the reboot, the blue bar completed, then it paused sometime and it rebooted again. This now cycles so that the N800 is doing nothing else than power cycling. Is there a better way to fix that than reflashing the device? Is there a way to find out what the root cause of the problem is? Can RD mode help to be more verbose during the boot process? Weired, after waiting a few hours and booting the N800 w/o a power cable, it booted again. Are there any logs which show what went wrong before? Can I do something to better protect myself against such boot loops? Thanks, Rainer -- Rainer Dorsch Lärchenstr. 6 D-72135 Dettenhausen 07157-734133 email: rdor...@web.de jabber: rdor...@jabber.org GPG Fingerprint: 5966 C54C 2B3C 42CC 1F4F 8F59 E3A8 C538 7519 141E Full GPG key: http://pgp.mit.edu/ ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: N800 Power cycles
Henrik, thanks for the quick reply. Am Samstag, 6. Juni 2009 schrieben Sie: Rainer Dorsch kirjoitti 06.06.2009 21:02: Weired, after waiting a few hours and booting the N800 w/o a power cable, it booted again. When a power cable is connected, the device seems to be running the operating system in the background. Thus, simply switching the power off does not reboot the device in that case. If you need to cold boot the device, the power cable must be disconnected (and sometimes a battery also ;). HmmI was removing the battery several times (that was the only way to stop the power cycles). But when I inserted the battery again (sometimes after minutes) and plugged the power cable the N800 started immediately to boot. I am wondering what I would have done if my battery would have been empty and I could not boot w/o power cable. Thanks, Rainer -- Rainer Dorsch Lärchenstr. 6 D-72135 Dettenhausen 07157-734133 email: rdor...@web.de jabber: rdor...@jabber.org GPG Fingerprint: 5966 C54C 2B3C 42CC 1F4F 8F59 E3A8 C538 7519 141E Full GPG key: http://pgp.mit.edu/ ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers