Coder Social home page Coder Social logo

hieplpvip / asussmc Goto Github PK

View Code? Open in Web Editor NEW
168.0 16.0 20.0 175 KB

A VirtualSMC plugin provides native macOS support for ALS, keyboard backlight and Fn keys on Asus laptops

License: MIT License

C++ 72.99% Objective-C 12.44% Shell 11.61% C 2.96%
asus hackintosh virtualsmc als keyboard-backlight fnkeys

asussmc's Introduction

AsusSMC

Github release Github downloads Build Status Scan Status Gitter chat Donate with PayPal

A VirtualSMC plugin provides native support for ALS, keyboard backlight and Fn keys for Asus laptops on macOS.

Features

  • Full Fn keys support
  • Native ALS support
  • Native keyboard backlight support (16 levels, smooth transition, auto adjusting, auto turning off)
  • Battery Health Charging

Requirements

  • Asus laptop with ATK device
  • Knowing how to patch DSDT (if not, read this)

Boot arguments

  • Add -asussmcdbg to enable debug printing (available in DEBUG binaries).

How to install

  • Instruction is available in the Wiki.

Credits

asussmc's People

Contributors

ar-cade avatar hieplpvip avatar ubsefor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

asussmc's Issues

something wrong with my laptop keyboard backlight

I have used the DSDT patch, almost everything works fine, but my keyboard backlight still doesn't work. However if I press Fn + f3 and f4, the adjust tips does show up. Do you have any clue why I can't turn keyboard light on?

K501UQ - different backlight patch needed

This laptop requires somewhat different keyboard backlight patch. See attached DSDT, I used this patch:

Name (PWKB, Buffer (0x10)
   {
           0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF 
   })
Method (SKBV, 1, NotSerialized)
            {
                ^^KBLV = Arg0 / 16 
                Store (DerefOf (Index (PWKB, KBLV)), Local0)
                ^^PCI0.LPCB.EC0.WRAM (0xF8B1, Local0)
                Return (Arg0)
            }

Note that original PWKB had 4 backlight levels. Probably it might be made to work without PWKB.
DSDT-clean.dsl.zip

I say..

I also want to give you financial support, but I am in China, basically using Alipay WeChat, please understand. Also as a developer, like you

Version 1.2 not working on Mojave 10.14.6

Hi!

I have a ASUS N580VD the keyboard backlights were working perfectly on version 1.1 but not after updating to 1.2. I know the changes are probably for Catalina so I'l stay on 1.1 for now and move to 1.2 when I upgrade to Catalina.

I just wanted to let you know.

Thanks for your hard work!

DSDT and laptop compatibility

For a month i'm a proud owner of my new Asus Vivobook R520UF (X510UF). Does AsusSMC will be compatible with my laptop? There's a one thing stopping me from install Hackintosh - keyboard hotkeys (generally screen brightness and volume). I'm waiting for this plugin so much. Can I expect a DSDT patching guide this year?

Keyboard backlight remains off after sleep

this is not a big issue, but if i set the brightness to max, close the lid, and then wake it, the backlight remains off until the brightness is changed again.
ASUS S410U/X411U

Can't find 'ALS' in the 'DSDT'

My noteBook is FX80GE(FX504GE),I don't find 'ALS' in the 'DSDT',but I find 'ALSC' and 'ALSS'.when apply patch [als] Patch ALSS ,There was a mistake in the 'DSDT'
DSDT.txt

This is my DSDT
when my kext has voodooI2c ,F7 and F8 can't work,。Just now,The arrow of the picture arrow has no effect。
QQ20190730-080155

TODO

  • Add full support for Catalina

  • Change installation location of AsusSMCDaemon
    Summary: On Catalina, /usr/bin is no longer available.

  • Add support for ROG keyboards.
    Summary: Port hid-asus.c and rogauracore to macOS
    Result: AsusHIDDriver and macrogaura

  • Fix bug on HID-based keyboard

  • Support ACPI-based keyboard backlight found on some Vivobook Flip. Ref: #23
    Summary: Keyboard backlight is controlled in method _Q66 in ACPI. Looking at that method, it should work OOB, but it doesn't. Need to investigate more

  • Port WMI driver from Linux
    Summary: Port asus-wmi.c to macOS

  • Fix ALSC patch for device with ALSC under ATKD.WMNB

Work and compatible with virtualSMC 1.1.0

