public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* Re: System hang when trying to enter sleep/standby state
@ 2003-02-13 16:28 Jens Haug
       [not found] ` <200302131628.h1DGSID27482-sBhUd1W9t4xfrO0PeCDDO4ECbGbo6+O1OOFObY0sJ7w@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Jens Haug @ 2003-02-13 16:28 UTC (permalink / raw)
  To: mochel-3NddpPZAyC0; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

> > > I would recommend never, ever doing 'echo 5 > /proc/acpi/sleep', 
> > > especially if you're trying to suspend the system. 
> > 
> > It's not worse than pushing the power button on a normal system
> > (or hold the power button on an ACPI system).
> 
> You're absolutely right. But, most people do those things deliberately, 
> and know the consequences. 

Do you think someone becomes root and does an "echo 5 > /proc/acpi/sleep"
by accident? ;-)

> Think about how this thread started: $Random User sees his system doesn't
> suspend when writing '4' to that file, so he tries every other value.

This is not a random user. This is someone who plays around with his
system while testing beta kernel drivers. 
The random user at this stage doesn't know about acpi at all. The
random user in the future (when acpi comes with Suse or RedHat Linux 
out of the box) will only use the GUIs to suspend and such. So there's
no problem at all, I think.

> That's a perfectly valid thing to do, and the kernel has no right to crash
> when he does something like that. 

The kernel has the right to do what the specs say. There might be 
systems where this is wanted (which boot from read only medium and
need a really fast poweroff).

> Which is possible, but ludicrous. If you want to halt your system, use
> halt(1). We do not need to invent new ways to do old things, especially 
> when they are dangerous. 

This is a new thing: You can power off in less than a second.

> > The regular user can't write anything to that file - this must be
> > root. He's supposed to know what he's doing. If he wants to turn the
> > machine off without halting the system, then that's his choice. Think
> > of something like an embedded system to control a machine. Many 
> > machines have an emergency off whith a huge red button. This is the
> > software version of this red button. Your software can press this
> > if you thing that's necessary.
> 
> That's crap. 

You're too kind.

> For one, most systems are single-user systems. 

Do you want a kernel for most systems or a general purpose, scalable
OS? You're thinking the windows way. I'm glad that Linux is better.

> That was 
> certainly the case for the guy that crashed his system by writing to that 
> file. So, by definition, root knows only as much as the most knowledgable 
> user. 

No, by definition root is the administrator and knows what he's doing.
It might be true that there are many people out there who do not know
what they are doing - but they hardly ever become root in the console
and echo numbers anywhere in /proc. And if they do so - well, that's
their fault. 

> For another, as mentioned before, we have safe mechanisms for halting a 
> system. See 'man 1 halt'. 

You have *no* other mechanism to turn your box off in less than one
second.

> > I'd like to have it in. I don't know what I could ever use it for,
> > but I'd really prefer to have this possibility.
> 
> Listen to yourself. Also, take into account your design philosophies 
> concerning Linux and other operating systems. This comment is poorly 
> thought out and completely invalid.

Will you just keep on saying my comment was no good or could you
maybe tell me what exactly is wrong with it?

> We don't keep features around because they might be useful to someone at 
> some point in the future. We do what is necessary and nothing more. 

Oh, do we? We don't even know what people are doing. This is not a
set top box. This is an operating system. People build all kinds of
stuff from this. Do you think you know what is necessary for *all*
the things that can be done with Linux?

> We also don't leave gaping holes for users to accidentally screw 
> themselves. Deliberately, sure. But, not on accident, that's just rude. 

Oops, I typed "sudo echo 5 > /proc/acpi/sleep" by accident again.
Sometimes it just happens. ;-)


Jens

-- 
Jens Haug
IKFF Universität Stuttgart              Tel. 0711/685-6422
Pfaffenwaldring 9                       Fax  0711/685-6356
70550 Stuttgart	                haug-X6ztD3ggwzuBAmxm6OvjtTjhTm2NLCe8@public.gmane.org



-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: System hang when trying to enter sleep/standby state
@ 2003-02-14  7:53 Jens Haug
       [not found] ` <200302140753.h1E7rOD00889-sBhUd1W9t4xfrO0PeCDDO4ECbGbo6+O1OOFObY0sJ7w@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Jens Haug @ 2003-02-14  7:53 UTC (permalink / raw)
  To: mochel-3NddpPZAyC0; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

> > > Think about how this thread started: $Random User sees his system doesn't
> > > suspend when writing '4' to that file, so he tries every other value.
> > 
> > This is not a random user. This is someone who plays around with his
> > system while testing beta kernel drivers. 
> > The random user at this stage doesn't know about acpi at all. The
> > random user in the future (when acpi comes with Suse or RedHat Linux 
> > out of the box) will only use the GUIs to suspend and such. So there's
> > no problem at all, I think.
> 
> The GUIs should not, and will not, support writing directly to that file. 
> In the perfect, abstract future, we will not even have /proc/acpi/sleep, 
> we will have an abstracted for entering sleep states. 
> 
> Note that GUIs already support shutting down safely. 

