Contribute
Register

Asus ZenBook UX510UX remaining minor issues

Joined
Jul 24, 2019
Messages
14
Motherboard
Asus ZenBook UX510UX
CPU
i5-7200u
Graphics
HD620 + GTX950M
Mobile Phone
iOS
I installed Mojave 10.14.5 to my UX510UX (UX510UXK version) and after I spent 2 days with the I2C touchpad configuration I decided to apply the UX410 config from hieplpvip's guide and almost everything is working well.

I modified a layout-id in "SSDT-UX510-KabyLake" (originally UX410) to 0x0D since the UX510 uses ALC256 and I get audio. I also added USBInjectAll.kext and configured my USB ports. (Note: I have no USB-C devices, so at the moment probably the USB-C port is disabled but I'll try to get one and test it.) At this point I'm very happy with the results but it would be good to solve the remaining problems. I list everything because it might be useful to someone, but the question is: Is there a way to fix the remaining few things?

Working
  • USB3 ports (SH and SS things are tested and working properly)
  • CPU and GPU (native power management, full acceleration)
  • Touchpad (Asus Precision Touchpad (ELAN1200 I2C) even the 4 finger gestures are ok. Can be disabled with hotkey. So far I haven't recognised any glitch.)
  • Sleep/Wake
  • Brightness control (slider and hotkey, 16 levels, auto change when I connect/disconnect the charger
  • Keyboard backlight (16 levels, 3-4 should be enough because you can't see the difference but at least it's working)
  • HDMI (picture + sound, max 4k/30 as Intel described. 4k/60 should only be possible through USB-C DP)
  • Internal Speakers and Microphone
  • Camera (USB2.0 HD UVC WebCam)
Partially working:
  • Jack connector. Output is OK, but external microphone is not working (tested with Apple EarPods only) Working properly. See: post #8
  • Sensors are looking good but I have an unknown 8086,9d31 device in IORegistryExplorer (Sunrise Point-LP Thermal subsystem)
  • Battery (Indicator is ok but cycle count, serial number, etc. are missing. If I remember correctly everything was working properly with Rehabman's kext and solution. I will check it later. Replaced to Rehbaman's ACPIBatteryManager.kext, now everything is working properly
  • FN keys - everything is working except F2,F8,A and the multimedia buttons (see below) Fn+A, just like the ALS is working properly since I updated the BIOS to the newest version. F8 is not supported by macOS, F2 is still untested since I don't have a device which can be disabled. (Still waiting for root device :lol: DW1560)
Not working:
  • WiFi as expected (Intel, I'm waiting for DW1560) Replaced to DW1560
  • Card reader (Realtek USB2.0-CRW connected to USB3 bus), tried to spoof the device ID's also tried to disable every SS USB's, and a few different things but nothing helped. It's working on other Zenbook's so I'm out of ideas. Probably it will never work. So far nobody has ever managed to make this work.
  • ALS is not working at all. According to some forums the ALS method is buggy in some Asus notebooks (related to GALS method), caused by a missing () ("GALS" instead of "GALS ()"). My native DSDT also contains this bug, I corrected it and I was able to compile it but as soon as I close MaciASL and reopen the compiled AML it's missing again. Also tried to move the GALS method to the beginning of the WMNB method but it did not hep. So I checked the original DSDT of an UX410 (GALS, ALSS and ALSC are defined in a different place and tried to patch mine based on that. I was able to compile it (it was a quick "fix" actually) but it did not help. I also tried SMCLightSensor.kext but same results. Fixed, "explanation" in the next post.
  • Fn+F8 (switch display) is not working. I connected the notebook to my TV through HDMI, tried to mirror and and extend the screen but I was unable to switch between modes. (Actually I don't even know how should it work.) This function (display screen only in 1st/2nd monitor) is not supported, so it's perfectly normal, that the hotkey is not working.
  • Fn+A (ALS On and OFF), probably because the ALS itself is not working Fixed
  • Fn+Arrows (media keys). This one is not in my config since when I tried to apply the patch the AsusSMC caused kernel panic (see the attachments). If I'm right I should add the corresponding patch from this repo to "SSDT-UX510-KabyLake" and I'll need to patch the corresponding buttons from Clover. Am I right? Update: I tried to implement them but they are not working. To be honest I've never used them, so I don't really care.
Not tested:
  • USB-C - at this point probably it's disabled due to SSDT, I'll put back later. Tested. Working properly.
  • Fn+F2 (airplane mode) - I'll test it after the DW1560 arrives Working properly
Note:
At the moment the whole system is installed to an external USB2.0 HDD and yes, I know that I should not install the kexts to the EFI Partition. I'll correct it as soon as I install the system to SSD but at this point it's easier to handle the system.

Any ideas?
 

Attachments

Last edited:
Joined
Jul 24, 2019
Messages
14
Motherboard
Asus ZenBook UX510UX
CPU
i5-7200u
Graphics
HD620 + GTX950M
Mobile Phone
iOS
I fixed the ALS problem but I had to patch modify my DSDT. It would be good to add the patch to the SSDT/Clover if it's possible but I have no idea how to do it. As I mentioned before according to some forums, a lot of ASUS notebook suffers from this ALS "bug" so it might be useful for other people also.

Explanation:

To make the ALS work we need to add the missing ALSS method to device ATKD (AsusSMC repo: http://raw.github.com/hieplpvip/AsusSMC/master), and we also need the ALSC patch if the ALSC method is in a wrong place. In my case the SSDT contained both patches but the ALSC patch did not work because:
  • If you compare the UX410 and UX510 DSDTs you can see that the
    • ALSC method is called in _SB.PCI0.LPCB in case of UX410 (the patch was written to this machine) but in case of the UX510 it's called by the WMNB method in Device: ATKD.
    • Same situation in case of ALSL and GALS methods
    • Due to the wrong location the ALSC patch was not effective so the ALS did not work
What I did:
  1. In the first place I tried to modify the ALSC patch in the SSDT (see: attachments of 1st post). I modified the "^^PCI0.LPCB.EC0.ALSC" lines in the ALSC patch to "^WMNB.ALSC" and also added _SB.ATKD and _SB.ATKD.WMNB as external source but it did not help.
  2. So I removed the ALSC patch from the SSDT completely and patched my DSDT. The result was compile error so I had to modify the "ALSC, 0, NotSerialized" to "ALSC, 1, NotSerialized", but again it did not help.
  3. So I decided to recreate the structure of the UX410 DSDT, so I put back the original SSDT what is working perfectly so far and
    1. I moved the ALSC, ALSL and GALS methods from _SB.ATKD.WMNB to _SB.PCI0.LPCB.EC0 right after the RALS method -> 8 compile error
    2. In the WMNB method object GALS was not accessible anymore so I had to modify "And (GALS ()..." to "And (^^PCI0.LPCB.EC0.GALS ()...", "Return (ALSC..." to "Return (^^PCI0.LPCB.EC0.ALSC..." and "Return (ALSL..." to "Return (^^PCI0.LPCB.EC0.ALSL..."
    3. In the freshly moved ALSC method I had to do the exact opposite thing. I removed "^^^PCI0.LPCB.EC0." before "TALS", "RALS", and "GALS"
    4. Finally I had to modify "^^^PCI0.GFX0" to "^^GFX0.AINT"
  4. I compiled the DSL to AML, copied to patched folder. The SSDT was able to patch the patched DSDT and after reboot the ALS started working. I can enable and disable it with Fn+A but the hotkey is only effective if the "Automatically adjust brightness" is enabled.
Attachments:
  • UX410 original DSDT.dsl
  • UX510 original DSDT.dsl
  • UX510 modified DSDT.dsl
Final words:
I'm happy that the ASL is working and I hope these lines will be useful for somebody else also. Unfortunately I have no idea what solved the problem, but I would be really grateful if somebody could create a DSDT/SSDT patch. I know nothing about patch writing and I'm still learning the hot patching.
 

Attachments

Joined
Sep 24, 2013
Messages
111
Motherboard
Asus ZenBook UX410UQK
CPU
i5-7200U
Graphics
HD 620 - 940MX
Mobile Phone
Android
@Pityke Sounds like I need a better way to call ALSC :)

Several things about your build:
1. Card reader it not working: Perhaps your UIAC patch is incorrect. Btw, on my laptop, I don't need to use USBInjectAll because my DSDT already provides correct port config.
Suggestion: Update to latest BIOS and remove USBInjectAll

2. External microphone not working: When you plug your microphone, input device won't change to "Line in" (which means external) automatically, at least on my laptop.
Suggestion: Change input device to "Line in" manually in System Preferences

3. 8086,9d31: I have one too. Not sure what it does??

4. Fn+F8: Honestly, it has never worked for me, and I don't even know how it should work.

5. Fn+F2: Airplane should work after you install AsusSMCDaemon.

6. Battery: Perhaps current SSDT patch is not fully compatible with your DSDT. I'll check it.

7. Media keys + ALS: I'll create new Clover patch for you, but I can't promise when, though.

UPDATE: I've add partial support for UX510 on my repo
 
Last edited:
Joined
Jul 24, 2019
Messages
14
Motherboard
Asus ZenBook UX510UX
CPU
i5-7200u
Graphics
HD620 + GTX950M
Mobile Phone
iOS
@baohiep Or Asus should provide a proper firmware which does not mess up the DSDT. :lol:

1. If I remember correctly I tested the card reader before I added the USBInjectAll and it did not work. Then after I added the UIAC patch I read this post so I tried to boot with -uia_exclude_ss but it did not help. I will try your solution after I get home.

2. Actually I'm not sure that is not working because I've only tested it with an Apple EarPod and as you can see here Apple uses different pinout. I have a HyperX Cloud II in my workplace (meeting headset :lol:) and I wanted to tested the jack with it yesterday but I noticed at home that I forgot to take the mic (it's detachable). I plugged it in and the Input switched to Line In for half a second then it switched back to Internal (probably because of the missing mic). So it might happen that it's actually working. I'll test it today.

I checked SSDT-UX510-KabyLake.dsl in your repo and I see that beside the layout, you also replaced the SSDT-CX8050 to SSDT-ALC256. I'll test it as soon as I get home. I know that my codec is ALC256 but for some reason it's working pretty well with SSDT-CX8050. I'll test both and let you know about the results.

3. Well, it's thermal subsystem so probably it's a thermal subsystem. Probably it should not cause any problem (my temperatures are OK) but that's my only unidentified device in IOREG.

4. Probably it should not. When I connected my TV through HDMI I checked the display preferences and I was able to switch between mirror and extend mode but that's all. There is no option for "Only on Display 1/2" so probably it should do nothing. On another forum it says Fn+F8 is "unrecoverable".

5. I think I installed it (or not), but I think it's not working because at the moment I'm still using the original Intel WiFi so there is no device what can be disabled with Airplane mode. I'll try to reinstall Deamon as soon as I get home, and if it's still not working I'll test it again as soon as the DW1560 arrives.

6. I replaced the Battery kext to RehabMan's kext and the cycle count started to work. Serial number is still empty but probably it's normal. I checked my battery with coconut also and I still have some strange data (e.g.: manufacturing date: 1970), but probably these are not even exist in the battery. I think the measurement is still incorrect. According to coconut the designed capacity is ~4600mA but that's 52Wh and in reality it's only 48Wh. The fully charged capacity also sometimes shows ~3100, sometimes ~2900 (which is also incorrect, because it's in perfect shape), so I might drain it to 0 and charge it to full...

7. I will try a few things today. At this point what is unclear, that your Instruction mentioned that the ALSC patch is only necessary if ALSC method is not under ATKD. In my case it's under ATKD.WMNB. So it's under ATKD but not in the "root". Anyways I'll try the experiment a little and give you some feedback. BTW when I activate/deactivate the ALS, should I see some kind of "ALS enabled/disabled" notification like in case of brightness/volume? Because at the moment I see nothing.

I also noticed one thing: In my room the ALS applied around 10 as brightness (in a scale of 1-16). Then I turned the ALS off, manually adjusted the brightness to maximum and rebooted the machine. After it restarted the brightness was 10 again, even thought I left the ALS disabled before I reboot. Is that a correct behavior?

Thank you again for your work, it made my life so much easier. I'll definitely donate you some kudos :)
 
Joined
Sep 24, 2013
Messages
111
Motherboard
Asus ZenBook UX410UQK
CPU
i5-7200U
Graphics
HD 620 - 940MX
Mobile Phone
Android
1. ALSC should be directly under ATKD. I'll update the wiki.
2. ALS is turned on automatically on every boot (my bad, sorry). I'll update AsusSMC to save ALS status
 
Joined
Jul 24, 2019
Messages
14
Motherboard
Asus ZenBook UX510UX
CPU
i5-7200u
Graphics
HD620 + GTX950M
Mobile Phone
iOS
Okay, I got home and updated my BIOS from 300 (Jeeeesus -.-') to 305 and I extracted my DSDT with Clover F4. I compared the old and the new DSDT and it's full of differences.

First of all ALSC, ALSL and GALS methods are no longer under WMNB but under SB.PCI0.LPCB.EC0 so the ALS started working without a patched DSDT (I think it uses the original method). The funny thing is that I compared my old DSDT with the new, and my new DSDT with yours and my new DSDT is much more closer to yours then to my old one... Basically 90% of the differences between yours and mine are caused by the different CPU... Crazy....

So It was my bad, that I forgot to update the BIOS. I think you should mention the BIOS update in the wiki as "super-important, do it or the world ends!" or something like this...:lol:

So the progress: (With the regenerated SSDT)
  1. Card reader is still not working. I removed the USBInjectAll and the UIAC patch but still not working. Probably your card reader is different. I have a Realtek (VendorID: 0x0bda, ProductID: 0x0129). ls -l | grep "AppleStorage" gives me nothing so for some reason it's not loading the AppleStorageDriver.kext. Is that normal?
  2. Kinda resolved (See: Update 3) Audio situation is the same but I noticed something and also have a few comments, but probably it's ALC256 related.:
    • You said: "Change input device to "Line in" manually in System Preferences", but it's not possible. I only have one input and one output device. Normally these are Internal Speakers and Internal Microphone. If I connect a headset Internal Speaker disappears and instead of that I have Headphone. Same for the external microphone because it's working "once". But basically because of this behaviour it's not possible to change the input/output device. While a headphone is connected it will use the headphone no matter what.
    • External microphone is working once: When I startup the system everything is OK. If I connect a headset, the Output changes to Headphone, and the Input changes to Headphone Line-In (I think). I tested, and it's working properly. But If I disconnect the headphone (everything changes back to internal), then connect it again, the output changes to headphone, but the microphone remains in Internal. But it literally only working once right after I install/replace the SSDT. So it might be a bug somewhere....
    • This problem does not exist in case of HDMI. I have a multimedia monitor at home, and when I connected it through HDMI, the HDMI output and input (there is a jack on the monitor) appeared as new inputs, so I was able to switch between HDMI<->Internal OR HDMI<->Headphone when the headset was connected.
  3. Still exists but I don't really care.
  4. Still not working, I believe the function itself is not supported
  5. Installed Deamon, but still not effective. I'll test it again when the DW1560 arrives (hopefully on next week)
  6. Currently I'm using Rehabman's kext but the Designed capacity in Coconut shows a different value again. I'll play with it later, but to me it's not a big deal.
  7. ALS is working properly with your patch as I mentioned. I tried to implement the Media Keys (I added the clover Rename patches and also added the patches to the SSDT) but it was not working. I had no kernel panic or anything it was just not effective. I'll try again with this new BIOS.

I attached my old my new DSDT if you want to compare them.

Update: Battery management pictures uploaded. Cycle count is still only working with Rehabman's kext. Full Charge Capacity (just like the designed capacity) is different in case of the two kexts.

Update2: Debug files attached.

Update3: I decided to change to layout 21 from 13. For some reason the automatic switch between Internal Mic and Line-In is not working properly. In case of layout 13 (and 11) the automatic switch is working once and in that case the external mic is working. But after I unplug the headset, the automatic switch - only in case of mic - fails. (Maybe I should ask the AppleALC developers about this.) In case of layout 21 the automatic switch of the output is working properly just like in case of layout 13, but I've got two input devices (Internal and Line In) and both are working properly. The only disadvantage of this that I need to manually choose the mic after I plug a headset. HDMI audio is still working properly with layout 21.

Update4: Updated to 10.14.6, nothing changed. What was working is still working, card reader is still dead.
 

Attachments

Last edited:
Joined
Sep 24, 2013
Messages
111
Motherboard
Asus ZenBook UX410UQK
CPU
i5-7200U
Graphics
HD 620 - 940MX
Mobile Phone
Android
@Pityke I have two input devices, and I have to change them manually too. Not sure if this's a problem...

I've been very busy these days, so I can't update AsusSMC yet. Just want to let you know...
 
Joined
Jul 24, 2019
Messages
14
Motherboard
Asus ZenBook UX510UX
CPU
i5-7200u
Graphics
HD620 + GTX950M
Mobile Phone
iOS
@baohiep I was playing a little bit with the ALC256 and now everything is working properly. I needed to install ALCPlugFix. At first I installed it from your repo (/src/alcplugfix/alc255) and it was working but I had problem with static noises from headset. So I tried several versions from several repo's and I found the perfect version.

For properly working audio the following things are necessary:
- SSDT-ALC256 from your repo
- Layout ID 13
- ALCPlugFix v2-ALC2XX by black-dragon74 (Huge thanks to him also!)

Behavior:
- Headset unplugged: Output: Internal Speakers, Input: Internal Microphone
- Headset plugged: Output changes to Headphone, Input changes to Line In

Everything is automatic, both internal and external mic are working properly, audio from built-in speaker and from headset is clear and as loud as under Windows. HDMI audio is still working properly. Everything is still working properly after 1 hour of sleep. Basically at the moment it looks like it's just perfect.

F2 key is still untested because I'm waiting for the DW1560, but basically everything is working except the card reader, but probably it never will.

Few notes:
  • I reinstalled the system and I tried to follow your guide from step to step like a "full amateur" just to make sure that the guide is correct and here are my experiences:
    • I had to use the retail clover, I've had several problems with Rehabman's version. My drivers right now: ApfsDriverLoader.efi, AudioDxe.efi, DataHubDxe.efi, FSInject.efi, HFSPlus.efi, OsxAptioFix3Drv.efi, SMCHelper.efi, and I'm using the latest official Clover.​
    • You forgot the mention that the DSDT must be extracted before the installation. (I tried to run the installer without DSDT's and I had a lot of errors in verbose. After I extracted the DSDT these errors were gone.​
    • If I remember correctly the generated config.plist did not contain my SMBIOS from the original config.plist even if it should keep it. (I'm not 100% sure, I'll test it again at some point)​
  • I think the ALSC patch what you added it not necessary. In my case the problem was that my BIOS was too old. After I updated my BIOS it's looking like yours, so in my opinion you can remove that "fix", and instead of that you should mention in your guide, that the BIOS update is really, really important.
  • My DW1560 should arrive next week, and after that I'll do a clean install to my SSD instead of an external HDD. I'll let you know about the results, and if everything goes well I think you can add the UX510 to the official compatibility list.
  • About TRIM: As I know the TRIM is working properly under Mojave, so when your script asks the file system, can I "lie" that I'm using HFS+? As I see it just disables the TRIM related patch in config.plist. If it's really working properly under Mojave APFS I would like to enable it.
 
Joined
Jul 24, 2019
Messages
14
Motherboard
Asus ZenBook UX510UX
CPU
i5-7200u
Graphics
HD620 + GTX950M
Mobile Phone
iOS
The DW1560 has arrived. At first I had no WiFi so I googled a little and it turned out, that I need to tape PIN54 and PIN56 (radio disable signals) on the card (A+E key card, the original was E key only). So I taped them, and since then WiFi + BT is working properly. I'll install the system to the internal SSD soon, but except the card reader everything is working.
 
Joined
Sep 18, 2019
Messages
2
Motherboard
Asus ZenBook UX510UXK
CPU
i5-7200U
Graphics
HD 620 + 950M
I use your clover for my laptop but I have problem with audio. Speaker is not working after shutdown. I don't known how to fix with ALCPlug. Can you upload your debug?
 
Top