Red Hat Bugzilla – Bug 57955
apmscript messes up terminal beep
Last modified: 2007-04-18 12:38:52 EDT
Description of Problem:
1. When running in a Linux terminal, not in X, resuming from suspend
always messes up the terminal beep (the beep is silent when it sounded
fine before the suspend). This caused by a problem in
/etc/sysconfig/apm-scripts/apmscript. The problem is that the
/etc/sysconfig/apmd config file sets TERMINALBEEP to "no" (which is
correct), but apmscript checks for whether the variable is non-null. As
a result, apmscript tries to call setterm -blength $BEEPLENGTH, bug
BEEPLENGTH is not defined anywhere and this causes the terminal beep to
I believe the problem is apmscript and not the apmd config file, because
there are several other variables in the config file that also use "yes"
and "no" as the possible values.
2. apmscript calls apmcontinue, but it doesn't pass all the original
arguments that apmscript had. This is a problem for resume events - the
apmcontinue script gets an argument of "resume", but doesn't get the
second argument "suspend" or "standby", so apmcontinue can't tell which
kind of resume this is.
This actually matters on my laptop, which needs the keyboard repeat rate
restored after resuming from suspend but not from standby. (The need to
restore the repeat rate is probably a BIOS bug.)
I'm attaching a simple patch which fixes both these problems.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Suspend the system
2. Resume the system
3. Go to Linux console (not X window) and type something that should
beep, like a backspace or control-G. Notice it doesn't beep.
4. Create an apmcontinue script that does different things for resume
from suspend versus resume from standby.
5. Try both suspend and standby, and notice that the script can't tell
the difference between them.
Created attachment 41691 [details]
Patch to fix problem
Fixed in 3.0.2-6