Today i updated VirtualSMC to 1.1.0 version and after that AsusSMC stoped working, keyboard and backlight working, but fn keys don't working, only if you install again Virtual SMC 1.0.9. Also its weird that in hackintool AsusSMC don't show on tab - installed .

How to make it suitable for my own PC

Hi,This's a great work,and I wish i could have the same function on my Alienware 17 R4.
Any help will be Appreciated.
Could u share ur acpi tables & ioreg files ,Thx.

[solved]UX310 Patch Problems

Dear hieplvip,
When I follow your AsusSMC installtion Guide to Patch My DSDT, I got some problem, my laptop is ASUS UX310.

  1. Follow step 1.1.1 , I found no ALS0 device,but ALS Device is avarible, so I patched it manually by instead Device (ALS0) with Device (ALS).
    Am I right?

  2. Follow step 1.1.2 , after patch ALSS, I got no method ALSC in device ATKD, so I Patch ALSC with your patch file.

After ALSC Patch, when I compile whole DSDT file, the ALSC method report a error.

 Method (ALSC, 0, NotSerialized)
            {
                If (CondRefOf(^^PCI0.LPCB.EC0.ALSC))
                {
                    Return (^^PCI0.LPCB.EC0.ALSC (Arg0))
                }
                Return (0)
            }

Method argument is not initialized (Arg0)

I changed (arg0)to (0)and compile success.
Am I right ?

3.After these above steps, I patched CPU in DSDT and generate a new DSDT file.
But After reboot, HOTKEY Function is all right but Keyboard BackLight still doesn't work.
Could you tell me which step I made mistakes?

I put my DSDT

(without your patch) in attach.
DSDT-all.zip

Thanks a lot and looking for your help.

Just a few questions...

I currently use EMlyDinEsHMG's kexts for keyboard and touchpad, but considering they haven't been updated in a while, I'm eager for an alternative. I assume that this kext would hence replace the keyboard portions, but would not help regarding the touchpad.

I'm just wondering if you hence use EMlyDinEsHMG's touchpad parts, or perhaps you could point me in the direction of an alternative?

Also, am I right to assume with this I would not need your AsusFnKeys driver?

Lastly, are the DSDT patches simply like those required by EMlyDinEsHMG's kexts, or are they different?

Thanks!

Capability to ROG Coffee Lake Devices

@hieplpvip Hi!
First of all, thanks for your great kext! It worked awesome on my old ASUS laptop.
Recently, I'm working on my ROG GX531, and the only things after the trackpad are the Fn keys and keyboard backlight.

  • This is a laptop with a Coffee Lake processor, and the patch is not available in the repo yet.

  • I'm not sure whether the brightness of the keyboard will work for ROG keyboards.

  • ROG keyboards have different Fn key positions

    • F1 -> Mute
    • F2 -> Volume decrease
    • F3 -> Volume increase
    • F4 -> Microphone mute
    • F5 -> Fan Speed Control
    • F6 -> Turn off screen
    • F7 -> Brightness decrease
    • F8 -> Brightness increase
    • F9 -> Switch monitor
    • F10 -> Disable trackpad
    • F11 -> Sleep
    • F12 -> Airplane Mode
      image
  • My Original DSDT table
    ACPI-Table-GX531.zip

After manually patching the Fn _QXX methods, those keys still don't function.

May you provide me some instructions on how to deal with these issues? I could try to figure out them myself first, if you need some files, I can provide all of them to you. Thanks in advance!!!

Fix to Install AsusSMCDaemon path in Catalina

Hi, sir.

I installed catalina in my vivobook, and I found issue of install AsusSMCDaemon.

in install_daemon.sh, script of cp AsusSMCDaemon, It's not copy inside of /usr/local/bin

I checked my /usr/local/bin, AsusSMCDaemon renamed and copied /usr/local/bin file. (Not directory.)

So, I edited install script to fix this problem, and finally it is work.

Here is my edit install_daemon.sh script.

install_daemon.sh.zip

IOUSBHostFamily version issue on Mojave

On my Asus ROG strix G531GT I installed Mojave 10.14.6 and patched the DSDT for F7/F8 LCD backlight keys and arrow keys, the keyboard backlight and all keys works as expected with all kexts in clover/EFI

However, i cloned my old macbook's hdd which has mojave 10.14.4 on a secondary partition and when i boot on 10.14.4 AsusSMC didn't not worked, moved extensions to /L/E and nothing happen, after a kext clear cache i saw below error.

AsusSMC.kext - no compatible dependency found for com.apple.iokit.IOUSBHostFamily. AsusSMC.kext is missing dependencies (including anyway; dependencies may be available from elsewhere)

