Why Puppy is the only distro not to shut down?

Using applications, configuring, problems
Post Reply
Message
Author
Sage
Posts: 5536
Joined: Tue 04 Oct 2005, 08:34
Location: GB

Why Puppy is the only distro not to shut down?

#1 Post by Sage »

At last a handle on this paradox? On the one hand, I have no detailed knowledge about these things, but this extract:
As a part of the miniconfs, power management guru and Red Hat employee Matthew Garrett gave a talk entitled "How I Learned To Stop Worrying And Love ACPI". In this talk, Garrett discussed the intricacies of ACPI and how the system is supposed to work. It's a very complicated process, requiring an interpreter inside the kernel to execute ACPI commands which makes it tricky for Linux to correctly perform tasks such as suspend and resume.
taken from today's DWW begins to throw some light on the feature.
Ironic that Garrett should have been speaking at the LCA in Hobart! Tasmania is still part of Oz?

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#2 Post by disciple »

Puppy shuts down OK on my computer - it must be hardware and possibly kernel specific. OTOH, I can't figure out how to get 4.x to suspend :(
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#3 Post by muggins »

http://www.themercury.com.au/article/20 ... -news.html

There was an article, in hobart mercury, reporting how linus shaved some hirsute HP bigwig, to raise money for research into a cure for tasmanian devil's facial cancers.

gerry
Posts: 986
Joined: Thu 26 Jul 2007, 21:49
Location: England

#4 Post by gerry »

Whether or not Puppy will shut down depends on the age of the computer and it's firmware. Puppy shuts down on my new computer, but not on my old one. I did read somewhere that it's to do with the intricacies of the layered file system, and using a live cd, but no explanation was offered.

Gerry

Sage
Posts: 5536
Joined: Tue 04 Oct 2005, 08:34
Location: GB

#5 Post by Sage »

Whether or not Puppy will shut down depends on the age of the computer and it's firmware.
Oh no it doesn't! As everyone around here knows, age is not a factor.
On the other hand, chipset and, sometimes, BIOS may be a factor. Whether it's an accursed laptop may be another.
OK - I may let you off for citing 'firmware', but not age.

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#6 Post by big_bass »

Sage wrote:
Whether or not Puppy will shut down depends on the age of the computer and it's firmware.
Oh no it doesn't! As everyone around here knows, age is not a factor.
On the other hand, chipset and, sometimes, BIOS may be a factor. Whether it's an accursed laptop may be another.
OK - I may let you off for citing 'firmware', but not age.
Sage

I finally got my box to shut down and detect my monitor correctly
but it wasn't easy * but now seems easy since its working

and I have not found a way to fix this on a "standard puppy " yet

what I discovered is that its a two fold problem

if you have a full install with a kernel that is set up correctly
you can force the shutdown *by passing the initrd


using a -f option

special note:
(the -f force is not needed if you make your own initrd.gz)


I posted in the 4.2 bugs section of the forum about this
about my findings in hope that it could
be a vital clue to solve this quirk

going directly to the kernel default shutdown

the catch here is you have to have a kernel that is setup correctly

1.)I compiled the Slackware 12.1 kernel with squashfs support
for puppy

2.)made my own very simple initrd.gz (not using any code at all from puppy)

so I have puppy 4.12 that boots from a slackware kernel and initrd.gz

the pain here is I had to rebuild all the modules special formatting so the networkmodules would all work too but now
thats solved and working

so.......... as you can see its not an "easy" fix



I should hope I can figure out how to fix this on a standard puppy

now that I finally got it to work (on my slacker-pup) and trace down what was the original
problem

I am still on it and haven't given up
big_bass

Sage
Posts: 5536
Joined: Tue 04 Oct 2005, 08:34
Location: GB

#7 Post by Sage »

Interesting! Dougal and I confirmed, several years ago, that the workaround acpi=force boot parameter worked for all (?) standard desktop boxes and with installed systems. It can be placed in the GRUB. There appeared to be some laptops that did not respond, but most laptops have their HW, FW, SW and BIOSes severely interfered with so that all those sleep/hibernate/suspend functions can be addressed by the acpi/kernel functions (because battery technology has not and cannot solve the necessary energy storage requirements without such fixes - which is, basically, why our roads still aren't filled with EVs!).
What has always troubled me is that every other distro developer except Barry has been able to solve this riddle. (I did discover one other exception, but there was a suspicion that it had copied Puppy code). Barry has barely commented on the problem; I have not understood what little he has said. As you know, I do HW and some FW, so all the coding falls on the shoulders of others. Always happy to do some testing, though.
I guess the answer must be well know by other developers? For those that can, not even reverse engineering is required with Linux to find the answer? But a bridge too far for this guy.
There may be other clues, though. The first series with the 2.4 kernel did not display this feature - they all shutdown properly. There was one version, and only one, from the 2-series (with 2.6 kernel, and a genuine BK offering, not a derivative) that shutdown correctly. I reported this at the time (and was ignored as usual!). Goodness knows which one it was, but it certainly wasn't recently.
Last edited by Sage on Tue 27 Jan 2009, 16:53, edited 1 time in total.

davesurrey
Posts: 1198
Joined: Tue 05 Aug 2008, 18:12
Location: UK

#8 Post by davesurrey »

FWIW,
These last few months I have tried several puppies (currently have loaded 412 full install. 412 frugal, 4.2 alpha, 4.0 dingo-plus frugal and puppy ferrari full install.)

They all shutdown okay on my new laptop, old (7 years?) laptop, netbook and AsRock mobo main PC.

None of them shuts down on my test PC (a K7S5A mobo and SiS chipset.)
Unless I add acpi=force to the kernel line in grub. In which case they shut down just fine.

This test PC which is running puppy also boots into ubuntu 8.10, debian lenny, arch, fedora10 and has also had suse11, mandriva 9 and 10, Mepis ....... all of which shut down okay.


Not sure if this will fix it for others but may be worth a try.

Cheers
Dave

EDIT:
wrote this before I saw Sages's comments. But at least it verifies exactly what he was saying about acpi=force.

Sage
Posts: 5536
Joined: Tue 04 Oct 2005, 08:34
Location: GB

#9 Post by Sage »

Yes, for anyone wanting to check, I established that SiS chipsets were often the culprit, but other folks identified another problem child (VIA?). Recent, 64bit and smp-based, systems do not exhibit the problem, SiS or otherwise.
No reason to be complacent, however, as the K7 series were the most popular boards ever build and there are millions still out there in the field. That one had the fastest and fully integrated (N- & S- bridges) SiS735 chipset, with its own idiosynchrasies - but none since have even approached its speed. Its successor, the SiS748, was almost as successful and was installed on the L7S7A as well as the PCChips 848. These boards, which are virtually interchangeable have proved the most robust I've ever seen, and on present assessment, are likely to be close to indestructible. Indeed, the latter are so good that I cannot find any technical justification for moving to anything later than a SktA board. Don't call me an ostrich, multicore cpu and 64bit code may be fun, but any real gain is illusory. Just in case there are those who doubt where I stand, I do the fun things too!
In short, don't give up on this shutdown issue just yet!

Bruce B

#10 Post by Bruce B »

Sage,

I've had erratic success with reboot and poweroff. So far I've just lived with it. The erratic nature is what makes trouble shooting harder. You don't know if you have a real fix until enough time elapses.

The first change I made yesterday was sourcing the rc.shutdown script rather than run it as a script. No harm done, and it works, but I don't know if it really fixed anything.

I also tried another version of shutdown to replace the busybox one, but it refused to work because it couldn't tell the run level, which makes sense as Puppy doesn't use run levels.

Bruce

Sage
Posts: 5536
Joined: Tue 04 Oct 2005, 08:34
Location: GB

#11 Post by Sage »

Ah yes! I'd forgotten that some Puppy versions reboot when commanded to shutdown on some systems.

Bruce B

#12 Post by Bruce B »

Sage,

I've worked on this some today. Here's sorta a summary.

I think it would hang in rc.shutdown. The reason why is there is an on screen echo I should have seen but didn't.

I started to review and edit rc.shutdown, but between it and another file it runs there are circa 39,000 words.

Not all the commands execute, not by a long stretch. Part of Puppy's design is versatility in terms of installation types. This really shows up in the file rc.shutdown.

1) Lots of conditional checks and branching and executing according to the conditions. Doing some very different things for varying installation types.

2) The file as accrued over the years as features change.

3) It is extremely easy to introduce a bug in such a script, although nothing caught my eye. (Except #4)

4) One problem area, potentially serious and should be modified. But nothing affecting my shutdown process.

5) It is just as easy to unintentionally omit something, those are often harder to note on review, because nothing is there when there should be.

--------------------

Puppy developers are at an extreme disadvantage over an individual user. They have to write for a broad range of conditions.

On the other hand I know exactly what I have, where things are placed, what might be mounted or running. So it is very easy for me to write a shut down script for my setup, which works beautifully, but won't work on someone else's.

------------------------

You've seen the interactive interface that lets you make a pup_save file on shutdown, the size, encryption, location and etc.

It's only used one time, yet it comes from rc.shutdown. I think it would be more economical to put the 'pup_save' portion in another file to be called only on that occasion when it is needed.

---------------------------

Basically only two things happen:

rc.shutdown does its thing
then
busybox shutdown does its

You could probably put an echo or a redirect command with a time stamp or something at the point where rc.shutdown should stop for you.

Then if it fails to shutoff busybox might be the culprit and yes, I'd use the -f switch previously mentioned.

---------------------

I wrote my own shutdown script it's 192 words and works perfectly so far.

Bruce

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#13 Post by big_bass »

Bruce_B
I also tried another version of shutdown to replace the busybox one, but it refused to work because it couldn't tell the run level, which makes sense as Puppy doesn't use run levels.
yeah I tried that too :?

Your comments about better rc shutdown economy such as having sub routines scripts being called always makes the code easier to understand and is a good suggestion

but rc.shutdown isn't at fault--> * I left it alone and was able to shut down correctly without sending a forced condition to the kernel


