syscl / XPS9350-macOS

macOS patches for Dell XPS 13 9350 (Skylake)
916 stars 74 forks source link

Sleep/Resume Issues #13

Open gctseng opened 7 years ago

gctseng commented 7 years ago

[Creating this issue to track sleep/resume issues] Similar to a couple of others, I note: -When I close the laptop it doesn’t sleep and the screen remains on. -Sleep does work when I manually sleep in the Apple menu. -Screen remain black upon reopening if I manually sleep the laptop (although keyboard seems to light up), but then I have to shutdown and reboot again.

gctseng commented 7 years ago

Update XPS9350 Run (commit 7627ba4): 2016-12-14 10:04

Notes:

syscl commented 7 years ago

@gctseng Could you detach the USB 3.0 to see if the sleep work?

BTW, what specs you have? Iris version or non iris version?

syscl

gctseng commented 7 years ago

@syscl Iris 540, according to the report I dumped from System Information in Windows 10 before I wiped it (and before I updated firmware to 1.4.10). Enclosed is the full report.

I will try the sleep issue in about an hour. I need to get some work out. :/

Dell XPS 13 9350 Information 2016-12-11.txt

syscl commented 7 years ago

@gctseng We have the same graphics card, thus we are pretty much the same specs(I mean my deploy.sh can directly run on your laptop).

Sleep work flawlessly on both 1.4.4 and 1.4.10:

All the scenarios sleep pretty well. Thus, I suspect it's very possible the USB Lan causes sleep issue(very known issue in both Mac and Hackintosh). That's why I started a project fixUSB to fix the usb sleep issue. In fixUSB, USB storage has been fixed pretty well, but USB Lan depends. That means, I need more information about USB Lan and USB Lan kext to fix this. Thanks.

syscl

syscl commented 7 years ago

@gctseng No need to sleep laptop for an hour, just put it sleep about 5mins to see if it works.

syscl

gctseng commented 7 years ago

@syscl Update XPS9350 Run (commit 6595d0b): 2016-12-14 12:59 With USB LAN dongle removed and charger not plugged in.

Should I update to 10.12.2 before we test further?

syscl commented 7 years ago

@gctseng I have already updated to latest 10.12.2 through App Store, see here

Could you please confirm put sleep into Windows still work? Light of power button turn off about ~30s is Apple's design. Because it can save your time once you don't want to sleep or you do something wrong. Thus it's normal.

BTW, could you test plug-in your headphone and change the volume to see if there's some very tiny noise from hp? Don't forget to check/select 'Play feedback when volume is changed' in Setting Pref-->Sound-->Sound effect first?

Thank you syscl

syscl commented 7 years ago

@gctseng I am not sure if that's my laptop's defective. If not, we have to contact Dell for fix

syscl

gctseng commented 7 years ago

@syscl I don't have Windows installed at all anymore (I wiped the disk completely when I installed Sierra.

Re: BTW: Other than the feedback sound (the feedback sound is like someone hitting a coconut?), I don't hear any other noise WHEN changing volume.

HOWEVER, now that you mention it, whenever I stop playing music or any audio (basically after any audio is played, such as an alert sound or music), I do hear a very, very low volume noise, like static (almost very hard to hear) that lasts for about 10-15 seconds. After that period, there is a little "pop" (again, very low level, but noticeable) and then complete silence. Note: I've noticed this when I use my Bluetooth headset with my iPhone (without the "pop" being so noticeable). For example, when I type on my iPhone it plays the key tap feedback, but when I stop typing there is a low level of noise that lasts for a few seconds. So maybe this is something to do with Apple's design?

Okay, I will upgrade to 10.12.2 through the App store.

syscl commented 7 years ago

@gctseng That's it, and I conform in Windows and Ubuntu, same issue. Thus, it maybe a little defective about our product. We have to contact Dell to see if there's a workaround. Anyway, no big issue.

You mention that sleep will cause reboot, can you rebuild kernel cache to see if this fix your issue:

cd XPS9350-macOS
tools/rebuild

syscl

gctseng commented 7 years ago

@syscl Kext cache rebuilt. I've been noticing mdworker threads (I think it's Spotlight) hammering the CPU.

I tried the Sleep menu (without closing the lid). Screen went off but keyboard remain lit and I could hear CPU fan. Waited for like 5 minutes and tried to hit the keyboard = Reboot.

Closing the lid and waited until light on power button went off. Opened lid and screen remained blank, keyboard would light up when I touched it, then go back to sleep. Also noticed that fan started cranking at full speed after about 30 seconds after I opened the lid. Couldn't do anything other than reboot.

BTW, when I reboot I notice that sometimes it will complain that IG is being called in a non-wake state. Also got a KP once (the KP was rebooting after the resume failed from the "Sleep" command). See the screenshots of Clover boot-up in verbose mode. I forget if there's a way to turn on logging. Is it in the config.plist?

img_4832

img_4843

syscl commented 7 years ago

Oh, @gctseng do you use hwp before? A known argument that will cause data corrupt. And, once you enable hwp, you have to reinstall the macOS to disable it.

syscl

gctseng commented 7 years ago

@syscl No. Never used HWP before. As soon as I created a backup USB for Windows 10 (just in case, lol), I wiped the drive and then installed Sierra (12.1) using a USB with your CLOVER folder. So you can say my Dell is a good test case because I had literally just went from Windows to OS X.

The bios settings was as recommended on this thread: https://www.tonymacx86.com/threads/guide-dell-xps-13-9350-macos-10-12-1.204730/

gctseng commented 7 years ago