Then i open the AsusSMC extension's Info.plist and modified

<key>com.apple.iokit.IOUSBHostFamily</key> <string>1.0.0</string>
to
<key>com.apple.iokit.IOUSBHostFamily</key> <string>1.2.0</string>
which is the right version and all keys started to work.

Now i wonder why on 10.14.6 works but not on 10.14.4 while the IOKIT is the same version on both macOSes

need help: UX305FA

Hi, need help here.
i have an ASUS UX305FA, its a broadwell laptop with intel core M and intel HD 5300. it has an ambient light sensor, but no keyboard backlight.
i already have a working hackintosh since a few years ago. And a working ambient light sensor using AsusNBFnKeys.kext and SSDT-ALS.aml.
but then i read that this AsusSMC.kext is the future so i want to give it a try. (what's the different between them, btw?)
so i tried to install AsusSMC.kext in EFI/CLOVER/ and use SSDT-ATK-BDW.aml and SSDT-RALS.aml but the ALS still won't work.

can someone please help what's wrong?

Issue with pause/break, prt sc/sysrq

I have an issue with my laptop ASUS:
Motherboard: P5440FA
CPU: I5-8265U (Whiskey Lake)

When I press the pause/break key, the brightness level up likes I press the Fn + F6 key. When I press the prt sc/sysrq key then that function is toggle enable/disable my trackpad likes I press Fn + F9 key.

This is my origin DSDT.zip

Asus S510UA-BQ423 Catalina Keyboard Backlight is not working.

Hi, I tried to update my laptop to use catalina, But keyboard backlight is not working.

I used mojave a weeks ago, It is work. And I installed catalina with clean install, It is not working.

I loaded all of kexts from Clover bootloader (Not L/E), (Because of bluetooth and some fn keys)

Here is my DSDT, please check about that, and give me a solutions. (I get troubles to fix DSDT... :( )

Thanks for your work. :)

DSDT.zip

Help macOS 10.15 KabyLake Asus Rog GL703VD

Hello, I need help on my notebook i5-7300HQ, I'll try to apply KabyLake patch to DSDT but PCI0.LPCB.EC0.WRAM and PCI0.LPCB.EC0.ST9E doesn't exit. In the search of similar variables i found a method called GLKB that store KBLV but I don't know what I need to replace in the patch.
This is my Keyboard layout:
F1: Mute
F2/F3/F4: Previous/Play-Pause/Next media
F5: Fan Booster
F6: Turn off screen
F7/F8: Decrease/Increase screen backlight
F9: Switch monitor
F10: Disable trackpad
F11: Sleep
F12:Airplane mode

Please help me. Thanks.

DSDT.aml.zip

Can't save keyboard light to 0 upon reboot/shutdown

Hi, thanks for this kext. There's only one thing bothering me, I can't set keyboard backlight to 0 (turned off) when I restart (I hate keyboard light when I don't need it). If I set other levels (1-2-3-4), that level is saved upon restart. Is it solvable?

No volume function keys on Mojave

Hello.
I'm using an UX330UA with Skylake i7 6500U and I've successfully installed your AsusSMC.kext and have all the other function keys working (F1-Sleep, F2-Airplane mode, F3/F4-Keyboard Bakclight, F5/F6/F7-LCD Backlight, F8-LCD/External Display, F9-I2C Trackpad ON/OFF) but the F10/F11/F12 - Volume buttons do not work.
I'm using DSDT hot patching and this what is present in DSDT after the patch is applied :
`
Method (_Q13, 0, NotSerialized) // _Qxx: EC Query
{
If (ATKP)
{
_SB.ATKD.IANE (0x32)
}
}

    Method (_Q14, 0, NotSerialized)  // _Qxx: EC Query
    {
        If (ATKP)
        {
            \_SB.ATKD.IANE (0x31)
        }
    }

    Method (_Q15, 0, NotSerialized)  // _Qxx: EC Query
    {
        If (ATKP)
        {
            \_SB.ATKD.IANE (0x30)
        }
    }

`
Also Used the AsusSMC debug kext to check for the _Q codes to confirm that the ones used in DSDT patch are corect and that the kext forwards the codes to OsX without any errors.

So I appreciate any hints on where to start looking for the issue
Best regards.

DSDT patches is not even close to my DSDT

I have Asus GL553VD laptop it's a kabylake 7700hq device all patches in new repo seems not working on my device I installed kext also it dependencies(VirtualSMC and Lilu) I can see it on ioreg.
Here is my DSDT can you look at it?
DSDT.aml.zip

Add Support For Skylake keyboard backlight

Thanks For this driver. Actually most of the fn keys working except Keyboard backlight F3/F4.
The patches provided for Skylake keyboard is not matching in my dsdt.

I have attached the working patch for keyboard backlight:
I have to insert this code under this method :

Method SCDG {} :

        Name (BOFF, Zero)
        Method (SKBL, 1, NotSerialized)
        {
            If (Or (LEqual (Arg0, 0xED), LEqual (Arg0, 0xFD)))
            {
                If (And (LEqual (Arg0, 0xED), LEqual (BOFF, 0xEA)))
                {
                    Store (Zero, Local0)
                    Store (Arg0, BOFF)
                }
                ElseIf (And (LEqual (Arg0, 0xFD), LEqual (BOFF, 0xFA)))
                {
                    Store (Zero, Local0)
                    Store (Arg0, BOFF)
                }
                Else
                {
                    Return (BOFF)
                }
            }
            ElseIf (Or (LEqual (Arg0, 0xEA), LEqual (Arg0, 0xFA)))
            {
                Store (KBLV, Local0)
                Store (Arg0, BOFF)
            }
            Else
            {
                Store (Arg0, Local0)
                Store (Arg0, KBLV)
            }

            Store (DerefOf (Index (KBPW, Local0)), Local1)
            ^^PCI0.LPCB.EC0.WRAM (0x04B1, Local1)
            Return (Local0)
        }

        Name (KBPW, Buffer (0x10)
        {
            /* 0000 */  0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
            /* 0008 */  0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF 
        })
        Method (GKBL, 1, NotSerialized)
        {
            If (LEqual (Arg0, 0xFF))
            {
                Return (BOFF)
            }

            Return (KBLV)
        }
    }

The keyboard backlight fn keys working with elmydinesh kext but not urs
Hope this helps you
Thank you

Need help with Rog Strix G531GU (i7 9750H, 1660ti) about Fn keys not working when use AsusSMC (So rude without replying and closing my issue and not including the reason why, LOL) !!!!! :)

