Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 24 Oct 2014, 21:00
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Why Puppy is the only distro not to shut down?
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
Sage

Joined: 04 Oct 2005
Posts: 4797
Location: GB

PostPosted: Mon 26 Jan 2009, 12:51    Post_subject:  Why Puppy is the only distro not to shut down?  

At last a handle on this paradox? On the one hand, I have no detailed knowledge about these things, but this extract:
Quote:
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?
Back to top
View user's profile Send_private_message 
disciple

Joined: 20 May 2006
Posts: 6449
Location: Auckland, New Zealand

PostPosted: Mon 26 Jan 2009, 15:26    Post_subject:  

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 Sad
_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send_private_message 
muggins

Joined: 20 Jan 2006
Posts: 6688
Location: lisbon

PostPosted: Mon 26 Jan 2009, 19:16    Post_subject:  

http://www.themercury.com.au/article/2009/01/27/51865_tasmania-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.
Back to top
View user's profile Send_private_message 
gerry

Joined: 26 Jul 2007
Posts: 946
Location: England

PostPosted: Tue 27 Jan 2009, 04:49    Post_subject:  

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
Back to top
View user's profile Send_private_message 
Sage

Joined: 04 Oct 2005
Posts: 4797
Location: GB

PostPosted: Tue 27 Jan 2009, 11:14    Post_subject:  

Quote:
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.
Back to top
View user's profile Send_private_message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Tue 27 Jan 2009, 12:04    Post_subject:  

Sage wrote:
Quote:
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
Back to top
View user's profile Send_private_message 
Sage

Joined: 04 Oct 2005
Posts: 4797
Location: GB

PostPosted: Tue 27 Jan 2009, 12:46    Post_subject:  

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.

Edited_time_total
Back to top
View user's profile Send_private_message 
davesurrey

Joined: 05 Aug 2008
Posts: 1201
Location: UK

PostPosted: Tue 27 Jan 2009, 12:50    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
Sage

Joined: 04 Oct 2005
Posts: 4797
Location: GB

PostPosted: Tue 27 Jan 2009, 13:07    Post_subject:  

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!
Back to top
View user's profile Send_private_message 
Bruce B


Joined: 18 May 2005
Posts: 11130
Location: The Peoples Republic of California

PostPosted: Tue 27 Jan 2009, 16:25    Post_subject:  

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

_________________
New! Puppy Linux Links Page
Back to top
View user's profile Send_private_message 
Sage

Joined: 04 Oct 2005
Posts: 4797
Location: GB

PostPosted: Wed 28 Jan 2009, 07:30    Post_subject:  

Ah yes! I'd forgotten that some Puppy versions reboot when commanded to shutdown on some systems.
Back to top
View user's profile Send_private_message 
Bruce B


Joined: 18 May 2005
Posts: 11130
Location: The Peoples Republic of California

PostPosted: Wed 28 Jan 2009, 09:22    Post_subject:  

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

_________________
New! Puppy Linux Links Page
Back to top
View user's profile Send_private_message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Wed 28 Jan 2009, 13:12    Post_subject:  

Bruce_B

Quote:

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 Confused

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 Very Happy

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
Back to top
View user's profile Send_private_message 
disciple

Joined: 20 May 2006
Posts: 6449
Location: Auckland, New Zealand

PostPosted: Wed 28 Jan 2009, 19:41    Post_subject:  

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 Sad 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.

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send_private_message 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Wed 28 Jan 2009, 23:48    Post_subject:  

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.
_________________
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

Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0974s ][ Queries: 11 (0.0036s) ][ GZIP on ]