Contribute
Register

Xiaomi Mi Notebook Air 13 Skylake Sleep and Shutdown Issues

Joined
Apr 5, 2011
Messages
128
Motherboard
Asus P8P67 B3 3.0
CPU
i5-2500K
Graphics
HD 6870
Mac
MacBook Pro
Mobile Phone
Android
Hi,

I have a

Xiaomi Mi Notebook Air 13”, Bios vers A05 - CPU i5 6200U, HD 520 / GeForce 940MX

and I have spend the last weeks trying to turn it to a fully functional hackintosh. There is a thread on another forum but it is pretty much dead. The original author is not writing any more on the forum. So I took the configuration files (clover plus various kexts) from the forum (BIG Kudos to JahStories/Elijah), and with a lot of studying of the files of @daliansky and @stevezhengshiqi (Very BIG KUDOS to them) for the another Xiaomi laptop (Xiaomi Pro) I started looking on how to create an acceptable hackintosh for an every day use.

Then I started reading the guides of @RehabMan and I started putting missing pieces of the puzzle together. Wow RehabMan SUPER BIG KUDOS TO YOU!!!!

I guess my aim is once I have something stable to have a github version of a guide and open a thread here at tonymac.

For the time being I need your help. I am no expect, I was just copying things around and following guides.

I am still facing many problems. The ones I am working now are:

1. the laptop does not completely shutdown. When I give the shutdown command I can briefly see a 'CPU halted' the screen goes off but then the led on the power button stays on. The machine is not accesible from the network. However the backlight of the keyboard turns on when I touch a key. I have to press on the power button for some seconds to 'force' the laptop to go off.

2. When I put the laptop to sleep (from the apple menu) while being on power, when I wake it up again it looses the audio. At that point If I unplug the power and put it to sleep then the next time it wakes up the audio is back! (The laptop charges from a USB typec connector)

3. there is an unkown_device on the ioreg under AppleACPIPCI > pci8086,1904@0 (attached screenshot). Any idea how to debug and whether I need it or not?

Please find attached:

- ACPI.patches,zip: DSL of the patches I have used. All of them are based on the hotpatches of RehabMan
- ACPI.xiaomi.bios.a05.zip: stock ACPI tables both the aml and dsl version (captured from clover with F4)
- clover.zip: the clover directory
- commands.txt various commands (from the how to report)
- system.log.txt: the system log of the system for the period I have been experimenting with it
- on_battery_before_sleep.ioreg : the initial ioreg
- on_battery_after_sleep_audio_working.ioreg : the ioreg after I woke the laptop on battery
- on_power_before_sleep_audio_working.ioreg : ioreg with the power on before sleep
- on_power_after_sleep_no_audio.ioreg: ioreg with the power on after sleep (no audio)
- unknown_device.png: image from ioreg with the unknown device
- power_button.jpg: the power buton that stays on.


Sorry for my message being so long. Any help on any subject will be greatly appreciated!!!

Thanks!!!
sakoula
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,716
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Hi,

I have a

Xiaomi Mi Notebook Air 13”, Bios vers A05 - CPU i5 6200U, HD 520 / GeForce 940MX

and I have spend the last weeks trying to turn it to a fully functional hackintosh. There is a thread on another forum but it is pretty much dead. The original author is not writing any more on the forum. So I took the configuration files (clover plus various kexts) from the forum (BIG Kudos to JahStories/Elijah), and with a lot of studying of the files of @daliansky and @stevezhengshiqi (Very BIG KUDOS to them) for the another Xiaomi laptop (Xiaomi Pro) I started looking on how to create an acceptable hackintosh for an every day use.

Then I started reading the guides of @RehabMan and I started putting missing pieces of the puzzle together. Wow RehabMan SUPER BIG KUDOS TO YOU!!!!

I guess my aim is once I have something stable to have a github version of a guide and open a thread here at tonymac.

For the time being I need your help. I am no expect, I was just copying things around and following guides.

I am still facing many problems. The ones I am working now are:

1. the laptop does not completely shutdown. When I give the shutdown command I can briefly see a 'CPU halted' the screen goes off but then the led on the power button stays on. The machine is not accesible from the network. However the backlight of the keyboard turns on when I touch a key. I have to press on the power button for some seconds to 'force' the laptop to go off.