it is in the kernel .config + the initrd.gz

the /sbin/init link to busybox
is needed and that also is working correctly

/etc/rc.d/rc.sys is also fine
one line of code is fishy ?? well to me anyway :D

line number #145
[ ! -d /proc/acpi ] && modprobe apm #v406

if I run that I get this output (notice the different kernel name and number I have )

sh-3.00# modprobe apm
FATAL: Error inserting apm (/lib/modules/2.6.24.5sfs-smp/kernel/arch/x86/kernel/apm.ko): No such device
sh-3.00#

but I confirmed that I have that module and it works
/lib/modules/2.6.24.5sfs-smp/kernel/arch/x86/kernel/apm.ko

that said it still works and I didn't edit anything there

I also posted the diff between my kernel config and puppy
in another thread in 4.11 bugs if you or anyone else would like to view it for a clue


big_bass

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#14 Post by disciple »

It seems unlikely to me that the shutdown script would be at fault if it works with the same type of install on a different machine. One of my machines (A generic PC that is supposed to be ACPI enabled) shuts down OK, but in Puppy 1.x I could only get it to suspend using APM instead of ACPI, and I can't get it to suspend at all with Puppy 4.x.
Another machine (A weird Compaq :( that is supposed to be ACPI enabled) with the same type of install (well, the same install, copied across) won't shut down or suspend using APM or ACPI.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#15 Post by Pizzasgood »

big_bass wrote:Bruce_Bsh-3.00# modprobe apm
FATAL: Error inserting apm (/lib/modules/2.6.24.5sfs-smp/kernel/arch/x86/kernel/apm.ko): No such device
sh-3.00#

but I confirmed that I have that module and it works
/lib/modules/2.6.24.5sfs-smp/kernel/arch/x86/kernel/apm.ko
I think that error also appears when you have the module but not the device it is supposed to be used for. I had tried loading a Toshiba module on my Dell laptop and it gave me a "No such device" error, but the person I was helping ran it on his Toshiba and it worked fine.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#16 Post by big_bass »

Pizzasgood wrote:I think that error also appears when you have the module but not the device it is supposed to be used for. I had tried loading a Toshiba module on my Dell laptop and it gave me a "No such device" error, but the person I was helping ran it on his Toshiba and it worked fine.
yeah thats it I have the module it not being used

thanks pizasgood

the good news is it does shutdown correctly

I just need to know why not on an official puppy
this really needs to get fixed

I m glad there are others interested in this too
thanks


big_bass
Last edited by big_bass on Thu 29 Jan 2009, 13:59, edited 1 time in total.

Sage
Posts: 5536
Joined: Tue 04 Oct 2005, 08:34
Location: GB

#17 Post by Sage »

this really needs to get fixed
Along with one or two others, I've been reporting this defect for years. This is a unique Puppy feature. In principle, a direct comparison of Puppy code with how other developers do things should provide the answer? But who am I to ....

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#18 Post by big_bass »

Sage wrote:
this really needs to get fixed
Along with one or two others, I've been reporting this defect for years. This is a unique Puppy feature. In principle, a direct comparison of Puppy code with how other developers do things should provide the answer? But who am I to ....
Sage or anyone else who had shut down problems
looks like just a few of us had this problem ?

try this CD and let me know if it now powers off your puppy box

puppy based 4.12 with the 2.6.27.7 SMP kernel
Slaxer_Pup-412.iso.md5.txt
d0668f33bc5a2c25c59df8230f152e6a Slaxer_Pup-412.iso

85MB lzm compressed
http://puppylinux.asia/tpp/big_bass/Sla ... up-412.iso

Code: Select all

puppy
linux
when asked for the password



this live CD does poweroff my box :D

Joe
Last edited by big_bass on Thu 23 Apr 2009, 14:00, edited 1 time in total.

davesurrey
Posts: 1198
Joined: Tue 05 Aug 2008, 18:12
Location: UK

#19 Post by davesurrey »

Hi big_bass,
I have been one of the "few" who have had problems with shutdown; please see my post in this thread dated 27 jan 09.
So I downloaded your pup tonight and for the very first time my test PC shuts down and ctrl+alt+backspace reboots the x-server (rather than crashes the system) without needing to add acpi=force to grub.

As an aside it seems to boot much quicker than standard 410, 412, 420. Not sure how fair a comparison this is though. Sorry, very tired tonight but will try to time it tomorrow to compare.

Congratulations! Whatever you did, please keep it up! :)

EDIT:
In the light of day I did a quick and dirty test and sorry but it doesn't boot any faster. Perhaps I was fooling myself by the speed at which the text flew by on the boot-up screen.

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#20 Post by big_bass »

davesurrey

Hi big_bass,
I have been one of the "few" who have had problems with shutdown; please see my post in this thread dated 27 jan 09.
So I downloaded your pup tonight and for the very first time my test PC shuts down and ctrl+alt+backspace reboots the x-server (rather than crashes the system) without needing to add acpi=force to grub.



great news
thanks for your report
http://www.youtube.com/watch?v=KdABlGoar9g
big_bass

Post Reply