From root@fh-karlsruhe.de  Mon Oct 18 22:35:29 2004
Return-Path: <root@fh-karlsruhe.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6C77816A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 18 Oct 2004 22:35:29 +0000 (GMT)
Received: from rz06.fh-karlsruhe.de (rz06.FH-Karlsruhe.DE [193.196.64.6])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8A14843D55
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 18 Oct 2004 22:35:28 +0000 (GMT)
	(envelope-from root@fh-karlsruhe.de)
Received: from rz-tp600e.fh-karlsruhe.de ([193.196.65.252] helo=RZ-TP600E127.FH-Karlsruhe.DE)
	by rz06.fh-karlsruhe.de with esmtp (Exim 4.42)
	id 1CJg6B-000a6C-3K; Tue, 19 Oct 2004 00:35:27 +0200
Received: from root by RZ-TP600E127.FH-Karlsruhe.DE with local (Exim 4.42 (FreeBSD))
	id 1CJg6A-0000tI-Sk; Tue, 19 Oct 2004 00:35:26 +0200
Message-Id: <E1CJg6A-0000tI-Sk@RZ-TP600E127.FH-Karlsruhe.DE>
Date: Tue, 19 Oct 2004 00:35:26 +0200
From: Ralf Wenk <RZ-FreeBSD1004@fh-karlsruhe.de>
Reply-To: Ralf Wenk <RZ-FreeBSD1004@fh-karlsruhe.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Ralf Wenk <RZ-FreeBSD1004@fh-karlsruhe.de>
Subject: apm suspend handling partial broken with 5.3-STABLE
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         72850
>Category:       kern
>Synopsis:       apm suspend handling partial broken with 5.3-STABLE
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 18 22:40:26 GMT 2004
>Closed-Date:    Sat Sep 25 17:19:48 UTC 2010
>Last-Modified:  Sat Sep 25 17:19:48 UTC 2010
>Originator:     Ralf Wenk
>Release:        FreeBSD 5.3-STABLE i386
>Organization:
FH Karlsruhe, University of Applied Sciences
>Environment:
System: FreeBSD rz-tp390x 5.3-STABLE FreeBSD 5.3-STABLE #0: Sun Oct 17 19:56:49 CEST 2004 root@rz-tp390x:/usr/obj/usr/src/sys/GENERIC i386
on a IBM ThinkPad 390X

>Description:
In FreeBSD 5.3-STABLE apm suspend disables the operating system but does
not suspend the hardware. Machine does not respond to any key and must
be crashed by powering off. The problem occures regardless if the special
funktion keys Fn+F4 (keyboard suspend) or apm -z is used.

FreeBSD 5.2.1-RELEASE-p10 works as expected.

If apm management is not enabled using amp -z results in a ioctl error.
Using Fn+F4 results in a waiting suspend call show by the blinking
suspend mode LED. If you now enable apm management by apm -e 1 the
machine suspends and could be resumed as expected. This behavior
can be repeated several times if you disable apm management every
time before using Fn+F4 and enable it afterwards.

There are no "detached" messages from cardbus device drivers on the
console when the machine stops working.

ACPI is broken on this old hardware as well, so switching vom apm to
ACPI is not possible.

>How-To-Repeat:
Boot into single user mode. Mount /usr (readonly) to get access to
/usr/sbin/apm.
Press Fn+F4. Now call apm -e 1. Machine suspends. Press Fn to resume.
Call apm -e 0.
Press Fn+F4. Now call apm -e 1. Machine suspends. Press Fn to resume.
Press Fn+F4. Machine stops working. Use power switch.

	
>Fix:

	
>Release-Note:
>Audit-Trail:

From: Gleb Smirnoff <glebius@cell.sick.ru>
To: Ralf Wenk <RZ-FreeBSD1004@fh-karlsruhe.de>
Cc: sos@freebsd.org, freebsd-gnats-submit@freebsd.org
Subject: kern/72850: apm suspend handling partial broken with 5.3-STABLE
Date: Sun, 12 Dec 2004 01:05:13 +0300

   Ralf,
 
   can you pls try ata-all.patch from this mail:
 
 http://freebsd.rambler.ru/bsdmail/freebsd-mobile_2004/msg02452.html
 
 And also this patch:
 
 http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/ata/ata-all.c.diff?r1=1.232&r2=1.233
 
 Rebuild your kernel and report whether this helps. Thanks!
 
 -- 
 Totus tuus, Glebius.
 GLEBIUS-RIPN GLEB-RIPE

From: Ralf Wenk <RZ-FreeBSD1004@fh-karlsruhe.de>
To: Gleb Smirnoff <glebius@cell.sick.ru>
Cc: sos@freebsd.org, freebsd-gnats-submit@freebsd.org
Subject: Re: kern/72850: apm suspend handling partial broken with 5.3-STABLE 
Date: Mon, 13 Dec 2004 23:32:40 +0100

 Gelb,
 
 >   can you pls try ata-all.patch from this mail:
 > 
 > http://freebsd.rambler.ru/bsdmail/freebsd-mobile_2004/msg02452.html
 > 
 > And also this patch:
 > 
 > http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/ata/ata-all.c.diff?r1=1.232&r2=1.233
 > 
 > Rebuild your kernel and report whether this helps. Thanks!
 
 I applied both patches and the problem was fixed.
 After that I removed the patches gradually to find the exact location
 of the fix. The first seems to do nothing on the TP 390X. Probably because
 of resuming was never a problem on this machine. As I'm currently using
 a 5.3-STABLE with
 __FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.222.2.5 2004/10/24 09:27:37 
 sos Exp $")
 the first part of the second patch was already applied without fixing
 the problem. The patch for ata_supend() did it.
 
 Thanks, Ralf
 
 
 -- 
 Fachhochschule Karlsruhe  -  Hochschule fuer Technik
 Rechenzentrum / Zentrale Dienste
 http://www.fh-karlsruhe.de/rz/         Moltkestr. 30
 rz-benutzerberatung@fh-karlsruhe.de  76133 Karlsruhe
 Montag bis Freitag 9.00-12.00 Uhr  Fon 0721/925-2305
 
 
State-Changed-From-To: open->feedback 
State-Changed-By: jh 
State-Changed-When: Sun Aug 8 07:55:32 UTC 2010 
State-Changed-Why:  
Is this problem still relevant on recent versions of FreeBSD? 


Responsible-Changed-From-To: freebsd-bugs->jh 
Responsible-Changed-By: jh 
Responsible-Changed-When: Sun Aug 8 07:55:32 UTC 2010 
Responsible-Changed-Why:  
Track. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=72850 
State-Changed-From-To: feedback->closed 
State-Changed-By: jh 
State-Changed-When: Sat Sep 25 17:19:45 UTC 2010 
State-Changed-Why:  
Feedback timeout. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=72850 
>Unformatted:
