Bug 57375

Summary: Suspend with X display hangs on Dell CPxJ running X
Product: [Retired] Red Hat Linux Reporter: Matthew Saltzman <mjs>
Component: apmdAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED WORKSFORME QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-01-19 22:32:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Matthew Saltzman 2001-12-11 02:02:15 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011120

Description of problem:
apmd with CHANGEVT=7 in /etc/sysconfig/apmd doesn't change *from* X 
display *to* text console before suspend.  On some machines (such as Dell 
CPxJ), this causes the machine to freeze during suspend.  Powering off 
and on causes reboot from scratch, including fsck.

Version-Release number of selected component (if applicable): apmd-3.0final-34

How reproducible:

Steps to Reproduce:
1. From X display, press [Fn]-[Esc] to suspend.

Actual Results:  The machine blanks the display and freezes with the power
light on.  When the power button is pressed, the machine powers off completely.

Expected Results:  The display should switch from the X display to VC-1
before initiating the suspend sequence.  Suspend from a text VC works
correctly on the CPxJ.

Additional info:

After switching to a text VC manually and suspending, the machine
completes the suspend operation normally.  Powering back on brings the
machine back *and* switches back to VC-7 and the X display, as expected.

This operation worked correctly in RH 7.1.

Comment 1 Bernhard Rosenkraenzer 2002-01-17 21:33:19 UTC
This is odd, because the apmscript still does the exact same thing:

        [ "x`pidof X`" != x ] && {
                [ "$CHANGEVT" != "0" ] && chvt 1

Also, I can't reproduce this problem (using different hardware, though).

The ideal fix is to have Dell fix their BIOS (a sane notebook can suspend without switching to text mode); looking for a workaround...

By any chance, does adding a delay after the chvt command help
(try inserting "sleep 2s" after the

               [ "$CHANGEVT" != "0" ] && chvt 1

Might be a race condition.

Comment 2 Matthew Saltzman 2002-01-19 22:32:37 UTC
>The ideal fix is to have Dell fix their BIOS (a sane notebook can suspend
>without switching to text mode)

Yes, but: (1) It doesn't happen in Win2K.  (2) Dell won't support Linux on this
machine for me.  Maybe you'd have better luck.

I tried your sleep suggestion and a few other things, and I learned the following:

The system is not freezing.  But if I suspend from X, it does take about 30
seconds to shut off.  When I restart it the first time, it shuts off again, by
itself!  The next time I turn it on, it starts up fine.

If I change to vc1 manually, it suspends in a couple of seconds, and comes right
back to vc7 on powerup.

Make of that what you will.

Comment 3 Matthew Saltzman 2002-02-05 03:58:43 UTC
Well, I have to give up on this bug.  My CPxJ has been replaced by a Latitude
C610.  I'm running the Rawhide kernel and Mike Harris's XFree86-4.2 on that
machine, and it suspends and resumes flawlessly (except for the NIC, but that's
another story--bug to come, I think).

I won't have the CPxJ to test, and as I seem to be the only complainant, I guess
you might as well close this one.  I set the status to WORKSFORME because it
does now for both of us, but if something else would be more accurate, feel free.