Active Topics

 


Reply
Thread Tools
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#11
@sixwheeledbeast,

Without a watchdog the device could eat battery until it dies. This wouldn't happen on a desktop.
I'm not sure I understand what you've written there. A watchdog is a device (HW or SW) that needs to be periodically kicked as otherwise it will trigger some action (usually a reboot). Nothing to do with desktop/laptop/phone and/or with battery.

@pali,

Modern Intel ISA bridge LPC Controllers have TCO watchdog. It can be enabled by driver iTCO_wdt.ko
Right. Have you enabled it?
Quoting myself: "I've never had an *active* watchdog on a PC."
 
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#12
Not yet, but I'm thinging about using SW kernel watchdog. Due to needs of PA which using rtkit daemon which setting RT priority for some processes which using PA... And when wine playing audio it can freeze pc... Here proper and clean shutdown from kernel can be usefull
 

The Following User Says Thank You to pali For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#13
Originally Posted by pali View Post
disadvantages for R&D mode:
* keyboard backlight is never turned off (even when keyboard is closed!)
AFAIK not entirely trued, as user can easily overwrite this behavior in /sbin/preinit. I have a device that require R&D and pwr_key flag for being able to boot at all (but otherwise, works *perfectly* fine), and I don't see keyboard light On when keyboard is closed/any flickering of keyboard light on activity.

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 

The Following 2 Users Say Thank You to Estel For This Useful Post:
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#14
I know it is possible to modify it via some /etc/... file. Also somewhere I have unfinished new preinit... https://gitorious.org/community-ssu/getbootstate But I have no time to finish it :-(
 

The Following 2 Users Say Thank You to pali For This Useful Post:
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#15
Originally Posted by pali View Post
I know it is possible to modify it via some /etc/... file. Also somewhere I have unfinished new preinit... https://gitorious.org/community-ssu/getbootstate But I have no time to finish it :-(
/etc/pmconfig

it's the sleep indicator (sleep_ind or so)
 

The Following 2 Users Say Thank You to reinob For This Useful Post:
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#16
It may also be possible via
Code:
echo inactive > /sys/devices/platform/gpio-switch/sleep_ind/state
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature
 

The Following 2 Users Say Thank You to peterleinchen For This Useful Post:
pichlo's Avatar
Posts: 6,447 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#17
Actually, it is related to the battery to some extent. A watchdog not kicked for a certain time indicates a runaway process (or, worse, a kernel module) that could easily result in running until the battery dies.

A desktop has (theoretically) a limitless supply of power and does not need to concern itself with battery issues. It can of course still suffer from lockups caused by runaway processes but the choice to reboot is left to the user.

Most embedded systems have a watchdog of some kind, usually because they are designed to work autonomously. A mobile phone is a different kind of an embedded system: it has a lot of user interaction. I do not mind a watchdog on my phone but I would prefer it to pop up a dialog with options (ignore, close current application, reboot) rather that choosing for me.

If that is not possible, then the second best would be to increase the watchdog timeout. 30 seconds seems too short, considering most times it happpened to me was due to loading a picture in the browser. 5 minutes is more like it. Of course, that would not help if the reboot was due to running out of memory or /tmp space but then, the culprit process should be easily identified and killed rather than the whole system suffering.

BTW, I would not be so sure about safe FS unmounting. I have had a few brower-induced reboots resulting in a corrupt optfs and/or MyDocs.
 

The Following 4 Users Say Thank You to pichlo For This Useful Post:
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#18
Originally Posted by pichlo View Post
Actually, it is related to the battery to some extent. A watchdog not kicked for a certain time indicates a runaway process (or, worse, a kernel module) that could easily result in running until the battery dies.

A desktop has (theoretically) a limitless supply of power and does not need to concern itself with battery issues. It can of course still suffer from lockups caused by runaway processes but the choice to reboot is left to the user.
I guess at some point somebody @Nokia had to make a decision: in case of fvck-up, do we reboot or let the user handle it (if he can, and if possible at all). Even if the N900 is by today's standards a "geek" phone it was still designed to be used by your neighbour, so they chose the watchdog-reboot way instead of the hard-lock-up-but-perhaps-with-enlightenment way.

Luckily the N900 is geeky enough that WE can change that. Your choice.

Most embedded systems have a watchdog of some kind, usually because they are designed to work autonomously. A mobile phone is a different kind of an embedded system: it has a lot of user interaction. I do not mind a watchdog on my phone but I would prefer it to pop up a dialog with options (ignore, close current application, reboot) rather that choosing for me.
If a watchdog is able to do something fancy like asking the user then it's not needed
The HW watchdog can only do one thing: reset the CPU.

If that is not possible, then the second best would be to increase the watchdog timeout. 30 seconds seems too short, considering most times it happpened to me was due to loading a picture in the browser. 5 minutes is more like it. Of course, that would not help if the reboot was due to running out of memory or /tmp space but then, the culprit process should be easily identified and killed rather than the whole system suffering.
The timeout can be tweaked. It is a parameter of the kernel module. Unfortunately I don't have the exact info at hand nor the time to look it up. Pali knows.

BTW, I would not be so sure about safe FS unmounting. I have had a few brower-induced reboots resulting in a corrupt optfs and/or MyDocs.
There is no such thing as safe-FS-unmounting-when-something-is-so-bad-that-software-thinks-that-a-computer-needs-to-reboot. Even the Linux magic-sysrq unmounting does not guarantee anything. It's just a best-effort attempt at minimizing the damage.

But maybe there's a way to make everyone happy and stay on-topic (in the context of this thread). There might be a way to *temporarily* disable the watchdog or at least alter the timeout.

At least for the software watchdog (dsme) this is clearly doable. How, I don't know, but it's clear that any and all software is subject to be manipulated some way or another (yes, even "closed" bits can be flipped at will

As for the HW watchdog. Perhaps the kernel module allows it. Perhaps it can be patched into it. Whether the HW itself allows it is a different matter. Pali, anyone?

Then it might be possible to do things like:
$ no-watchdog-please big-fat-cpu-and-I/O-intensitve-operation
 

The Following 3 Users Say Thank You to reinob For This Useful Post:
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#19
Watchdog timeout for Maemo system can be configured in DSME daemon source code: https://gitorious.org/community-ssu/...e-wdd-wd.c#L59

And about safe FS umount: this is done every time when kernel shutdown (or reboot) normally. Lifeguard is just another daemon which issue normal SW reboot.
 

The Following User Says Thank You to pali For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 01:48.