I am setting up an old nettbook for my grandsun (2,5 years old). He usually forgets to shut down the computer (although I put big shutdown icon on desktop). So the netbook is all time switched on, but sometimes power goes off and the battery can only work for 30 minutes. After that the netbook has sudden blackout. And every time this happens puppy crashes.

Usually other distors have some power management tools where you can request that if laptop works on batteries in some minutes it automatically shuts down. I hoped that if I set up that in that case puppy would not crash.

Is it possible to make the sleep or poweroff commands dependant on whether the laptop works on AC or the batteries? Or is there any other way to prevent puppy from crashing at sudden blackout?

Pwidgets has an app that monitors the battery. It pops up warnings at pre-set battery levels. Perhaps modify the script to poweroff when battery level of say zero is detected. Timer wouldn't be necessary but you could add one if you want._________________
ASUS EeePC Flare series 1025C 4x Intel Atom N2800 @ 1.86GHz RAM 2063MB 800x600p ATA 320G
_-¤-_<º))))><.¸¸.•´¯`•.#.•´¯`•.¸¸. ><((((º>

Here is the modified version of my laptop-tools. It consists of acpitool, vattery,vattery-ibam-vattery-acpitool,xbindkeys,acpid, ppower, cpu-frequency tray app needed framework, extra Fn + function buttons support like media buttons. You need to use xbindkeys-config to bind the buttons to executables found on your comp or laptop.

What it provides. It provides Vattery-ibam and Vattery-acpitool with needed framework to handle verbose warnings and also executable commands at certain battery state levels.

Check /root/.config/vattery-ibam/config and corresponding vattery-acpitool/config text files how to configure the commands for your needs.

For me...I get verbose warning at battery state level 10 % and suspending to the ram at battery level 5 %.
I have included those config files in the pet.

Also you get those other functionality for laptop or netbook. Like power button should shut down the comp. Laptop or netbook sleep button suspends to the ram, lid closing suspends to the ram.

If something is missing, report. I removed Frisbee and dhcpcd stuff from the pet so I hope I didnt remove anything needed.

Vattery-ibam is sometimes picky. If you dont get new battery icon to the tray after reboot, restart X is not enough to get whole functionality, edit /root/Startup/1vattery script and leave only shebang row and exec vattery-acpitool row. Save and restart X.

With active pwidget Battery it safely shuts down the computer at critical battery.

Thanks!

And thanks to pemasu - His tool allows shutdown through simply pushing the power button. Very useful! And yes, finally - wireless connection established on Asus eee pc! (which was hopeless from any puppe except from pupeee). Thaanks!!!

means less than 7%.
depending on the characteristics of your battery you may find something else more suitable. my battery runs at 1% for a long time then at 0% for quite a while.
it also goes under 7% quite quickly. so for me

This provides all stuff. It has stuff for keybindings through xbindkeys-config, acpid demon for acpi, acpitool for suspending in ram, battery monitoring, verbose warning and possibilty to suspend at configured battery percent level or shutdown....the vattery-acpitool and vattery-ibam accepts whatever command. Also there is tray cpu frequency setting tray app and so on...

This pet provides the whole set for Lucid Puppy. I use this stuff in my Lucid builds.
Of course there might be something which needs tuning. I dont remember so accurately if I finetuned the scripts after I posted this pet.

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum