Skip to content

This is a little tool to fix the ux32vd acpi backlight buttons during runtime

Notifications You must be signed in to change notification settings

FrostbittenKing/fixasusbacklight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 

Repository files navigation

fixasusbacklight

This is a little tool to fix the ux31a/ux32vd acpi backlight buttons during runtime It patches the IGDM opregion mapped into virtual memory during runtime to fix the not working backlight control buttons on the UX31A/UX32VD zenbooks.

Requirements:

  • dmidecode (used to check against bios version
  • acpi_call to extract the IGDM Base address

How to use acpi_call:

  • download and compile acpi_call with make
  • load module with insmod or with copying to /lib/modules/... and modprobe it
  • echo '\aslb' > /proc/acpi/call
  • cat /proc/acpi/call
  • this is the IGDM base address - fill in the IGDM_BASE variable in the script

Known IDGM Base Addresses

Bios Version Asus UX31E Asus UX31A Asus UX32VD Asus N56VZ Asus N56VM Asus UX51VZ(A)
2.03 ??? ??? ??? ??? ??? 0xCA861018
2.06 ??? 0xBE8B7018 0xBE8B7018 ??? ??? ???
2.11 ??? 0xDA8A9018 0xCA882018 0xCA876018 ??? ???
2.12 ??? ??? 0xCA882018 ??? ??? ???
2.13 ??? ??? 0xCA889018 ??? ??? ???
2.14 0xBAE79018 ??? ??? ??? 0xAE87E018 ???

Known DIDL/CADL Offsets

   <tr>
<td>2.06</td>
<td>???</td>
    <td>0x120 / 0x160</td>
<td>0x120 / 0x160</td>
<td>???</td>
<td>???</td>
<td>???</td>
   </tr>
   <tr>
<td>2.11</td>
<td>???</td>
    <td>&ndash;||&ndash;</td>
<td>&ndash;||&ndash;</td>
<td>???</td>
<td>???</td>
<td>???</td>
   </tr>
   <tr>
<td>2.12</td>
<td>???</td>
    <td>&ndash;||&ndash;</td>
<td>&ndash;||&ndash;</td>
<td>???</td>
<td>???</td>
<td>???</td>
   </tr>
   <tr>
<td>2.13</td>
<td>???</td>
    <td>???</td>
<td>&ndash;||&ndash;</td>
<td>???</td>
<td>???</td>
<td>???</td>
   </tr>
   <tr>
<td>2.14</td>
<td>0x120 / 0x160</td>
<td>???</td>
<td>???</td>
<td>???</td>
<td>???</td>
<td>???</td>
   </tr>
Bios Version Asus UX31E Asus UX31A Asus UX32VD Asus N56VZ Asus N56VM Asus UX51VZ(A)
2.03 ??? ??? ??? ??? ??? 0x120 / 0x160

IGDM base address probably differs with each bios version.

Problems:

If this script produces a kernel panic, its most likely that the bios version doesn't match the baseaddress and/ or offsets. Currently the script has a bios check to stop execution if the bios string returned by dmidecode -s bios-version doesn't match the BIOS_VERSION variable in the script (so change according to your bios)

Extrating the DIDL/CADL Offsets:

  1. dump the bios with acpidump to file

  2. extract dsdt tables with acpixtract <file> this should create some files, one beeing something like dsdt.dsl (the file with .dsl is the important file)

  3. find the IGDM opregion in this file. This should look something like this:

         OperationRegion (IGDM, SystemMemory, ASLB, 0x2000)
         Field (IGDM, AnyAcc, NoLock, Preserve)
             {
         	 SIGN,   128,
         	 SIZE,   32,
         	 OVER,   32,
         	 ...
    
  4. The numbers represent the size of each element in bits. Add all numbers until you reach the DIDL and CADL offset. If you encounter something like offset(0x120) you can throw away the calculated value and continue with this offset (don't forget this offset is in bytes, not bits).

  5. Fill the DIDL/CADL offsets with the calculated values.

  6. Thumbs pressed that it works

How to execute:

  • chmod +x fixbacklight.sh
  • sudo ./fixbacklight.sh <start | shutdown>
  • optionally copy to /usr/local/share and let it execute by /etc/rc.local
  • on shutdown ./fixbacklight.sh shutdown (since it apprently causes some strange bug - sometimes the harddrive doesn't get detected on the next softreboot - idfk why). - add it to /etc/rc.shutdown

About

This is a little tool to fix the ux32vd acpi backlight buttons during runtime

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages