blackgate / amdgpuwakehandler Goto Github PK
View Code? Open in Web Editor NEWKext for disabling a failed AMD GPU after waking up from sleep.
Kext for disabling a failed AMD GPU after waking up from sleep.
Hello @blackgate
many thanks for the repo!
My question is about the fork (https://github.com/timpalpant/NVDAGPUWakeHandler), but for some reason I could not open an issue there, so let me ask you - perhaps you could guide me. As far as I can tell, the core functionality was not changed by the fork.
I'm trying to build the project for Mojave (10.14.6) on MacBook (Early 2013 in my case).
So far I changed only OSBundleLibraries
versions (to 18.7) in Info.plist
and MACOSX_DEPLOYMENT_TARGET = 10.14
in Build Settings. But the resulting kext failed to be loaded:
NVDAGPUWakeHandler.kext failed to load - (libkern/kext) link error; check the system/kernel logs for errors or try kextutil(8).
kextutil give some details
(kernel) kxld[test.NVDAGPUWakeHandler]: The super class vtable '__ZTV9IOService' for vtable '__ZTV18NVDAGPUWakeHandler' is out of date. Make sure your kext has been built against the correct headers.
(kernel) Can't load kext test.NVDAGPUWakeHandler - link failed.
(kernel) Failed to load executable for kext test.NVDAGPUWakeHandler.
Could you suggest what could cause the error and how to fix it?
Hi,
I came across your great work and was talking to the dev team of OCLP (Open Core Legacy Patcher) and wonder if this can be included as part of it?
Here is the thread where we discussed this:
Hi,
first of all: Thanks for your effort in keeping this old Laptop running ๐
Backstory: Back when I discovered on how to get this Macbook working again, I disabled the GPU using the NVRAM variables, deleted the AMDRadeonX3000.kext from the Extensions Folder and loaded a old version of "AMDRadeonX3000.kext" with "sudo kextload /path/to/AMDRadeonX3000.kext". This worked fairly well, but having to load the kext every time I open up my Laptop got annoying.
Additionally, I was behind on updates. So I went ahead and updated from 10.12.4 to 10.12.6 and installed grub.
Now I run your kext that I built using Xcode and according to it's logs, it's disabling the GPU.
kernel: (AMDGPUWakeHandler) Initializing 2018-04-02 00:35:43.942395+0200 0x279e6 Default 0x0 0 kernel: (AMDGPUWakeHandler) Probing 2018-04-02 00:35:43.942407+0200 0x279e6 Default 0x0 0 kernel: (AMDGPUWakeHandler) Starting 2018-04-02 00:35:45.622056+0200 0x265fc Default 0x0 0 kernel: (AMDGPUWakeHandler) Waking up 2018-04-02 00:35:45.622058+0200 0x265fc Default 0x0 0 kernel: (AMDGPUWakeHandler) Disabling GPU 2018-04-02 00:56:50.054500+0200 0x548 Default 0x0 0 kernel: (AMDGPUWakeHandler) Initializing 2018-04-02 00:56:50.054503+0200 0x548 Default 0x0 0 kernel: (AMDGPUWakeHandler) Probing 2018-04-02 00:56:50.060547+0200 0x548 Default 0x0 0 kernel: (AMDGPUWakeHandler) Starting 2018-04-02 00:56:50.061752+0200 0x194 Default 0x0 0 kernel: (AMDGPUWakeHandler) Waking up 2018-04-02 00:56:50.061755+0200 0x194 Default 0x0 0 kernel: (AMDGPUWakeHandler) Disabling GPU 2018-04-02 01:05:57.362676+0200 0x48f Default 0x0 0 kernel: (AMDGPUWakeHandler) Initializing 2018-04-02 01:05:57.362679+0200 0x48f Default 0x0 0 kernel: (AMDGPUWakeHandler) Probing 2018-04-02 01:05:57.367948+0200 0x48f Default 0x0 0 kernel: (AMDGPUWakeHandler) Starting 2018-04-02 01:05:57.382209+0200 0xcf Default 0x0 0 kernel: (AMDGPUWakeHandler) Waking up 2018-04-02 01:05:57.382214+0200 0xcf Default 0x0 0 kernel: (AMDGPUWakeHandler) Disabling GPU 2018-04-02 01:11:02.853306+0200 0x475 Default 0x0 0 kernel: (AMDGPUWakeHandler) Initializing 2018-04-02 01:11:02.853313+0200 0x475 Default 0x0 0 kernel: (AMDGPUWakeHandler) Probing 2018-04-02 01:11:02.858846+0200 0x475 Default 0x0 0 kernel: (AMDGPUWakeHandler) Starting 2018-04-02 01:11:02.860184+0200 0x379 Default 0x0 0 kernel: (AMDGPUWakeHandler) Waking up 2018-04-02 01:11:02.860189+0200 0x379 Default 0x0 0 kernel: (AMDGPUWakeHandler) Disabling GPU 2018-04-02 01:13:00.790466+0200 0x479 Default 0x0 0 kernel: (AMDGPUWakeHandler) Initializing 2018-04-02 01:13:00.790471+0200 0x479 Default 0x0 0 kernel: (AMDGPUWakeHandler) Probing 2018-04-02 01:13:00.795730+0200 0x479 Default 0x0 0 kernel: (AMDGPUWakeHandler) Starting 2018-04-02 01:13:00.796230+0200 0x85 Default 0x0 0 kernel: (AMDGPUWakeHandler) Waking up 2018-04-02 01:13:00.796233+0200 0x85 Default 0x0 0 kernel: (AMDGPUWakeHandler) Disabling GPU
But now my macbook idles with 30W power draw according to Coconut Battery.
When I go ahead and load AMDRadeonX3000.kext version 1.51.8 that was extracted from some osx setup (not 100% sure, might have to digg through the Macrumors thread) the Macbook only draws 10-12W while writing this.
Do you have any idea whats causing this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.