NetBSD Problem Report #40487

From www@NetBSD.org  Mon Jan 26 19:05:00 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id D5CD563BAB8
	for <gnats-bugs@gnats.netbsd.org>; Mon, 26 Jan 2009 19:05:00 +0000 (UTC)
Message-Id: <20090126190500.8823C63B99A@narn.NetBSD.org>
Date: Mon, 26 Jan 2009 19:05:00 +0000 (UTC)
From: shinden@linux.pl
Reply-To: shinden@linux.pl
To: gnats-bugs@NetBSD.org
Subject: thinkpad r50e can't poweroff
X-Send-Pr-Version: www-1.0

>Number:         40487
>Category:       kern
>Synopsis:       thinkpad r50e can't poweroff
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    joerg
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 26 19:10:00 +0000 2009
>Closed-Date:    Sat Apr 04 23:13:52 +0000 2009
>Last-Modified:  Tue Apr 07 23:30:02 +0000 2009
>Originator:     Daniel Horecki
>Release:        5.0BETA
>Organization:
>Environment:
NetBSD tatooine.stars 5.0_BETA NetBSD 5.0_BETA (TATOOINE) #0: Sat Dec 27 09:45:08 CET 2008  sh@myrkr.stars:/home/sh/src/netbsd-5/obj/sys/arch/i386/compile/TATOOINE i386
>Description:
I can't poweroff my IBM Thinkpad R50e. It does shutdown hooks, then the screen is black, yet fans are running and battery led is on. This behaviour started around 4.99.72. It doesn't work with either poweroff command and sysctl machdep.sleep_state. Kernel config is mostly GENERIC with putter and pf enabled, changed SHM variables and enabled BUFQ_*.

dmesg:

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 5.0_BETA (TATOOINE) #0: Sat Dec 27 09:45:08 CET 2008
        sh@myrkr.stars:/home/sh/src/netbsd-5/obj/sys/arch/i386/compile/TATOOINE
