Re: ThinkPad 600, kernel 2.2.17pre6, and hibernation

2000-07-19 Thread Thomas Hood
> This is just to inform ThinkPad 600 users that I
> have tested the latest kernel, 2.2.17pre6, and can
> report that SFAICT the hibernation problem has been
> solved.

I forgot to mention in my previous message that I had to
make a change to /etc/apm/apmd_proxy in order to get
suspend and hibernate working properly.  Specifically,
I had to remove the part of the script that checks to
see if the machine is on AC power and the request is
a system suspend, and exits in that case.  On the
ThinkPad, Fn-F4 and Fn-F12 generate system suspends
and so do the "tpctl --suspend" and "tpctl --hibernate"
commands; we don't want apmd_proxy to ignore these.

I have filed a bug report against the apmd package
with the above information.

The reason it is important for the /etc/apm/event.d/*
scripts to be run on suspend or hibernate is that,
at present, sound programs must be stopped in order
to prevent them from generating terrible noises after
the resume, before the ALSA drivers have had a chance
to reprogram the sound chip registers.  The 
/etc/apm/event.d/alsa script in the current woody alsa-base
package does just this.  It is to be hoped that someday
in the future the ALSA driver itself will gag playback
on suspend and un-gag it on resume so that the
/etc/apm/event.d/alsa script won't be necessary.
(I have asked the alsa developers to implement this
gagging.  My latest info is that IBM has paid LinuxCare
to modify the ALSA drivers for its upcoming ThinkPad T20
with Caldera Linux preload, and that the resulting mods
will be fed back to the ALSA project.  Good news.)

Thomas Hood
[EMAIL PROTECTED]

My (RedHat with a dab of Debian) Linux on ThinkPad 600 page: 
http://panopticon.csustan.edu/thood/tp600lnx.htm
ThinkPad Configuration Tools for Linux home page:
http://panopticon.csustan.edu/tpctl/tpctlhome.htm



ThinkPad 600, kernel 2.2.17pre6, and hibernation

2000-07-12 Thread Thomas Hood
This is just to inform ThinkPad 600 users that I
have tested the latest kernel, 2.2.17pre6, and can
report that SFAICT the hibernation problem has been
solved.

With kernel 2.2.15, when one would request hibernation
the machine would hang up for a few seconds, beep, and
then hibernate.  But the problem was more serious than
there being a delay: at the time of the beep the APM
software was also falsely carrying out a "resume"
sequence, with the result that the machine was not
properly prepared for hibernation.  The ThinkPad 600
needs to be prepared for sedation by stopping all
programs generating sounds, so that on resume they
will not attempt to make sounds before the ALSA
cs4236 driver has had a chance to restore the sound
chip register contents which are lost during a
sedation.  (Since release 0.5.8 the ALSA cs4236 driver
restores sound chip registers on resume.  The current
Debian alsa-base package includes the script
/etc/apm/event.d/alsa which  STOPs and CONTs sound
processes before and after sedate and resume.  I like
Debian.)

The release notes for Alan Cox's Linux 2.2.16pre5
describe changes to the APM driver designed to handle
an IBM ThinkPad BIOS bug.  The bug is that "Thinkpads
keep sending SUSPEND events until something else happens."
A quick look at the patch reveals that the 
APM_IGNORE_MULTIPLE_SUSPEND configuration option has been
removed and the driver will now reject multiple suspends
all the time.  This, we may presume, is what has fixed
the problem described above.

Thomas Hood