2. When I put the laptop to sleep (from the apple menu) while being on power, when I wake it up again it looses the audio. At that point If I unplug the power and put it to sleep then the next time it wakes up the audio is back! (The laptop charges from a USB typec connector)

3. there is an unkown_device on the ioreg under AppleACPIPCI > pci8086,1904@0 (attached screenshot). Any idea how to debug and whether I need it or not?

Please find attached:

- ACPI.patches,zip: DSL of the patches I have used. All of them are based on the hotpatches of RehabMan
- ACPI.xiaomi.bios.a05.zip: stock ACPI tables both the aml and dsl version (captured from clover with F4)
- clover.zip: the clover directory
- commands.txt various commands (from the how to report)
- system.log.txt: the system log of the system for the period I have been experimenting with it
- on_battery_before_sleep.ioreg : the initial ioreg
- on_battery_after_sleep_audio_working.ioreg : the ioreg after I woke the laptop on battery
- on_power_before_sleep_audio_working.ioreg : ioreg with the power on before sleep
- on_power_after_sleep_no_audio.ioreg: ioreg with the power on after sleep (no audio)
- unknown_device.png: image from ioreg with the unknown device
- power_button.jpg: the power buton that stays on.


Sorry for my message being so long. Any help on any subject will be greatly appreciated!!!

Thanks!!!
sakoula
"Problem Reporting" files are incomplete.
Read FAQ, "Problem Reporting" again. Carefully. Attach all requested files/output.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
Use the gen_debug.sh tool mentioned in the FAQ, that way it is less likely you'll omit something.
 
Joined
Apr 5, 2011
Messages
128
Motherboard
Asus P8P67 B3 3.0
CPU
i5-2500K
Graphics
HD 6870
Mac
MacBook Pro
Mobile Phone
Android
Hi!!!

@RehabMan sorry for wasting your time with my incomplete debug data. I have looked into the gen_debug.sh and it gave me great feedback on how to debug things! Thanks! I update also the post with the right debug data.

So my laptop is Xiaomi Mi Notebook Air 13”, Bios vers A05 - CPU i5 6200U, HD 520 / GeForce 940MX

I am looking on many many "issues" that I am facing. I am listing all of them in this post. I do not necessarily expect from someone to reply to all of them. I am asking for a direction since I have just started doing this about a month ago. Also @RehabMan can you please see my setup (clover and patching) and give some advice since I am pretty novice on what I am doing.

So my issues:

1. the laptop does not completely shutdown. When I give the shutdown command I can briefly see a 'CPU halted' the screen goes off but then the led on the power button stays on. The machine is not accesible from the network. However the backlight of the keyboard turns on when I touch a key. I have to press on the power button for some seconds to 'force' the laptop to go off. (see the attached power_button.jpg)


2. When I put the laptop to sleep (from the apple menu) while being on power, when I wake it up again it looses the audio. At that point If I unplug the power and put it to sleep then the next time it wakes up the audio is back! (The laptop charges from a USB typec connector). The included ioregs:

- on_battery_before_sleep.ioreg : the initial ioreg
- on_battery_after_sleep_audio_working.ioreg : the ioreg after I woke the laptop on battery
- on_power_before_sleep_audio_working.ioreg : ioreg with the power on before sleep
- on_power_after_sleep_no_audio.ioreg: ioreg with the power on after sleep (no audio)


3. there is an unkown_device on the ioreg under AppleACPIPCI > pci8086,1904@0 (attached unknown_device.png). Any idea how to debug and whether I need it or not? And also does my ioreg seems ok? Do I have to do something?

4. On boot I get the following ACPI errors with the stock DSDT. My stock DSDT compiles without any errors.

```
Version 0x20 Vectors 64:111
ACPI: Executed 29 blocks of module-level executable AML code

ACPI Error: No handler for Region [RAM_] (ffffff802f200460) [EmbeddedControl] (20160930/evregion-252)
ACPI Error: Region EmbeddedControl (ID=3) has no handler (20160930/exfldio-392)
[_REG] @0002B #002D: KLID

No Local Variables are initialized for method [_REG]
Initialized Arguments for Method [_REG]: (0 arguments defined for method invocation)
Arg0: ffffff802f497aa0 <Obj> Integer 0000000000000000
Arg1: ffffff802f4979b0 <Obj> Integer 0000000000000001

ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.EC0._REG] (Node ffffff803015e720) , AE_NOT_EXIST (20160930/psparse-632)
ACPI Error: No handler for Region [RAM_] (ffffff802f200460) [EmbeddedControl] (20160930/evregion-252)
ACPI Error: Region EmbeddedControl (ID=3) has no handler (20160930/exfldio-392)
[_REG] @0002B #002D: KLID

No Local Variables are initialized for method [_REG]
Initialized Arguments for Method [_REG]: (0 arguments defined for method invocation)
Arg0: ffffff802f497aa0 <Obj> Integer 0000000000000001
Arg1: ffffff802f4979b0 <Obj> Integer 0000000000000001

ACPI Error: Method parse/execution failed[\_SB.PCI0.LPCB.EC0._REG] (Node ffffff803015e720), AE_NOT_EXIST (20160930/psparse-632)
```


5. When I put the laptop to sleep when later I shut it down I get distorted video. Is this something known? See attached distorted_video.jpg


6. I have used @RehabMan's amazing OS-X-ACPI-Debug to troubleshoot ACPI issues. The kext works great. However it does not work for the SSDT-DDGPU.aml file. Should I assume that the RMD1>_INI method is being invoked upon boot before ACPIDebug is loaded and this is why I do not see debug messages from that method?

Note:
kernel_log.txt includes all the kernel logs for the following procedure:

a. boot on battery
b. sleep on battery
c. wake up on battery
d. plug the ac adapter
e. sleep on power
f. wake up on power
g. shutdown on power
h. boot on power


Sorry for the super long post. Again please any feedback on any point is greatly appreciated!!!!

Thanks!
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,716
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
1. the laptop does not completely shutdown. When I give the shutdown command I can briefly see a 'CPU halted' the screen goes off but then the led on the power button stays on. The machine is not accesible from the network. However the backlight of the keyboard turns on when I touch a key. I have to press on the power button for some seconds to 'force' the laptop to go off. (see the attached power_button.jpg)
Probably is ACPI problem.
See ACPI patching guide linked from the FAQ.

2. When I put the laptop to sleep (from the apple menu) while being on power, when I wake it up again it looses the audio. At that point If I unplug the power and put it to sleep then the next time it wakes up the audio is back! (The laptop charges from a USB typec connector). The included ioregs:
Your kextcache output proves kexts are not installed correctly.
All kexts you need must be installed to the system volume.
Read post #2 of the Clover guide for details:
https://www.tonymacx86.com/threads/guide-booting-the-os-x-installer-on-laptops-with-clover.148093/

No sense in looking at any of your other questions until you fix basic things like ACPI and kext installation.
 
Joined
Apr 5, 2011
Messages
128
Motherboard
Asus P8P67 B3 3.0
CPU
i5-2500K
Graphics
HD 6870
Mac
MacBook Pro
Mobile Phone
Android
Hi @RehabMan . Many many MANY thanks for your reply!!!


Regarding the ACPI errors:

I disassembled the origin amls according to your tutorial. The DSDT.dsl compiles with a bunch of warnings that I think I can disregard and with absolutely no error. For the refs.txt I use:

```
External(_GPE.MMTB, MethodObj, 0)
External(_SB.PCI0.LPCB.H_EC.ECWT, MethodObj, 2)
External(_SB.PCI0.LPCB.H_EC.ECRD, MethodObj, 1)
External(_SB.PCI0.LPCB.H_EC.ECMD, MethodObj, 1)
External(_SB.PCI0.PEG0.PEGP.SGPO, MethodObj, 2)
External(_SB.PCI0.GFX0.DD02._BCM, MethodObj, 1)
External(_SB.PCI0.SAT0.SDSM, MethodObj, 4)
External(_GPE.VHOV, MethodObj, 3)
External(_SB.PCI0.XHC.RHUB.TPLD, MethodObj, 2)
```

and for the the disassemble I use your latest version of iasl from https://github.com/RehabMan/Intel-iasl and the command:

```
iasl -da -dl -fe refs.txt DSDT.aml SSDT*.aml
```

I attach the output (origin_dsl.zip) and a screenshot of compiling with maciASL (macasl.zip).

