Bug 57955 - apmscript messes up terminal beep
apmscript messes up terminal beep
Product: Red Hat Linux
Classification: Retired
Component: apmd (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Aaron Brown
Depends On:
  Show dependency treegraph
Reported: 2002-01-03 04:50 EST by eric_backus
Modified: 2007-04-18 12:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-01-24 17:52:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to fix problem (2.90 KB, patch)
2002-01-03 04:59 EST, eric_backus
no flags Details | Diff

  None (edit)
Description eric_backus 2002-01-03 04:50:41 EST
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 
go away.

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):

How Reproducible:

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.

Actual Results:

Expected Results:

Additional Information:
Comment 1 eric_backus 2002-01-03 04:59:47 EST
Created attachment 41691 [details]
Patch to fix problem
Comment 2 Bernhard Rosenkraenzer 2002-02-26 13:00:28 EST
 Fixed in 3.0.2-6

Note You need to log in before you can comment on or make changes to this bug.