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" = x"charger" ]; 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" = x"charger" ]; 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 0xffff
        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

Reply via email to