This is why I am trying to hotpatch the DSDT based on your GREAT tutorials and input from other hackintoshes guides. So I am not editing the DSDT at all.

Please note that despite the ACPI errors the laptop is functioning. However I tried to fix the errors by patching the DSDT without luck:

1. `No handler for Region [RAM_] (ffffff802f200460) [EmbeddedControl] (20160930/evregion-252)` Any clue what this may be?

2. `Initialized Arguments for Method [_REG]: (0 arguments defined for method invocation)`. _REG takes 2 arguments but I cannot see it being invoked anywhere. So my theory is that macOS invokes this function with no arguments. I tried and patched the DSL removing the 2 arguments definition `Method (_REG, 0, NotSerialized)` but I got a similar error on boot and the iasl compile threw a warning that the reserved _REG functions required 2 arguments.

3. `ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.EC0._REG] (Node ffffff803015e720) , AE_NOT_EXIST`. The _REG function is defined in the scope of _SB.PCI0.LPCB.EC0. When I tried to redefined in a different scope block it gave me an error.

Errors:

```
Version 0x20 Vectors 64:111
ACPI: Executed 29 blocks of module-level executable AML code

ACPI Error: No handler for Region [RAM_] (ffffff802f200460) [EmbeddedControl] (20160930/evregion-252)
ACPI Error: Region EmbeddedControl (ID=3) has no handler (20160930/exfldio-392)
[_REG] @0002B #002D: KLID

No Local Variables are initialized for method [_REG]
Initialized Arguments for Method [_REG]: (0 arguments defined for method invocation)
Arg0: ffffff802f497aa0 <Obj> Integer 0000000000000000
Arg1: ffffff802f4979b0 <Obj> Integer 0000000000000001

ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.EC0._REG] (Node ffffff803015e720) , AE_NOT_EXIST (20160930/psparse-632)
ACPI Error: No handler for Region [RAM_] (ffffff802f200460) [EmbeddedControl] (20160930/evregion-252)
ACPI Error: Region EmbeddedControl (ID=3) has no handler (20160930/exfldio-392)
[_REG] @0002B #002D: KLID

No Local Variables are initialized for method [_REG]
Initialized Arguments for Method [_REG]: (0 arguments defined for method invocation)
Arg0: ffffff802f497aa0 <Obj> Integer 0000000000000001
Arg1: ffffff802f4979b0 <Obj> Integer 0000000000000001

ACPI Error: Method parse/execution failed[\_SB.PCI0.LPCB.EC0._REG] (Node ffffff803015e720), AE_NOT_EXIST (20160930/psparse-632)
```

Regarding where to install the kexts:

Up to now I really thought that the only valid place is kexts/Other in the CLOVER dir. Thanks for pointing this!!!! I read very carefully your guide and got very helpful input. I installed all the required kexts in /L/E and the minimum kexts in kexts/Other. I took also the oportunity and used WateverGreen to fix the DVMT. This fixed my number 5. issue with the distorted video on the shutdown!!!!

Please find attached the new debug.


Thanks again for your help and your patience to look on the files!
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,716
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
1. `No handler for Region [RAM_] (ffffff802f200460) [EmbeddedControl] (20160930/evregion-252)` Any clue what this may be?
...
ACPI Error: No handler for Region [RAM_] (ffffff802f200460) [EmbeddedControl] (20160930/evregion-252)
ACPI Error: Region EmbeddedControl (ID=3) has no handler (20160930/exfldio-392)
[_REG] @0002B #002D: KLID
This can happen if code in ACPI accesses the EC region before _REG for the EC has been called.
Requires review of all EC related code that may execute very early (typically from _INI or _STA methods).
From the logs, looks like related to code accessing KLID identifier.
 
Joined
Jul 17, 2015
Messages
401
Motherboard
MSI GE62-2QC
CPU
5700HQ/HM87
Graphics
Intel HD5600 + GTX960M (1920 x 1080)
Mobile Phone
iOS
Joined
Jul 17, 2015
Messages
401
Motherboard
MSI GE62-2QC
CPU
5700HQ/HM87
Graphics
Intel HD5600 + GTX960M (1920 x 1080)
Mobile Phone
iOS
I don’t know how I can fix with hotpatch.
 
Top