total memory = 502 MB
avail memory = 483 MB
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
IBM 1834s5g (ThinkPad R50e)
mainbus0 (root)
cpu0 at mainbus0: Intel 686-class, 1398MHz, id 0x6d8
acpi0 at mainbus0: Intel ACPICA 20080321
acpi0: X/RSDT: OemId <IBM   ,TP-1W   ,00002060>, AslId < LTP,00000000>
LNKA: ACPI: Found matching pin for 0.2.INTA at func 0: 11
LNKA: ACPI: Found matching pin for 0.29.INTA at func 0: 11
LNKD: ACPI: Found matching pin for 0.29.INTB at func 1: 11
LNKC: ACPI: Found matching pin for 0.29.INTC at func 2: 11
LNKH: ACPI: Found matching pin for 0.29.INTD at func 7: 11
LNKC: ACPI: Found matching pin for 0.31.INTA at func 1: 255
LNKB: ACPI: Found matching pin for 0.31.INTB at func 3: 5
LNKA: ACPI: Found matching pin for 2.0.INTA at func 0: 11
LNKF: ACPI: Found matching pin for 2.2.INTA at func 0: 11
LNKE: ACPI: Found matching pin for 2.8.INTA at func 0: 11
acpiecdt0 at acpi0: ACPI Embedded Controller via ECDT
acpi0: SCI interrupting at int 9
acpi0: fixed-feature power button present
timecounter: Timecounter "ACPI-Fast" frequency 3579545 Hz quality 1000
ACPI-Fast 24-bit timer
acpilid0 at acpi0 (LID, PNP0C0D): ACPI Lid Switch
acpibut0 at acpi0 (SLPB, PNP0C0E): ACPI Sleep Button
attimer1 at acpi0 (TIMR, PNP0100): AT Timer
attimer1: io 0x40-0x43 irq 0
pcppi1 at acpi0 (SPKR, PNP0800)
pcppi1: io 0x61
midi0 at pcppi1: PC speaker (CPU-intensive output)
sysbeep0 at pcppi1
npx1 at acpi0 (FPU, PNP0C04)
npx1: io 0xf0 irq 13
npx1: reported by CPUID; using exception 16
pckbc1 at acpi0 (KBD, PNP0303): kbd port
pckbc1: io 0x60,0x64 irq 1
pckbc2 at acpi0 (MOU, IBM3780): aux port
pckbc2: irq 12
acpiec0 at acpi0 (EC, PNP0C09-0): ACPI Embedded Controller (disabled)
acpibat0 at acpi0 (BAT0, PNP0C0A-0): ACPI Battery (Control Method)
acpibat0: battery info: SANYO, LION, IBM-92P1075  5195
acpiacad0 at acpi0 (AC, ACPI0003-0): ACPI AC Adapter
thinkpad0 at acpi0 (HKEY, IBM0068)
thinkpad0: using CMOS at \UCMS
thinkpad0: using EC at acpiecdt0
acpitz0 at acpi0 (THM0): critical 94.0C passive 42.0C, passive cooling
apm0 at acpi0: Power Management spec V1.2
attimer1: attached to pcppi1
pckbd0 at pckbc1 (kbd slot)
pckbc1: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc1 (aux slot)
pckbc1: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: vendor 0x8086 product 0x3580 (rev. 0x02)
agp0 at pchb0: detected 8060k stolen memory
agp0: aperture at 0xe0000000, size 0x8000000
vendor 0x8086 product 0x3584 (miscellaneous system, revision 0x02) at pci0 dev 0 function 1 not configured
vendor 0x8086 product 0x3585 (miscellaneous system, revision 0x02) at pci0 dev 0 function 3 not configured
vga1 at pci0 dev 2 function 0: vendor 0x8086 product 0x3582 (rev. 0x02)
wsdisplay0 at vga1 kbdmux 1: console (80x25, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
drm at vga1 not configured
vendor 0x8086 product 0x3582 (miscellaneous display, revision 0x02) at pci0 dev 2 function 1 not configured
uhci0 at pci0 dev 29 function 0: vendor 0x8086 product 0x24c2 (rev. 0x01)
uhci0: interrupting at irq 11
usb0 at uhci0: USB revision 1.0
uhci1 at pci0 dev 29 function 1: vendor 0x8086 product 0x24c4 (rev. 0x01)
uhci1: interrupting at irq 11
usb1 at uhci1: USB revision 1.0
uhci2 at pci0 dev 29 function 2: vendor 0x8086 product 0x24c7 (rev. 0x01)
uhci2: interrupting at irq 11
usb2 at uhci2: USB revision 1.0
ehci0 at pci0 dev 29 function 7: vendor 0x8086 product 0x24cd (rev. 0x01)
ehci0: interrupting at irq 11
ehci0: EHCI version 1.0
ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2
usb3 at ehci0: USB revision 2.0
ppb0 at pci0 dev 30 function 0: vendor 0x8086 product 0x2448 (rev. 0x81)
pci1 at ppb0 bus 2
pci1: i/o space, memory space enabled
cbb0 at pci1 dev 0 function 0: vendor 0x104c product 0xac56 (rev. 0x00)
iwi0 at pci1 dev 2 function 0: vendor 0x8086 product 0x4220 (rev. 0x05)
iwi0: interrupting at irq 11
iwi0: 802.11 address 00:13:ce:b2:b4:13
iwi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
iwi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
fxp0 at pci1 dev 8 function 0: Intel PRO/100 VE (MOB) Network Controller, rev 129
fxp0: interrupting at irq 11
fxp0: Ethernet address 00:0a:e4:c5:8b:64
inphy0 at fxp0 phy 1: i82562ET 10/100 media interface, rev. 0
inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
cbb0: cacheline 0x8 lattimer 0x40
cbb0: bhlc 0x24008
cbb0: interrupting at irq 11
cardslot0 at cbb0
cardbus0 at cardslot0: bus 3
pcmcia0 at cardslot0
ichlpcib0 at pci0 dev 31 function 0
ichlpcib0: vendor 0x8086 product 0x24cc (rev. 0x01)
timecounter: Timecounter "ichlpcib0" frequency 3579545 Hz quality 1000
ichlpcib0: 24-bit timer
ichlpcib0: TCO (watchdog) timer configured.
ichlpcib0: SpeedStep enabled
piixide0 at pci0 dev 31 function 1
piixide0: Intel 82801DBM IDE Controller (ICH4-M) (rev. 0x01)
piixide0: bus-master DMA support present
piixide0: primary channel configured to compatibility mode
piixide0: primary channel interrupting at irq 14
atabus0 at piixide0 channel 0
piixide0: secondary channel configured to compatibility mode
piixide0: secondary channel interrupting at irq 15
atabus1 at piixide0 channel 1
ichsmb0 at pci0 dev 31 function 3: vendor 0x8086 product 0x24c3 (rev. 0x01)
ichsmb0: interrupting at irq 5
iic0 at ichsmb0: I2C bus
auich0 at pci0 dev 31 function 5: i82801DB/DBM (ICH4/ICH4M) AC-97 Audio
auich0: interrupting at irq 5
auich0: ac97: Analog Devices AD1981B codec; headphone, 20 bit DAC, no 3D stereo
auich0: ac97: ext id 601<AC97_22,AMAP,VRA>
vendor 0x8086 product 0x24c6 (modem communications, revision 0x01) at pci0 dev 31 function 6 not configured
isa0 at ichlpcib0
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
auich0: measured ac97 link rate at 47999 Hz, will use 48000 Hz
audio0 at auich0: full duplex, mmap, independent
acpiacad0: AC adapter offline.
uhub0 at usb0: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhub1 at usb1: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhub2 at usb2: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
uhub3 at usb3: vendor 0x8086 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub3: 6 ports with 6 removable, self powered
wd0 at atabus0 drive 0: <HTS541040G9AT00>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 38154 MB, 77520 cyl, 16 head, 63 sec, 512 bytes/sect x 78140160 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(piixide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA)
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 0: <HL-DT-ST DVDRAM GSA-4080N, 9D062725F6E7, 0X21> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
cd0(piixide0:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio1 at pad0: half duplex
boot device: wd0 
root on wd0a dumps on wd0b
root file system type: ffs
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)
wsdisplay0: screen 5 added (80x25, vt100 emulation)
wsdisplay0: screen 6 added (80x25, vt100 emulation)

>How-To-Repeat:
Try to shutdown NetBSD >= 4.99.72 on Thinkpad R50e.
>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->mrg
Responsible-Changed-By: mrg@NetBSD.org
Responsible-Changed-When: Tue, 27 Jan 2009 00:48:02 +0000
Responsible-Changed-Why:
i'll take care of this one.


From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, netbsd-bugs@netbsd.org,
    gnats-admin@netbsd.org, shinden@linux.pl
Subject: re: kern/40487 (thinkpad r50e can't poweroff)
Date: Tue, 27 Jan 2009 14:27:56 +1100

 i understand what is going on.  the 82801DB has been integrated
 into the same ic the 82855GM is on, and speedstep should be
 ignored there.

 (the "enable speed step" bits in the current driver are reserved
 bits in the docs i see for 82801DB.. ugh.)


 the patch below ignores speedstep if we find a 82855GM on the
 system, and should address this problem somewhat sanely.

 i've tested it on the pentium-4m system this code was originally
 tested on 5 years ago, and it seems to work there still.


 .mrg.


 Index: ichlpcib.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/x86/pci/ichlpcib.c,v
 retrieving revision 1.14
 diff -p -r1.14 ichlpcib.c
 *** ichlpcib.c	13 Oct 2008 15:10:51 -0000	1.14
 --- ichlpcib.c	27 Jan 2009 02:48:17 -0000
 *************** error:
 *** 542,547 ****
 --- 542,549 ----
   /*
    * Linux driver says that SpeedStep on older chipsets cause
    * lockups on Dell Inspiron 8000 and 8100.
 +  * It should also not be enabled on systems with the 82855GM
 +  * Hub, which typically have an EST-enabled CPU.
    */
   static int
   speedstep_bad_hb_check(struct pci_attach_args *pa)
 *************** speedstep_bad_hb_check(struct pci_attach
 *** 551,556 ****
 --- 553,561 ----
   	    PCI_REVISION(pa->pa_class) < 5)
   		return 1;

 + 	if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_INTEL_82855GM_MCH)
 + 		return 1;
 + 
   	return 0;
   }


From: Daniel Horecki <shinden@linux.pl>
To: matthew green <mrg@eterna.com.au>
Cc: gnats-bugs@NetBSD.org, kern-bug-people@netbsd.org,
 netbsd-bugs@netbsd.org, gnats-admin@netbsd.org
Subject: Re: kern/40487 (thinkpad r50e can't poweroff)
Date: Tue, 27 Jan 2009 11:27:08 +0100

 Je Tue, 27 Jan 2009 14:27:56 +1100 matthew green <mrg@eterna.com.au>
 scribis:

 > 
 > i understand what is going on.  the 82801DB has been integrated
 > into the same ic the 82855GM is on, and speedstep should be
 > ignored there.
 > 
 > (the "enable speed step" bits in the current driver are reserved
 > bits in the docs i see for 82801DB.. ugh.)
 > 
 > 
 > the patch below ignores speedstep if we find a 82855GM on the
 > system, and should address this problem somewhat sanely.
 > 
 > i've tested it on the pentium-4m system this code was originally
 > tested on 5 years ago, and it seems to work there still.
 > 
 > 

 This doesn't help. Although there isn't info about pmtimer, watchdog or
 speedstep, I cannot poweroff.

 Daniel

 -- 
 Daniel Horecki
 http://morr.pl http://linux.pl http://netbsd.pl
 HAIL ERIS!

Responsible-Changed-From-To: mrg->joerg
Responsible-Changed-By: joerg@NetBSD.org
Responsible-Changed-When: Tue, 27 Jan 2009 16:29:57 +0000
Responsible-Changed-Why:
I have a better patch.


State-Changed-From-To: open->feedback
State-Changed-By: joerg@NetBSD.org
State-Changed-When: Sat, 04 Apr 2009 21:23:11 +0000
State-Changed-Why:
Can you try the patch from
http://mail-index.netbsd.org/port-amd64/2009/01/27/msg000721.html
please?


State-Changed-From-To: feedback->closed
State-Changed-By: joerg@NetBSD.org
State-Changed-When: Sat, 04 Apr 2009 23:13:52 +0000
State-Changed-Why:
Reportedly fixed. Thanks for the PR.


From: Joerg Sonnenberger <joerg@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40487 CVS commit: src/sys/arch/x86/pci
Date: Sat, 4 Apr 2009 23:13:18 +0000

 Module Name:	src
 Committed By:	joerg
 Date:		Sat Apr  4 23:13:18 UTC 2009

 Modified Files:
 	src/sys/arch/x86/pci: ichlpcib.c

 Log Message:
 Restore SpeedStep settings on shutdown. Some BIOSes don't like it, if
 SpeedStep is enabled and powerdown fails otherwise. Fixes PR kern/40487.


 To generate a diff of this commit:
 cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x86/pci/ichlpcib.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Daniel Horecki <shinden@linux.pl>
To: gnats-bugs@NetBSD.org
Cc: joerg@NetBSD.org, netbsd-bugs@netbsd.org, gnats-admin@netbsd.org
Subject: Re: kern/40487 (thinkpad r50e can't poweroff)
Date: Sun, 5 Apr 2009 00:26:41 +0200

 Je Sat,  4 Apr 2009 21:23:12 +0000 (UTC) joerg@NetBSD.org scribis:

 > Synopsis: thinkpad r50e can't poweroff
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: joerg@NetBSD.org
 > State-Changed-When: Sat, 04 Apr 2009 21:23:11 +0000
 > State-Changed-Why:
 > Can you try the patch from
 > http://mail-index.netbsd.org/port-amd64/2009/01/27/msg000721.html
 > please?
 > 

 Works since couple of months.

 Daniel

 -- 
 Daniel Horecki
 http://morr.pl http://linux.pl http://netbsd.pl
 HAIL ERIS!

From: Soren Jacobsen <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40487 CVS commit: [netbsd-5] src/sys/arch/x86/pci
Date: Tue, 7 Apr 2009 23:28:30 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Tue Apr  7 23:28:30 UTC 2009

 Modified Files:
 	src/sys/arch/x86/pci [netbsd-5]: ichlpcib.c

 Log Message:
 Pull up following revision(s) (requested by joerg in ticket #669):
 	sys/arch/x86/pci/ichlpcib.c: revision 1.16
 Restore SpeedStep settings on shutdown. Some BIOSes don't like it, if
 SpeedStep is enabled and powerdown fails otherwise. Fixes PR kern/40487.


 To generate a diff of this commit:
 cvs rdiff -u -r1.14 -r1.14.4.1 src/sys/arch/x86/pci/ichlpcib.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.