Then what's your problem? The random user will use these GUIs and 
will not crash his system this way.

> As a whole, we do enforce a minimum amount of policy we do not want to 
> lose users data. And that will happen. 

This happens every day. People use "rm -r" in the wrong directory,
people accidentally pull the plug, people mess around with hdparm...
There are thousands of ways to lose data. You can't change that.
Echoing 5 into /proc/acpi/sleep is one of the *least* likely things.
We're discussing a problem that doesn't really exist.

> Let me repeat, and try and get you to listen: 
> 
> You *will* corrupt your data if you do not flush the disk buffers. 
> You *will* corrupt your data if you do not flush the disk buffers. 
> You *will* corrupt your data if you do not flush the disk buffers. 

So? I think I turned my box off a hundred times without flushing
the disk buffers while testing acpi, swsusp and cpufreq. These
things do happen when you mess around with beta kernel drivers.
One really annoying thing is that my box freezes when I push Fn+F8.
And this really happens by accident, because Fn+F7 turns the LCD
backlight off. 

> You are right, though, if they start writing random values into /proc, it 
> is their fault. But, the random range of numbers to be written to  
> /proc/acpi/sleep is small, and not that random. The documentation suggests 
> that some values work and others don't. It's human nature to exercise 
> curiosity and experiment with other close values. If they do, which they 
> are so likely to, I do not want to see them cause any harm to themselves. 

I do. Because, as you said, the doku suggest that *some don't work*.
So if they experiment out of curiosity, well then it's all their 
fault. Maybe the doku could be more explicit on this (and say that
S5 *does* work, but should normally not be used).

> This particular item is dangerous and will be removed from the kernel.

Is it up to you to decide that? ;-)


Jens

-- 
Jens Haug
IKFF Universität Stuttgart              Tel. 0711/685-6422
Pfaffenwaldring 9                       Fax  0711/685-6356
70550 Stuttgart	                haug-X6ztD3ggwzuBAmxm6OvjtTjhTm2NLCe8@public.gmane.org



-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: System hang when trying to enter sleep/standby state
@ 2003-02-14  7:50 Jens Haug
  0 siblings, 0 replies; 19+ messages in thread
From: Jens Haug @ 2003-02-14  7:50 UTC (permalink / raw)
  To: dbenham-FG1iuTdj8bisTnJN9+BGXg
  Cc: mochel-3NddpPZAyC0, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

> How about making it a .config option, default to "unset" and with a big
> warning in the help?

Best solution IMHO.



Jens

-- 
Jens Haug
IKFF Universität Stuttgart              Tel. 0711/685-6422
Pfaffenwaldring 9                       Fax  0711/685-6356
70550 Stuttgart	                haug-X6ztD3ggwzuBAmxm6OvjtTjhTm2NLCe8@public.gmane.org



-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: System hang when trying to enter sleep/standby state
@ 2003-02-13  6:59 Jens Haug
       [not found] ` <200302130659.h1D6x7D22714-sBhUd1W9t4xfrO0PeCDDO4ECbGbo6+O1OOFObY0sJ7w@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Jens Haug @ 2003-02-13  6:59 UTC (permalink / raw)
  To: mochel-3NddpPZAyC0, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

> I would recommend never, ever doing 'echo 5 > /proc/acpi/sleep', 
> especially if you're trying to suspend the system. 

It's not worse than pushing the power button on a normal system
(or hold the power button on an ACPI system).

> ACPI should not allow a user to write '5' to that file. It used to be that 
> way, but someone clever decided that that interface should support _all_ 
> sleep states. (It might have been me, in one of my finer moments). 

The regular user can't write anything to that file - this must be
root. He's supposed to know what he's doing. If he wants to turn the
machine off without halting the system, then that's his choice. Think
of something like an embedded system to control a machine. Many 
machines have an emergency off whith a huge red button. This is the
software version of this red button. Your software can press this
if you thing that's necessary.

> Andy, I recommend removing that from 2.4, and I'll send you a patch for 
> 2.5..

I'd like to have it in. I don't know what I could ever use it for,
but I'd really prefer to have this possibility.


Jens

-- 
Jens Haug
IKFF Universität Stuttgart              Tel. 0711/685-6422
Pfaffenwaldring 9                       Fax  0711/685-6356
70550 Stuttgart	                haug-X6ztD3ggwzuBAmxm6OvjtTjhTm2NLCe8@public.gmane.org



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 19+ messages in thread
* System hang when trying to enter sleep/standby state
@ 2003-02-08 15:41 Erik van Pienbroek
       [not found] ` <026401c2cf88$9b26d330$0a0110ac-QyX2VyNvpUU@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Erik van Pienbroek @ 2003-02-08 15:41 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hello,