@syscl Busy until the weekend. I will be receiving my wifi adapter in the next day or two so it may be better to troubleshoot any sleep issues then (it's a pain to plug/unplug the USB LAN, haha).

In the meantime, let me know what other info I can provide you (capture logs, etc.).

syscl commented 7 years ago

@gctseng I tried to enable hwp as well, sleep has no issue...

syscl

syscl commented 7 years ago

After dropping some specific tables, the temperature of CPU has finally dropped down significantly. Yes, with HWP enable;) snip20161215_2

syscl

gctseng commented 7 years ago

At this point I haven't installed too many software so I don't mind reinstalling even if I use HWP. However, my biggest issue is that the bios has not recognized the USB drive on the boot menu (I even recreated the USB drive from scratch). You probably saw my posting on the thread on TonyMac about having to use efi shell to copy your clover files from the USB to the SDD because I rebooted before I did that and the system wouldn't boot from the default clover as installed nor would it boot from (see) USB.

Let me know how you installed HWP and I can try it over the weekend. I do notice the processor is kind of a power hog right now.

syscl commented 7 years ago

@gctseng No recognized? You have to add your USB/EFI/Clover/CLOVERX64.efi in bios.

syscl

gctseng commented 7 years ago

@syscl Two questions re: HWP

  1. Did you put the HWP kext in /S/L/E as suggested in the first post of this thread?: https://www.tonymacx86.com/threads/release-hwp-intel-speed-shift-on-skylake-and-up-enabler-kext.206090/
  2. Which tables did you drop? I'm guessing it's a setting in config.plist I adjust? (okay, that's 2.5 questions.)

As for the USB issue, I'll research this before updating to HWP.

Here's a baseline of the system currently (I'm remote, so it was captured with TeamViewer running). Not nearly as impressive as yours because you have HWP enabled, haha.

screen shot 2016-12-16 at 1 43 10 pm
gctseng commented 7 years ago

@syscl I'm home later today and install the DW1830. Can then try HWP after. I'll look out for your Macbook9,1 before I try HWP. Hopefully one or both will resolve the sleep issue.

syscl commented 7 years ago

OK, here you go config.plist.zip

Don't forget to remove SSDT-pr.aml in Clover/ACPI/patched(or you can use deploy.sh to help you do this)...

syscl

gctseng commented 7 years ago

Let me make sure I've got the procedure down:

  1. In CLOVER directory:
    • Copy the HWPEnable kext to the 10.12 folder.
    • Backup config.plist to config.plist.back
    • Copy config.plist above and replace config.plist
    • Remove SSDT-pr.aml
  2. Hide the cat.
  3. Reboot.

Am I missing anything?
Also, is the "sleep" mode a kind of hibernation or like the sleep mode that my Macbook has? I guess what I am asking is that should I expect the XPS to instantly "wake-up" (i.e., have the screen turn on and ask for password) when I open the lid?

syscl commented 7 years ago

@gctseng No, you don't need HWPEnable.kext

syscl

gctseng commented 7 years ago

@syscl HWP seems to be working when first booted, and sleep/resume works--I think it's due to DW1830 being installed (I haven't tried connecting that USB hub). However:

screen shot 2016-12-17 at 6 09 19 pm

Edit: Latest sleep/resume cycle now shows Bluetooth module on, but it doesn't find devices (it did find device once before but wouldn't pair). Very wonky. Any ideas?

gctseng commented 7 years ago

@syscl A couple of requests:

  1. I reinstalled Windows 10 using the recovery USB I made and will use it for a couple of weeks to make sure all hardware (e.g., the bluetooth module on the DW1830) is working. I also need at least "stable" OS to boot into because I'm leaving town. Was there a dual-boot guide you used to install OS X?
  2. You can close this thread unless you think the HWP discussion is helpful. BTW, I forgot to mention that I didn't find a SSDT-pr.aml in the patched directory when I was converting to HWP.
syscl commented 7 years ago

@gctseng Dual system: Windows + macOS is not that hard:

syscl

nos1609 commented 7 years ago

Not only bt has issues after sleep, but Wi-Fi also sometimes becomes very slow even displaying full strength signal

zeusk commented 7 years ago

About 3~4 days ago, sleep was working fine. I re-installed with latest commit and cannot resume from sleep. Also, it changed from Macbook to Macbook pro.

syscl commented 7 years ago

@zeusk try the latest config.plist then run deploy.sh

syscl

gctseng commented 7 years ago

Just got back from Asia and will try installing OS X on the replacement 9350 I received before I left on vacation.

louwe commented 7 years ago

What's the status on this? I think I also have this issue. It doesn't happen with all USB (mouse dongle is perfectly fine). In my experience, it's the USB LAN and USB-C PD charging only.

teobler commented 7 years ago

my xps:

xps13 9350,non iris version, CPU-6200U, Intel HD 520,256G

it will reboot when resume from sleep and I had rebuilt kernel cache but changed nothing:

  cd XPS9350-macOS
  tools/rebuild

so, what should I do?

Thanks

louwe commented 7 years ago

I've solved all my sleep issues. First of all, do you have a stock WiFi card? If it is, you should both the WiFi and the Bluetooth cards in the BIOS because they're not supported. If you want working WiFi, you need to buy a DW1560 from eBay.

Once you do that and you still have issues, deploy the latest version, it should fix everything. In my experience, Bluetooth card causes me to have USB instabilities and as I don't really need Bluetooth, I just disable that part in the BIOS and I have been running solidly with only rebooting once (to upgrade to 10.12.6) for a week now.