Contribute
Register

FAN Speed from ACPI is wrong

Status
Not open for further replies.
Joined
Mar 11, 2018
Messages
30
Motherboard
Intel HM175
CPU
i7-7700
Graphics
Intel HD630 + GTX1050Ti
Mobile Phone
  1. iOS
i have ASUS 753VE laptop. I applied custom fan control using ACPIPoller. Also i want to read RPM by HWMonitor. I found TACH method in DSDT.dsl:
Code:
Method (TACH, 1, Serialized) // !!! READ TACHOMETER RPM
            {
                //\RMDT.P2 ("_SB.PCIO.LPCB.EC0.TACH enter", Arg0)
            
                If (Arg0)
                {
                    Store (F1TS, Local0)
                }
                Else
                {
                    Store (F0TS, Local0)
                }

                \RMDT.P2 ("_SB.PCIO.LPCB.EC0.TACH F0TS", Local0)

                Not (Local0, Local0)
                And (Local0, 0xFFFF, Local0)
                If (LNotEqual (Local0, Zero))
                {
                    If (LEqual (Local0, 0xFFFF))
                    {
                        Store (Zero, Local0)
                    }
                    Else
                    {
                        //Multiply (Local0, 0x02, Local0)
                        Local0 = Local0 + Local0
                        //Local2 = ShiftLeft(Local0, 1)
                        //Local0 = Local2
                        \RMDT.P2 ("_SB.PCIO.LPCB.EC0.TACH F0TS * 2", Local0)
                        Local1 = 0x001C8402
                        //Store (0x001C8402, Local1)
                        Local0 = Local1 / Local0
                        \RMDT.P2 ("_SB.PCIO.LPCB.EC0.TACH F0TS final", Local0)
                        //Divide (Local1, Local0, Local2, Local0)
                    }
                }
                Else
                {
                   Store (Zero, Local0)
                }
            
                //\RMDT.P3 ("_SB.PCIO.LPCB.EC0.TACH leave -> ", Arg0, Local0)

                Return (Local0)
            }
But original read value is broken after *2 operation, here is a log:

2018-04-12 20:11:26.169612+0300 0x19a Default 0x0 0 0 kernel: (kernel) ACPIDebug: { "_SB.PCIO.LPCB.EC0.TACH F0TS", 0x1a3, }

2018-04-12 20:11:26.169859+0300 0x19a Default 0x0 0 0 kernel: (kernel) ACPIDebug: { "_SB.PCIO.LPCB.EC0.TACH F0TS * 2", 0x1fcb8, } // SHOULD BE 0x346!!!

2018-04-12 20:11:26.170106+0300 0x19a Default 0x0 0 0 kernel: (kernel) ACPIDebug: { "_SB.PCIO.LPCB.EC0.TACH F0TS final", 0xe, }

2018-04-12 20:11:26.170346+0300 0x19a Default 0x0 0 0 kernel: (kernel) ACPIDebug: { "_SB.PCI0.LPCB.EC0.TACH", 0xe, }

Can anybody help me, looks like value is casted in wrong way? Where can i find info about iasl construction.
 
i have ASUS 753VE laptop. I applied custom fan control using ACPIPoller. Also i want to read RPM by HWMonitor. I found TACH method in DSDT.dsl:
Code:
Method (TACH, 1, Serialized) // !!! READ TACHOMETER RPM
            {
                //\RMDT.P2 ("_SB.PCIO.LPCB.EC0.TACH enter", Arg0)
          
                If (Arg0)
                {
                    Store (F1TS, Local0)
                }
                Else
                {
                    Store (F0TS, Local0)
                }

                \RMDT.P2 ("_SB.PCIO.LPCB.EC0.TACH F0TS", Local0)

                Not (Local0, Local0)
                And (Local0, 0xFFFF, Local0)
                If (LNotEqual (Local0, Zero))
                {
                    If (LEqual (Local0, 0xFFFF))
                    {
                        Store (Zero, Local0)
                    }
                    Else
                    {
                        //Multiply (Local0, 0x02, Local0)
                        Local0 = Local0 + Local0
                        //Local2 = ShiftLeft(Local0, 1)
                        //Local0 = Local2
                        \RMDT.P2 ("_SB.PCIO.LPCB.EC0.TACH F0TS * 2", Local0)
                        Local1 = 0x001C8402
                        //Store (0x001C8402, Local1)
                        Local0 = Local1 / Local0
                        \RMDT.P2 ("_SB.PCIO.LPCB.EC0.TACH F0TS final", Local0)
                        //Divide (Local1, Local0, Local2, Local0)
                    }
                }
                Else
                {
                   Store (Zero, Local0)
                }
          
                //\RMDT.P3 ("_SB.PCIO.LPCB.EC0.TACH leave -> ", Arg0, Local0)

                Return (Local0)
            }
But original read value is broken after *2 operation, here is a log:

2018-04-12 20:11:26.169612+0300 0x19a Default 0x0 0 0 kernel: (kernel) ACPIDebug: { "_SB.PCIO.LPCB.EC0.TACH F0TS", 0x1a3, }

2018-04-12 20:11:26.169859+0300 0x19a Default 0x0 0 0 kernel: (kernel) ACPIDebug: { "_SB.PCIO.LPCB.EC0.TACH F0TS * 2", 0x1fcb8, } // SHOULD BE 0x346!!!

2018-04-12 20:11:26.170106+0300 0x19a Default 0x0 0 0 kernel: (kernel) ACPIDebug: { "_SB.PCIO.LPCB.EC0.TACH F0TS final", 0xe, }

2018-04-12 20:11:26.170346+0300 0x19a Default 0x0 0 0 kernel: (kernel) ACPIDebug: { "_SB.PCI0.LPCB.EC0.TACH", 0xe, }

Can anybody help me, looks like value is casted in wrong way? Where can i find info about iasl construction.

And(Not(0x1a3),0xFFFF) is 0xfe5c. 0xfe5c + 0xfe5c is 0x1fcb8.
 
Last edited:
How did u get value 0xfe5c?

Already answered above.
Print the result of Local0 after the Not(Local0, Local0),And(Local0,0xFFFF,Local0) and you'll see.
 
Already answered above.
Print the result of Local0 after the Not(Local0, Local0),And(Local0,0xFFFF,Local0) and you'll see.
Omg. My eyes skipped NOT!
 
Status
Not open for further replies.
Back
Top