Re: Asus V1j

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Corentin CHARY napisał(a):
Mail cced to linux-acpi@xxxxxxxxxxxxxxx, they may be able to help us =)

Le Saturday 24 March 2007 13:43:26 Szymon Olko, vous avez écrit :
Dear *,

Finally I found some time to play with buttons in my V1j. At first
thanks for great work!!!

I'm not acpi nor dsdt guru, but I looked into the code and this is what
I found out.
Module is working very good, almost all buttons are working. So I
decided to play with my DSDT.
I had few problems, and this is how I solved them or I think should be
solved.

1. In /proc/acpi/events few keys which looks normal in DSDT are not
reported. I found that all of them have code bigger than 0x80. I founded
those lines and changed them to return codes below 0x80 (to ones that
are not used) and that solved problem. I did not have time to look into
acpi source code and maybe my solution is not the best way to do it, and
maybe not solves the problem, but works for me.
Example:

    - F2 wifi button
    //Notify (\_SB.ATKD, 0x88)
    Notify (\_SB.ATKD, 0x56)

The only exception is sleep button F1 but it is notified not to
\_SB.ATKD but to \_SB.SLPB and is processed by buttons module.

Notify (\_SB.SLPB, 0x80)

Is it a bug or a feature that codes over 0x80 are not reported?
I don't know :/ So, let's ask linux-acpi@xxxxxxxxxxxxxxx



2. This laptop has doubled buttons.
Thanks asus :D

3. Brightness  buttons (F5 ; F6). They ware generation exceptions like:

ACPI Error (psargs-0355): [\_SB_.PCI0.P0P2.VGA_.LCDD] Namespace lookup
failure, AE_NOT_FOUND ACPI Error (psparse-0537): Method parse/execution
failed [\_SB_.PCI0.SBRG.EC0_._Q0E] (Node c194bf40), AE_NOT_FOUND

As far as I understand this problem it is a problem of DSDT which tries
to notify about an event with not defined namespace. This is this line
    Notify (\_SB.PCI0.P0P2.VGA.LCDD, 0x87)
I will try to solve that later, because method that process F5 also
decrement brightness, for now the hack is as follows:

            Method (_Q0F, 0, NotSerialized)            //bright F5
            {
/*
                If (LEqual (OSFG, OSVT))
                {
                    Notify (\_SB.PCI0.P0P2.VGA.LCDD, 0x87)
                }
                Else
                {
                    If (LGreater (LBTN, 0x00))
                    {
                        Decrement (LBTN)
                    }

                    If (LGreater (LBTN, 0x0F))
                    {
                        Store (0x0F, LBTN)
                    }

                    STBR ()
*/
                    If (\_SB.ATKP)
                    {
//                        Notify (\_SB.ATKD, Add (LBTN, 0x20))
                        Notify (\_SB.ATKD, 0x52)
                    }
/*
                }

                Return (One)
*/
            }

I commented whole code of that method and just notify about button
pressed. As for now backlight is working with video module or with
asus_laptop via /sys/class/backlight/asus-laptop/brightness it can be
easily workaround with simple script. But as I said I will try to fix
DSDT later. For F6 code is similar.
Hum, you can just remove the If (LEqual (OSFG, OSVT))
                 {
                     Notify (\_SB.PCI0.P0P2.VGA.LCDD, 0x87)
                 }
                 Else
                 {
and it shall work .. But it's a serious issue, as this problem have been reported on other laptop .... What should we do with Notify (\_SB.PCI0.P0P2.VGA.LCDD, 0x87) ?
(I think OSVT is for Os Vista).

4. Multimedia button, the first on the left side from top buttons. On
windows it runs full screen application to what movies, presentation and
listen music. I made a change like with brightness buttons:

            Method (_Q51, 0, NotSerialized)
//multimedia (top)
            {
/*
                \_SB.PCI0.SBRG.EC0.WRAM (0x04, 0xCB, 0x09)
                Store (One, Local0)
                While (Local0)
                {
                    If (\_SB.ATKP)
                    {
                        SPIN (0x23, 0x00)
                        Sleep (0x32)
                        SPIN (0x23, 0x01)
                    }

                    Store (Zero, Local2)
                    If (\_SB.PCI0.SBRG.EC0.RPIN (0x43))
                    {
                        Or (Local2, 0x04, Local2)
                    }

                    If (\_SB.PCI0.SBRG.EC0.RPIN (0x43))
                    {
                        Or (Local2, 0x02, Local2)
                    }

                    If (\_SB.PCI0.SBRG.EC0.RPIN (0x43))
                    {
                        Or (Local2, 0x01, Local2)
                    }

                    If (LEqual (Local2, 0x07))
                    {
                        \_SB.PCI0.SBRG.EC0.WRAM (0x04, 0xCB, 0x89)
                        Notify (\_SB.ATKD, 0x95)
                        Store (Zero, Local0)
                    }
                }
*/
                    If (\_SB.ATKP)
                    {
                        Notify (\_SB.ATKD, 0x68)
                    }
            }
But it notify to the /proc/acpi/event for the first time it is pressed.
Next time I press it, it does do nothing. Again I need more time to look
what this method should do but looking on the code it is strange that
\_SB.PCI0.SBRG.EC0.RPIN (0x43) is checked few times. This is still
pending to be solved. Maybe I commended to much, and there is no state
wrote to memory, and that is why it is not called again.

5. The last big mystery are media control buttons (play, stop, rewind,
forward). I cannot find the in DSDT. I found something that I think
should be connected to those keys.
            Method (_Q6E, 0, NotSerialized)            //unknown 1
            {
                If (\_SB.ATKP)
                {
//                    Notify (\_SB.ATKD, 0x8A)
                    Notify (\_SB.ATKD, 0x65)
                }
            }
////////////////////////////////////
            Method (_Q6F, 0, NotSerialized)            //unknown 3
            {
                If (\_SB.ATKP)
                {
//                    Notify (\_SB.ATKD, 0x99)
                    Notify (\_SB.ATKD, 0x67)
                }
            }
But those are two keys not four. And my values are not reported in
/proc/acpi/events.
Does they work on the other OS ?

---------------
That is all about buttons. Summarizing, all except (play, stop, rewind,
forward) are working, multimedia is working once.
This laptop does not have TLED but DSDT says so. I don't know why it is
for. From looking into DSDT WLED and BLED are handled almost the same as
MLED. Is it possible to make a change in asus_laptop to have those leds
visible in /sys/class/leds?
I didn't find a way to know if BLED and WLED will handle the device, the led, or both .. So I can't move them to /sys/class/leds ..

Asus laptops in Windows notifies about plugin connector into sound
device. I think that this code:
        Method (_L05, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.MC97, 0x02)
            Notify (\_SB.PCI0.HDAC, 0x02)
        }
Maybe responsible for that. Are any modules that handles this? Am I wright?
I don't think any modules handles this .. But MC97 seems to be a modem controller.

Thanks =)



-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux