Fwd: Brightness on HP EliteBook 8460p

joeyli jlee at suse.com
Tue Mar 20 21:16:31 PDT 2012


於 二,2012-03-20 於 23:03 +0100,Pali Rohár 提到:
> > 
> > Another doubt is the latest statement in _BCM, it emit a BEVT event:
> > 
> > Signal (\_SB.BEVT)
> > 
> > Only HKFR(HotkeyFunctionResponse) method is waiting this event, it
> > should related to how the HP implement brightness function key on
> > Windows through wmi.
> > 
> > Of course this issue really close related to video driver, even
> > more, we might need to know hp wmi for how to implement on Windows.
> > 
> > Unfortunately, sorry for I don't have any solution to you, now, I
> > will continue to trace and find any support from other experts.
> > 
> > 
> > Thanks a lot!
> > Joey Lee
> 
> Hi!
> 
> now I found that ALS button which enable/disable ambient light sensor 
> working with linux and ALS can also decrease/increase brightness.
> 
> ALS can be enabled or disabled via WMI (acpi) on linux too. I found 
> function which enable ALS in linux kernel. See source code of function 
> set_als in hp-wmi.c: http://tomoyo.sourceforge.jp/cgi-
> bin/lxr/source/drivers/platform/x86/hp-wmi.c#L443
> 
> This function can enable ALS which can decrease brightness (but only 
> to specific one level) via WMI. And WMI is ACPI extension, so maybe it 
> is really possible to change brightness via acpi without DRI support.
> 
> But I do not WMI, ACPI and DSDT code. Can you try to decode what is 
> called in acpi when that set_als function in hp-wmi is called? I think 
> here in acpi can be some magic which can manipulate with display 
> brightness. At least ACPI must call somewhat to change brightness...
> 
> Note: Enabling ALS on my notebook change brightness to some specific 
> level and disabling ALS will revert brightness back. From userspace 
> ALS can be enabled/disabled via this sysfs entry: 
> /sys/devices/platform/hp-wmi/als
> 
> -- 
> Pali Rohár
> pali.rohar at gmail.com

Traced the your dsdt from 8460p.

Let's see "set ALS" first, when set ALS enable, BIOS didn't _eat_ any
input value for brightness level:


    Method (WHCM, 2, NotSerialized)
    {
        CreateDWordField (Arg1, 0x00, SNIN)     /* signature */
        CreateDWordField (Arg1, 0x04, COMD)     /* command = write ? 0x2 : 0x1 */
        CreateDWordField (Arg1, 0x08, CMTP)     /* commandtype */
        CreateDWordField (Arg1, 0x0C, DASI)
        Store ("HandleWMICommand Enter", Debug)
...
    If (LEqual (COMD, 0x02))            /* command write */
    {
        Store ("write BIOS command", Debug)
....
        If (LEqual (CMTP, 0x03))        /* write HPWMI_ALS_QUERY 0x3 */
        {
            Store (^WSAL (DDWD), Local2)  /* call ^WSAL and feed DDWD */
            Store (0x00, RTCD)
        }


            Method (WSAL, 1, NotSerialized)     /* write HPWMI_ALS_QUERY 0x3 */
            {
                If (LEqual (PRDT, 0x03)) 
                {
                    Return (Package (0x02)
                    {
                        0x04,
                        0x00
                    })
                }

                \_SB.SSMI (0xEA75, 0x02, 0x03, 0x574D4953, 0x00)   /* emit SMI, BIOS code take job but didn't feed Arg0 to BIOS */
                Return (WFDA ())
            }

Everything handle by BIOS function after emit SMI event, and it didn't
give BIOS any input value of brightness.
So, didn't find any way to change brightness through set ALS.


Then, I found another interesting command for 'write brightness', hp-wmi
doesn't have implementation for this command: 

        If (LEqual (CMTP, 0x06))        /* set brightness? */
        {
            Store ("write Brightness", Debug)
            Store (^SBBC (DDWD), Local2)	/* call DDWD */
            Store (Local2, Debug)
            Store (0x00, RTCD)
        }

            Method (SBBC, 1, NotSerialized)     /* write brighenss? didn't do anything? */
            {
                Return (Package (0x02)		/* just only return a package */
                {
                    0x04,
                    0x00
                })
            }


Unfortunately, the 0x06 command also doesn't do anything for change
brightness on your machine.

Sorry! Didn't find any way can change brightness on your machine unless
we have drm driver support ATI acpi events.


Thanks a lot!
Joey Lee



More information about the dri-devel mailing list