NetBSD Problem Report #43017
From www@NetBSD.org Fri Mar 19 18:08:33 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id DC22763B11D
for <gnats-bugs@gnats.NetBSD.org>; Fri, 19 Mar 2010 18:08:33 +0000 (UTC)
Message-Id: <20100319180833.AC3FA63B86C@www.NetBSD.org>
Date: Fri, 19 Mar 2010 18:08:33 +0000 (UTC)
From: tavvva@seznam.cz
Reply-To: tavvva@seznam.cz
To: gnats-bugs@NetBSD.org
Subject: LCD brightness (backlight) settings do not work on HP Mini 5102 netbook
X-Send-Pr-Version: www-1.0
>Number: 43017
>Category: kern
>Synopsis: LCD brightness (backlight) settings do not work on HP Mini 5102 netbook
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: support
>Submitter-Id: net
>Arrival-Date: Fri Mar 19 18:10:04 +0000 2010
>Closed-Date:
>Last-Modified: Sun Jan 20 08:01:18 +0000 2019
>Originator: Jaromír Cápík
>Release: 5.0.2
>Organization:
>Environment:
NetBSD TavvvaMini 5.0.2 NetBSD 5.0.2 (GENERIC) #0: Sat Feb 6 13:44:19 UTC 2010 builds@b8.netbsd.org:/home/builds/ab/netbsd-5-0-2-RELEASE/amd64/201002061851Z-obj/home/builds/ab/netbsd-5-0-2-RELEASE/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
LCD brightness settings keys Fn+F3/Fn+F4 resp. F3/F4 do not work.
acpidump URL>
http://tavvva.net/data/hp_mini_5102-acpidump.txt
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->jruoho
Responsible-Changed-By: jruoho@NetBSD.org
Responsible-Changed-When: Fri, 19 Mar 2010 18:49:58 +0000
Responsible-Changed-Why:
I have some code for this.
State-Changed-From-To: open->feedback
State-Changed-By: jruoho@NetBSD.org
State-Changed-When: Mon, 20 Jun 2011 16:55:04 +0000
State-Changed-Why:
Can you try a kernel from HEAD? We have added few drivers that may help,
namely, acpivga(4) and wmihp(4). (The latter may handle the hotkeys, but it
is not enabled in GENERICs.) With the former -- if it attachs and works --
you should be able to control the brightness with the
hw.acpi.acpiout0.brightness
sysctl(8) variable.
From: =?UTF-8?B?R3LDqWdvaXJlIFN1dHJl?= <gregoire.sutre@gmail.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/43017
Date: Fri, 24 Jun 2011 20:50:33 +0200
The acpidump suggest that the BIOS of this laptop follows the Intel IGD
OpRegion specification [1]. My understanding of this specification is
that the BIOS relies on the graphics driver to implement various ACPI
video extensions, and, among them, brightness management.
[1] http://intellinuxgraphics.org/ACPI_IGD_OpRegion_%20Spec.pdf
The intel drm driver in Linux implements the graphics-driver part of
this specification. In the hope that it helps resolving this issue in
the future, I post here some notes regarding the implementation of the
specification [1] by this laptop's BIOS and the Linux (2.6.38) intel drm
driver -- at least my understanding of it.
Initialization
--------------
Section 2.3 of [1] specifies that the firmware allocates and initializes
the IGD opregion, which is a system memory region, and writes its base
address into the ASLS register of graphics PCI device (at address 0xFC
in the device's PCI configuration space).
The file of interest in Linux is drivers/gpu/drm/i915/intel_opregion.c.
The drm_i915_private structure (the softc) has a field opregion of type
struct intel_opregion. This stuct holds pointers to the physical
addresses of the opregion header, the 3 mailboxes, and the video bios
table. These pointers are initialized in intel_opregion_setup(), by
reading the opregion physical address in the ASLS register (address 0xFC
in the device's PCI configuration space). The intel_opregion_setup()
function is called in i915_driver_load(). The latter also calls,
afterwards, the function intel_opregion_init(), which performs various
initializations of/from the opregion:
- enumerate the outputs (ACPI children of the graphics device) and write
them in the DIDL field of the opregion (to pass them to the firmware).
This list is used by the firmware to package a list of IDs returned by
the ACPI _DOD method.
- notify the firmware that the OS is ready to handle ACPI video
notifications, by setting the DRDY field of the opregion to 1.
- register a dummy notify handler for the opregion.
- enable ASLE interrupts if this is a MOBILE chipset (and the opregion
has an ASLE mailbox).
- set flags in the register TCHE (of the opregion) to inform the
firmware that backlight control and other things are supported by the
driver.
Finally, i915_driver_load() calls acpi_video_register(), as the later was
deferred (in acpi_video_init) until the opregion is initialized.
Brightness Management
---------------------
The GFX0.DD02._BQC ACPI method (get the current brightness level) simply
returns the value of the internal variable BRIG.
The GFX0.DD02._BCM ACPI method (set the brightness level) is more
involved. It first stores its argument in the internal variable BRIG,
and, after a few steps, calls SBRV(), and then calls an SSMI method and
signals an event. The call to SBRV does the following:
if TCHE & 0x02 == 0 then
do noting
else
construct brightness data from BRID (which came from BRIG)
BCLP <- this brightness data | 0x80000000
ASLC <- 2
TCHE, BCLP, and ASLC are all part of the opregion. The 2nd bit of TCHE
is set if backlight control is supported by the graphics driver. The
2nd bit of ASLC tells the driver that the firmware wants it to set the
brightness level, to the value given in the BCLP. Values for BCLP range
from 0 to 0xFF (max brightness).
Then, for some reason, possibly because of the SSMI method call, an
interrupt is triggered. The irq handler of the Linux i915 driver,
i915_driver_irq_handler() or ironlake_irq_handler(), is called, detects
an ASLE interrupt, and calls intel_opregion_asle/gse_intr(). The latter
processes each request in ASLC, and returns the corresponding status bit
field. In the above scenario, ASLC = 2, asle_set_backlight() is called,
validates the level (BLCP), and calls intel_panel_set_backlight(), and
sets the CBLV field of the opregion with the current brightness level.
The function intel_panel_set_backlight() writes into specific registers
to set the brightness level (BLC_PWM_CTL, or BLC_PWM_CPU_CTL for
Ironlake).
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/43017 (LCD brightness (backlight) settings do not work on
HP Mini 5102 netbook)
Date: Tue, 19 Jul 2011 02:54:51 +0000
For some reason this didn't get to gnats, even though it was sent
there.
------
From: Jarom?r C?p?k <tavvva@seznam.cz>
To: gnats-bugs@NetBSD.org
Cc: jruoho@NetBSD.org, netbsd-bugs@netbsd.org, gnats-admin@netbsd.org
Subject: Re: kern/43017 (LCD brightness (backlight) settings do not work on HP
Mini 5102 netbook)
Date: Thu, 23 Jun 2011 10:14:41 +0200 (CEST)
Hello Jukka.
The backlight settings are apparently present on the acpiout1 in my case.
acpiout1: brightness levels: 0 5 10 15 20 25 30 33 36 40 43 46 50 55 60 65 70 75 80 83 86 90 93 96 100
Anyway ... even if I was changing the value (and could read back what was actualy written),
the LCD brightness stayed the same all the time.
I'm attaching the dmesg output.
Have a nice day.
Regards,
Jaromir.
> ------------ P?vodn? zpr?va ------------
> Od: <jruoho@NetBSD.org>
> P?edm?t: Re: kern/43017 (LCD brightness (backlight) settings do not work on HP
> Mini 5102 netbook)
> Datum: 20.6.2011 19:03:32
> ----------------------------------------
> Synopsis: LCD brightness (backlight) settings do not work on HP Mini 5102
> netbook
>
> State-Changed-From-To: open->feedback
> State-Changed-By: jruoho@NetBSD.org
> State-Changed-When: Mon, 20 Jun 2011 16:55:04 +0000
> State-Changed-Why:
>
> Can you try a kernel from HEAD? We have added few drivers that may help,
> namely, acpivga(4) and wmihp(4). (The latter may handle the hotkeys, but it
> is not enabled in GENERICs.) With the former -- if it attachs and works --
> you should be able to control the brightness with the
>
> hw.acpi.acpiout0.brightness
>
> sysctl(8) variable.
>
>
>
>
>
>
>
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011
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.99.53 (GENERIC) #0: Wed Jun 22 11:56:52 UTC 2011
builds@b7.netbsd.org:/home/builds/ab/HEAD/amd64/201106221010Z-obj/home/builds/ab/HEAD/src/sys/arch/amd64/compile/GENERIC
total memory = 2033 MB
avail memory = 1959 MB
timecounter: Timecounters tick every 10.000 msec
RTC BIOS diagnostic error 0xb7<clock_battery,config_unit,memory_size,invalid_time>
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
Hewlett-Packard HP Mini 5102 ( )
mainbus0 (root)
cpu0 at mainbus0 apid 0: Intel(R) Atom(TM) CPU N450 @ 1.66GHz, id 0x106ca
cpu1 at mainbus0 apid 1: Intel(R) Atom(TM) CPU N450 @ 1.66GHz, id 0x106ca
ioapic0 at mainbus0 apid 1: pa 0xfec00000, version 20, 24 pins
acpi0 at mainbus0: Intel ACPICA 20110211
acpi0: X/RSDT: OemId <HPQOEM,SLIC-MPC,0000000f>, AslId < ,01000013>
ACPI Warning: For \_SB_.PCI0.PCIB._PRT: Return Package has no elements (empty) (20110211/nspredef-500)
acpi0: SCI interrupting at int 9
timecounter: Timecounter "ACPI-Safe" frequency 3579545 Hz quality 900
hpet0 at acpi0: high precision event timer (mem 0xfed00000-0xfed00400)
timecounter: Timecounter "hpet0" frequency 14318179 Hz quality 2000
acpiec0 at acpi0 (EC0, PNP0C09-1): io 0x62,0x66
PDRC (PNP0C02) at acpi0 not configured
acpivga0 at acpi0 (GFX0): ACPI Display Adapter
acpiout0 at acpivga0 (DD01, 0x0100): ACPI Display Output Device
acpiout1 at acpivga0 (DD02, 0x0400): ACPI Display Output Device
acpiout1: brightness levels: 0 5 10 15 20 25 30 33 36 40 43 46 50 55 60 65 70 75 80 83 86 90 93 96 100
acpiout2 at acpivga0 (DD03, 0x0300): ACPI Display Output Device
acpiout3 at acpivga0 (DD04, 0x0301): ACPI Display Output Device
acpiout4 at acpivga0 (DD05, 0x0302): ACPI Display Output Device
acpiout5 at acpivga0 (DD06, 0x0006): ACPI Display Output Device
acpiout6 at acpivga0 (DD07, 0x0007): ACPI Display Output Device
acpiout7 at acpivga0 (DD08, 0x0008): ACPI Display Output Device
acpivga0: unknown output device acpiout0
acpivga0: unknown output device acpiout2
acpivga0: unknown output device acpiout3
acpivga0: unknown output device acpiout4
acpivga0: unknown output device acpiout5
acpivga0: unknown output device acpiout6
acpivga0: unknown output device acpiout7
acpivga0: connected output devices:
acpivga0: 0x0400 (acpiout1): Unknown Output Device, head 0
FWHD (INT0800) at acpi0 not configured
LDRC (PNP0C02) at acpi0 not configured
attimer1 at acpi0 (TIMR, PNP0100): io 0x40-0x43,0x50-0x53 irq 0
pckbc1 at acpi0 (PS2K, PNP0303) (kbd port): io 0x60,0x64 irq 1
pckbc2 at acpi0 (PS2M, SYN0170) (aux port): irq 12
ACEL (HPQ0004) at acpi0 not configured
acpibat0 at acpi0 (BAT0, PNP0C0A-1): ACPI Battery
acpibat0: Hewlett-Packard LIon rechargeable battery
acpibat0: model number Primary, serial number 05445 2010/01/20
acpibat0: granularity: low->warn 0.100 Ah, warn->full 0.100 Ah
acpiacad0 at acpi0 (AC, ACPI0003): ACPI AC Adapter
acpibut0 at acpi0 (SLPB, PNP0C0E): ACPI Sleep Button
acpilid0 at acpi0 (LID, PNP0C0D): ACPI Lid Switch
acpidalb0 at acpi0 (HST1, PNP0C32-1): Direct Application Launch Button
acpiwmi0 at acpi0 (WMID, PNP0C14-0): ACPI WMI Interface
wmihp0 at acpiwmi0: HP WMI mappings
acpifan0 at acpi0 (FAN0, PNP0C0B-0): ACPI Fan
acpifan1 at acpi0 (FAN1, PNP0C0B-1): ACPI Fan
acpifan2 at acpi0 (FAN2, PNP0C0B-2): ACPI Fan
acpifan3 at acpi0 (FAN3, PNP0C0B-3): ACPI Fan
acpifan4 at acpi0 (FAN4, PNP0C0B-4): ACPI Fan
acpitz0 at acpi0 (DTSZ)
acpitz0: levels: critical 105.0 C, passive cooling
acpitz1 at acpi0 (CPUZ): cpu0 cpu1
acpitz1: active cooling level 0: 83.0C
acpitz1: active cooling level 1: 73.0C
acpitz1: active cooling level 2: 63.0C
acpitz1: active cooling level 3: 53.0C
acpitz1: active cooling level 4: 43.0C
acpitz1: levels: critical 103.0 C, passive 100.0 C
acpitz2 at acpi0 (SKNZ): cpu0 cpu1
acpitz2: levels: critical 78.0 C, passive 78.0 C, passive cooling
acpitz3 at acpi0 (BATZ): cpu0 cpu1
acpitz3: levels: critical 103.0 C, passive 60.0 C, passive cooling
acpitz4 at acpi0 (FDTZ)
acpitz4: levels: critical 110.0 C, passive cooling
pckbd0 at pckbc1 (kbd slot)
pckbc1: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc1 (aux slot)
pms0: Synaptics touchpad version 7.2
pms0: Palm detect
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: vendor 0x8086 product 0xa010 (rev. 0x00)
agp0 at pchb0: detected 7932k stolen memory
agp0: aperture at 0x80000000, size 0x10000000
vga0 at pci0 dev 2 function 0: vendor 0x8086 product 0xa011 (rev. 0x00)
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
drm at vga0 not configured
vendor 0x8086 product 0xa012 (miscellaneous display) at pci0 dev 2 function 1 not configured
hdaudio0 at pci0 dev 27 function 0: HD Audio Controller
hdaudio0: interrupting at ioapic0 pin 19
hdafg0 at hdaudio0: Sigmatel 92HD75B2X5
hdafg0: DAC00 2ch: Speaker [Built-In], HP Out [Jack]
hdafg0: ADC01 2ch: Mic In [Jack] [Built-In]
hdafg0: 2ch/2ch 44100Hz 48000Hz 88200Hz 96000Hz 192000Hz 16/16 20/32 24/32
audio0 at hdafg0: full duplex, playback, capture, independent
ppb0 at pci0 dev 28 function 0: vendor 0x8086 product 0x27d0 (rev. 0x02)
ppb0: PCI Express 1.0 <Root Port of PCI-E Root Complex>
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled, rd/line, wr/inv ok
vendor 0x14e4 product 0x4315 (miscellaneous network, revision 0x01) at pci1 dev 0 function 0 not configured
ppb1 at pci0 dev 28 function 2: vendor 0x8086 product 0x27d4 (rev. 0x02)
ppb1: PCI Express 1.0 <Root Port of PCI-E Root Complex>
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled, rd/line, wr/inv ok
ppb2 at pci0 dev 28 function 3: vendor 0x8086 product 0x27d6 (rev. 0x02)
ppb2: PCI Express 1.0 <Root Port of PCI-E Root Complex>
pci3 at ppb2 bus 67
pci3: i/o space, memory space enabled, rd/line, wr/inv ok
vendor 0x11ab product 0x4381 (ethernet network, revision 0x11) at pci3 dev 0 function 0 not configured
uhci0 at pci0 dev 29 function 0: vendor 0x8086 product 0x27c8 (rev. 0x02)
uhci0: interrupting at ioapic0 pin 20
usb0 at uhci0: USB revision 1.0
uhci1 at pci0 dev 29 function 1: vendor 0x8086 product 0x27c9 (rev. 0x02)
uhci1: interrupting at ioapic0 pin 22
usb1 at uhci1: USB revision 1.0
uhci2 at pci0 dev 29 function 2: vendor 0x8086 product 0x27ca (rev. 0x02)
uhci2: interrupting at ioapic0 pin 18
usb2 at uhci2: USB revision 1.0
uhci3 at pci0 dev 29 function 3: vendor 0x8086 product 0x27cb (rev. 0x02)
uhci3: interrupting at ioapic0 pin 19
usb3 at uhci3: USB revision 1.0
ehci0 at pci0 dev 29 function 7: vendor 0x8086 product 0x27cc (rev. 0x02)
ehci0: interrupting at ioapic0 pin 20
ehci0: EHCI version 1.0
ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2 uhci3
usb4 at ehci0: USB revision 2.0
ppb3 at pci0 dev 30 function 0: vendor 0x8086 product 0x2448 (rev. 0xe2)
pci4 at ppb3 bus 68
pci4: i/o space, memory space enabled
pcib0 at pci0 dev 31 function 0: vendor 0x8086 product 0x27bc (rev. 0x02)
ahcisata0 at pci0 dev 31 function 2: vendor 0x8086 product 0x27c1
ahcisata0: interrupting at ioapic0 pin 22
ahcisata0: 64-bit DMA
ahcisata0: AHCI revision 1.1, 4 ports, 32 command slots, features 0xcf20e000
atabus0 at ahcisata0 channel 0
atabus1 at ahcisata0 channel 1
isa0 at pcib0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
sysbeep0 at pcppi0
attimer1: attached to pcppi0
acpicpu0 at cpu0: ACPI CPU
acpicpu0: C1: FFH, lat 1 us, pow 1000 mW
acpicpu0: C2: FFH, lat 20 us, pow 500 mW
acpicpu0: P0: FFH, lat 10 us, pow 2000 mW, 1666 MHz
acpicpu0: P1: FFH, lat 10 us, pow 1300 mW, 1333 MHz
acpicpu0: P2: FFH, lat 10 us, pow 600 mW, 1000 MHz
acpicpu0: T0: HLT, lat 1 us, pow 0 mW, 100 %
acpicpu0: T1: HLT, lat 1 us, pow 0 mW, 88 %
acpicpu0: T2: HLT, lat 1 us, pow 0 mW, 76 %
acpicpu0: T3: HLT, lat 1 us, pow 0 mW, 64 %
acpicpu0: T4: HLT, lat 1 us, pow 0 mW, 52 %
acpicpu0: T5: HLT, lat 1 us, pow 0 mW, 40 %
acpicpu0: T6: HLT, lat 1 us, pow 0 mW, 28 %
acpicpu0: T7: HLT, lat 1 us, pow 0 mW, 16 %
coretemp0 at cpu0: thermal sensor, 1 C resolution
acpicpu1 at cpu1: ACPI CPU
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
acpiacad0: AC adapter online.
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 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered
uhub4 at usb4: vendor 0x8086 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub4: 8 ports with 8 removable, self powered
ahcisata0 port 0: device present, speed: 3.0Gb/s
ahcisata0 port 1: PHY offline
wd0 at atabus0 drive 0
wd0: <WDC WD3200BEKT-60V5T1>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 298 GB, 620181 cyl, 16 head, 63 sec, 512 bytes/sect x 625142448 sectors
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(ahcisata0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100) (using DMA)
uvideo0 at uhub4 port 4 configuration 1 interface 0: Chicony Electronics Co., Ltd. CNF8243, rev 2.00/85.39, addr 2
video0 at uvideo0: Chicony Electronics Co., Ltd. CNF8243, rev 2.00/85.39, addr 2
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio1 at pad0: half duplex, playback, capture
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
ubt0 at uhub0 port 2
ubt0: Broadcom Corp HP Integrated Module, rev 2.00/3.06, addr 2
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)
State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 19 Jul 2011 02:56:34 +0000
State-Changed-Why:
Feedback was received; gnats lost it but it is now filed properly.
Responsible-Changed-From-To: jruoho->kern-bug-people
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Sun, 20 Jan 2019 08:01:18 +0000
Responsible-Changed-Why:
Reset responsible field for retired developer.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.