Hi, I need help with enabling the Fn keys function to work with this model rog strix G531. Just sound increase and decrease (in default the keyboard already has) is can be used automatically without being patched (maybe also need patch ALC294 to work, maybe), and also mute key (Fn+F1) works! The rest not working at all.

Here's my keyboard layout (screenshot attached) and... I know this hard because this model quite new... Hope there's soon a patch for this model (Because now I rather inconvenient with RGB LED always be opened, I need to turn them off)
Appreciate your work

(So rude without replying and closing my issue and not including the reason why, LOL) !!!!! :)
Anyway, I found out the solution. Whatever ! Kid.

https://imgur.com/a/YNqcp2B

HID Keyboard doesn't work on macOS Catalina

Hey there,

I have an ASUS ROG GL-503GE laptop. The keyboard is HID based on USB bus.

When I use AsusSMC the keyboard does not work at all. I have attached debug log and also the IOREG.

Please take a look.

Regards
Debug.zip

Asus TUF504GE different keyboard layout

My keyboard layout is:
F1/F2/F3 Mute/Decrease/Increase volume
F4 Turn off microphone
F5 Fan speed
F6 Turn off screen
F7/F8 Decrease/Increase screen backlight
F9 Switch monitor
F10 Enable/Disable trackpad
F11 Sleep
F12 Airplane mode
Fn+Down/Up Decrease/Increase keyboard backlight
Fn+(Numerical Keyboard Enter key) Calculator

Extract DSDT from Clover
DSDT.zip

GL553VD

HI.
please add Asus Aura core for the laptop to your kexts bc aura keyboard backlight doesn't work.

Question about Function Keys

Hi,

There is a way to use the function keys without pressing the FN button ? I don't have an option for this in the UEFI.

Thanks !

ASUS X541UAK.

Backlight Keyboard WhiskeyLake Asus Notebook (Asus ZenBook UX333FN-A5811T)

I try this Kext and Patch for WhiskeyLake notebook, with original code in SLKB

Method (SLKB, 1, NotSerialized)
        {
            Store (And (Arg0, 0x7F), KBLV)
            If (And (Arg0, 0x80))
            {
                Store (DerefOf (Index (PWKB, KBLV)), Local0)
            }
            Else
            {
                Store (Zero, Local0)
            }
            ST9E (0x1F, 0xFF, Local0)
            Return (One)
        }

So i can't set

Method (SKBV, 1, NotSerialized)
           {
               Divide (Arg0, 0x10, , KBLV)
               ^^PCI0.LPCB.EC0.WRAM (0x09F0, KBLV)
               ^^PCI0.LPCB.EC0.ST9E (0x1F, 0xFF, Arg0)
               Return (Arg0)
           }

I will get this error if i put this SKBV method. Too few arguments, ^^PCI0.LPCB.EC0.WRAM required 3

So i delete line ^^PCI0.LPCB.EC0.WRAM (0x09F0, KBLV)

Backlight keyboard work but can't decrease and increase backlight. Just for information, this keyboard only has 1 button to increase and decrease Backlight keyboard (FN + F7).

I use Rehabman ACPIDebug.kext and Instrument EC,, i found the FN + F7 = method of _Q0D. I try to change Method _Q0D from "KBLU" to "KBLD",, after reboot when i repeat press FN + F7 ,, i saw decrease backlight in monitor, and backlight of keyboard is decreased too and turn off. But i can't increase backlight keyboard again (maybe because i change KBLU to KBLD in _Q0D). Then i change again "KBLD" to "KBLU" but after reboot,, Fn + F7 do nothing. No response, and keyboard backlight still in off status.

Any clue?? Please answer :)

another cpu

hello, i'm using an asus N551JW with an i7-4720HQ Haswell CPU... attached you will find the DSDT file.. hope you can make the patch for this model.. thank you...
DSDT.aml.zip

Asus GL503GE Keyboard FN Keys Not working completely

Sir
with asussmc.kext only media buttons Volume controls + - , mic mute unmute are working.

FN + F1(Mute) , F2(Previous) , F3(Play/Pause) , F4(Next) are working rest of the keys like disable touchpad, screen off.etc.....
also keyboard backlight controls using FN+Up/Down Arrow keys not working.

i tried applying your patches to dsdt but im geting compile error when i patch my cpu.

My keyboard layout is:
F1 Mute
F2 Previous
F3 Play/Pause
F4 Next
F5 Fan speed
F6 Turn off screen
F7/F8 Decrease/Increase screen backlight
F9 Switch monitor
F10 Enable/Disable trackpad
F11 Sleep
F12 Airplane mode
Fn+Down/Up Decrease/Increase keyboard backlight
Fn+(Numerical Keyboard Enter key) Calculator

plz can u help me with the issue?

Không điều chỉnh được Keyboard Backlight máy S530UN, bản KabylakeR

Bác Hiệp cho e xin cách sửa với. Máy đã làm theo hướng dẫn nhưng không thể tắt được đèn nền bàn phím, nó ở chế độ luôn luôn sáng.
ACPIDebug:
Fn + F1: mute
Fn + F2: giảm âm
Fn + F3: tăng âm
Fn + F4: giảm ánh sáng => _Q0E <hoạt động tốt>
Fn + F5: tăng ánh sáng => _Q0F <hoạt động tốt>
Fn + F6: tắt Touchpad => _Q12
Fn + F7: bật đèn nền bàn phím => _Q0D <không hoạt động>
Fn + F8: máy chiếu => _Q11 <chưa thử>
Fn + Esc: tắt phím Fn => _QD5
Fn + Enter(phụ): mở máy tính => _Q77
Fn + Space: ko biết => _Q71
Mong bác sửa giúp e với
DSDT copy.dsl.zip

Asus VivoBook S530Fn - Fn Keys are different

Hi. I managed to fix the keyboard backlight with AsusSMC and your patch - which I must say thank you for making it possible.
I have fully functioning Keyboard Light + 16 Light intensity after patching "[kbl] whiskeylake".
System is Asus VivoBook S15 S530Fn > i7-8565U, 8GB RAM, GeForce MX150 (disabled).

Although, there are some issues with the Fn Keys (I used Karabiner to remap the keys temporarily) as they are different on my laptop:

F1/F2/F3: Mute/Decrease/Increase volume
F4/F5: Decrease/Increase screen backlight
F6: Enable/Disable trackpad
F7: Keyboard Backlight (3 stages in Windows 10)
F8: Switch monitor (Unchanged)
F9: Home
F10: End
F11/F12: Page UP/Down

I remaped with Karabiner F6/F7 to "Decrease/Increase keyboard backlight" because I don't use Disable Trackpad at all.
Do you need me to upload DSDT so yo ucan see what I have going on?

Thanks

IMG_20190923_141000

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.