Since a few days I've got an new notebook, an Acer Aspire 1406LC (specs
can be found at
http://www.acer.nl/vi/page0.jsp-page78,,79,3,,,104,,,1623,,,,,,,,,,,,,,,,,10
4,3,,3,3,,,,3,,,,3,,,,3,,,,,,,,,,,3,,,0,0,3,,298126721.htm ).
Under Windows 2000 the sleep state works good (this has nothing to do with
ACPI if I'm right).
The standby state works also good.

Now I tried to use the ACPI functions under Linux.
I've installed Redhat 8.0 and compiled the latest 2.4 kernel with the latest
pre-patch (2.4.21-pre4) and the latest ACPI patch(20030125).
Because there isn't much documentation available about the acpi functions I
experimented a bit with the files in the /proc/acpi directory.

With my previous notebook I could issue the command 'apmsleep 12:00' to the
notebook which would let it suspend till 12:00.
Now with my notebook, I can't issue this command anymore (cause my new
notebook doesn't support APM, only ACPI).
Does anybody know if there is an tool/command to let the notebook suspend
till an specified time ?

I've seen there is a file named /proc/acpi/alarm there with an date+time in
it.
I tried to echo an date+time in it, but as soon as the command executed, my
notebook would hang.
Now I tried to install the 2.5.59 kernel with ACPI patch 20030125, but as
soon as the machine booted it would hang.
Now I tried the newest 2.5.59-bk2 patch and my notebook now normally boots.
The hang with the /proc/acpi/alarm is now solved, but as soon as the
date+time is set the
notebook continues to work normally and when the time is reached the
notebook would hang.
The /proc/acpi/sleep same story..if I echo '4' in it the notebook would
continue to work..if I echo '3' the
notebook would hang...with echo '5' the notebook would also hang...
Is this because the ACPI support isn't complete yet or am I doing something
wrong ?

Thanks in advance,

Erik van Pienbroek



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2003-02-17  5:40 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-13 16:28 System hang when trying to enter sleep/standby state Jens Haug
     [not found] ` <200302131628.h1DGSID27482-sBhUd1W9t4xfrO0PeCDDO4ECbGbo6+O1OOFObY0sJ7w@public.gmane.org>
2003-02-13 16:46   ` Patrick Mochel
     [not found]     ` <Pine.LNX.4.33.0302131031290.1133-100000-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2003-02-13 21:32       ` Karol Kozimor
2003-02-13 22:09       ` Pavel Machek
2003-02-13 19:00   ` Darren Benham
     [not found]     ` <51181.64.164.111.5.1045162852.squirrel-FG1iuTdj8bisTnJN9+BGXg@public.gmane.org>
2003-02-13 19:02       ` Matthew Wilcox
  -- strict thread matches above, loose matches on Subject: below --
2003-02-14  7:53 Jens Haug
     [not found] ` <200302140753.h1E7rOD00889-sBhUd1W9t4xfrO0PeCDDO4ECbGbo6+O1OOFObY0sJ7w@public.gmane.org>
2003-02-14 14:38   ` Patrick Mochel
     [not found]     ` <Pine.LNX.4.33.0302140836140.1067-100000-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2003-02-17  5:40       ` Christian Zoz
2003-02-14  7:50 Jens Haug
2003-02-13  6:59 Jens Haug
     [not found] ` <200302130659.h1D6x7D22714-sBhUd1W9t4xfrO0PeCDDO4ECbGbo6+O1OOFObY0sJ7w@public.gmane.org>
2003-02-13 16:01   ` Patrick Mochel
2003-02-08 15:41 Erik van Pienbroek
     [not found] ` <026401c2cf88$9b26d330$0a0110ac-QyX2VyNvpUU@public.gmane.org>
2003-02-08 16:19   ` Jean-Pierre Schwickerath
2003-02-08 18:59   ` Pavel Machek
     [not found]     ` <02bc01c2d030$ac23f340$0a0110ac@erik>
     [not found]       ` <20030209114731.GD26151@atrey.karlin.mff.cuni.cz>
     [not found]         ` <20030209114731.GD26151-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2003-02-11 18:10           ` Erik van Pienbroek
     [not found]             ` <1044987042.1149.4.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2003-02-12 16:47               ` Patrick Mochel
     [not found]                 ` <Pine.LNX.4.33.0302121042480.1479-100000-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2003-02-12 20:36                   ` Karol Kozimor
     [not found]                     ` <20030212203637.GA32274-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
2003-02-12 21:08                       ` Patrick Mochel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox