black-dragon74 / ROG-HID

macOS HID driver based on DriverKit for Asus ROG notebook built-in keyboard.
BSD 3-Clause "New" or "Revised" License
43 stars 3 forks source link

Driver extension is not approved to run #16

Closed Dry05 closed 3 years ago

Dry05 commented 3 years ago

So I’ve been trying to get this working. App works, installed the .dext works. Rebooted, keyboard initialized, then nothing happens for keyboard backlight. Using a 0x0b5 0x1837. So I tried doing a kextcache to rebuild kernelcache. Which told me this error encountered during approval check: error domain=ossystemextensionerrordomain code=1 "(null)" any ideas?

black-dragon74 commented 3 years ago

Please attach your IOREG, output of csrutil status, systemextensionsctl developer and systemextensionsctl list

Regards

Dry05 commented 3 years ago

basvanturnhout@MacBook-Pro-van-Bas ~ % csrutil status System Integrity Protection status: disabled (Apple Internal). basvanturnhout@MacBook-Pro-van-Bas ~ % systemextensionctl developer zsh: command not found: systemextensionctl basvanturnhout@MacBook-Pro-van-Bas ~ % systemextensionsctl developer Developer mode is off basvanturnhout@MacBook-Pro-van-Bas ~ % systemextensionsctl list
2 extension(s) --- com.apple.system_extension.driver_extension enabled active teamID bundleID (version) name [state] 2021-06-18 11:56:43.735 systemextensionsctl[607:78739] Completely failed to resolve bundle info zsh: abort systemextensionsctl list ioreg.txt

Dry05 commented 3 years ago

basvanturnhout@MacBook-Pro-van-Bas ~ % sudo systemextensionsctl list 1 extension(s) --- com.apple.system_extension.driver_extension enabled active teamID bundleID (version) name [state]

just reset systemextensionsctl database

Dry05 commented 3 years ago

I know I had developer mode disabled, happened after a reboot already enabled now. Could it be that I have wrong dsdt patches or aren’t those necessary for this to work?

black-dragon74 commented 3 years ago

Please attach IOREG from IORegistryExplorer.app

Attaching in TXT format is of no use. And no, it doesn’t require any DSDT patches as it works on the USB interface.

Dry05 commented 3 years ago

MacBook Pro van Bas.zip

Dry05 commented 3 years ago

That’s the correct one right?

Dry05 commented 3 years ago

Uh it just came to me that this keyboard has been replaced 2 years ago at a official Asus repair point. The keyboard vendor and product id are still the same. So that wouldn’t be a problem then would it? Sorry for the spam

black-dragon74 commented 3 years ago

That’s the correct one right?

Screen Shot 2021-06-20 at 11 55 08 PM Please use IORegistryExplorer.app from here

Uh it just came to me that this keyboard has been replaced 2 years ago at a official Asus repair point. The keyboard vendor and product id are still the same. So that wouldn’t be a problem then would it? Sorry for the spam

I don't think of it to be an issue.

Regards

Dry05 commented 3 years ago

MacBook Pro van Bas.zip

Dry05 commented 3 years ago

Any suggestions what to try now?

Dry05 commented 3 years ago

That last one was the right file wasn’t it? Please let me know what I can try to get it working

black-dragon74 commented 3 years ago

First off sorry for the delay, was a little busy. Can you please try the debug version and send me the logs? The Driver is not loading for some reason. And I can't point out the issue without the logs.

Regards

Dry05 commented 3 years ago

Sure thing, where will I find the logs after trying?

black-dragon74 commented 3 years ago

log stream | grep -i "rog_hid_driver". You will likely have to reenumerate for the init and start logs to appear (check README on how to re-enumerate your device).

Regards

Dry05 commented 3 years ago

Yeah when using the debug version macOS doesn’t boot up. Keeps printing amfi: panic dump. In verbose

black-dragon74 commented 3 years ago

Also, before you try this can you download and try macRogAuraCore?

You will likely need to do the following:

macRogAuraCore initialize_keyboard
macRogAuraCore brightness 3
macRogAuraCore red

This will tell us if backlight on your keyboard is supported or not.

Bonus Tip: After you install macRogAuraCore you can use ROGSwitch to easily control keyboard backlight from the menu bar.

Regards

black-dragon74 commented 3 years ago

Yeah when using the debug version macOS doesn’t boot up. Keeps printing amfi: panic dump. In verbose

Weird. I just released an update. Try the debug variant from that release? BTW, you should try the above steps before we move forward.

Regards

Dry05 commented 3 years ago

Yes I tried macrogauracore too. Tried those steps too

black-dragon74 commented 3 years ago

Yes I tried macrogauracore too. Tried those steps too

Does it work? If yes, send the output.

Dry05 commented 3 years ago

No keyboard backlight after using the new driver and macrogauracore either

Dry05 commented 3 years ago

Jun 25 13:49:42 MacBook-Pro-van-Bas com.apple.xpc.launchd[1] (com.apple.coreservices.UASharedPasteboardProgressUI): Unknown key for Boolean: DrainMessagesAfterFailedInit Jun 25 13:49:42 MacBook-Pro-van-Bas com.apple.xpc.launchd[1] (com.apple.mobiledeviceupdater): Unknown key for Boolean: _AdjustProgramPath Jun 25 13:50:58 MacBook-Pro-van-Bas com.apple.xpc.launchd[1] (com.apple.xpc.launchd.oneshot.0x10000001.ROG-HID[337]): Service exited due to SIGKILL | sent by Dock[351] Jun 25 13:51:22 MacBook-Pro-van-Bas com.apple.xpc.launchd[1] (com.apple.xpc.launchd.oneshot.0x1000000b.ROG-HID[773]): removing service since it exited with consistent failure - OS_REASON_CODESIGNING | When validating /Applications/ROG-HID-9.app/Contents/MacOS/ROG-HID: Jun 25 13:51:22 MacBook-Pro-van-Bas com.apple.xpc.launchd[1] (com.apple.xpc.launchd.oneshot.0x1000000b.ROG-HID[773]): Binary is improperly signed. Jun 25 13:52:09 MacBook-Pro-van-Bas com.apple.xpc.launchd[1] (com.apple.xpc.launchd.oneshot.0x1000000d.ROG-HID[822]): removing service since it exited with consistent failure - OS_REASON_CODESIGNING | When validating /Applications/ROG-HID-10.app/Contents/MacOS/ROG-HID: Jun 25 13:52:09 MacBook-Pro-van-Bas com.apple.xpc.launchd[1] (com.apple.xpc.launchd.oneshot.0x1000000d.ROG-HID[822]): Binary is improperly signed. Jun 25 13:52:21 MacBook-Pro-van-Bas com.apple.xpc.launchd[1] (com.apple.xpc.launchd.oneshot.0x1000000f.ROG-HID[849]): removing service since it exited with consistent failure - OS_REASON_CODESIGNING | When validating /Applications/ROG-HID-10.app/Contents/MacOS/ROG-HID: Jun 25 13:52:21 MacBook-Pro-van-Bas com.apple.xpc.launchd[1] (com.apple.xpc.launchd.oneshot.0x1000000f.ROG-HID[849]): Binary is improperly signed.

I tried disabling amfi before, and signing with own paid dev account. even that didn't work

black-dragon74 commented 3 years ago

You can see it is a code signing issue. Prolly due to SIP or improper systemextensionsctl config.

attach output of nvram -p

black-dragon74 commented 3 years ago

No keyboard backlight after using the new driver and macrogauracore either

This is not helpful. What is the message that you get when you run the aforementioned macRogAuraCore commands?

Dry05 commented 3 years ago

log stream finally gave output

2021-06-25 14:15:07.989217+0200 0x46c43 Default 0x0 97 0 hidd: (IOKit) [com.apple.iohid:default] Service removed: IOHIDService name:ROG_HID_Driver id:0x10000076a primaryUsagePage:0x1 primaryUsage:0x6 transport:USB reportInterval:0 batchInterval:1 events:587 mask:0xb { 2021-06-25 14:15:09.900077+0200 0x47316 Default 0x0 0 0 kernel: (IOHIDFamily) ROG_HID_Driver:0x10000088f start (state:0x0) 2021-06-25 14:15:09.901105+0200 0x473b0 Default 0x0 0 0 kernel: (IOHIDFamily) ROG_HID_Driver:0x10000088f start (state:0x4) 2021-06-25 14:15:09.935832+0200 0x46c43 Default 0x0 97 0 hidd: (IOKit) [com.apple.iohid:default] Service added: IOHIDService name:ROG_HID_Driver id:0x10000088f primaryUsagePage:0x1 primaryUsage:0x6 transport:USB reportInterval:0 batchInterval:0 events:0 mask:0x0 2021-06-25 14:15:09.985396+0200 0x4734f Default 0x0 0 0 kernel: (IOHIDFamily) ROG_HID_Driver:0x10000089a start (state:0x0) 2021-06-25 14:15:09.986735+0200 0x473da Default 0x0 0 0 kernel: (IOHIDFamily) ROG_HID_Driver:0x10000089a start (state:0x4) 2021-06-25 14:15:10.033405+0200 0x46c43 Default 0x0 97 0 hidd: (IOKit) [com.apple.iohid:default] Service added: IOHIDService name:ROG_HID_Driver id:0x10000089a primaryUsagePage:0xff31 primaryUsage:0x76 transport:USB reportInterval:0 batchInterval:0 events:0 mask:0x0 2021-06-25 14:15:10.070922+0200 0x4737a Default 0x0 0 0 kernel: (IOHIDFamily) ROG_HID_Driver:0x1000008a1 start (state:0x0) 2021-06-25 14:15:10.072134+0200 0x47404 Default 0x0 0 0 kernel: (IOHIDFamily) ROG_HID_Driver:0x1000008a1 start (state:0x4) 2021-06-25 14:15:10.117999+0200 0x46c43 Default 0x0 97 0 hidd: (IOKit) [com.apple.iohid:default] Service added: IOHIDService name:ROG_HID_Driver id:0x1000008a1 primaryUsagePage:0x1 primaryUsage:0x2 transport:USB reportInterval:0 batchInterval:0 events:0 mask:0x0

nvram -p: boot-args alcid=3 npci=0x2000 ngfxcompat=1 -nobiooff nvda_drv=1 csr-data kext-allowed-teamsLUPK75PW6Q%00 ForceDisplayRotationInEFI %00%00%00%00 nvda_drv 1 run-efi-updater No%00 SystemAudioVolumeDB %00 prev-lang:kbd ru-RU:252 bluetoothActiveControllerInfo +%0a%87%80%00%00%00%00%90%14(%16%ad%c6%0f. fmm-computer-name MacBook Pro van Bas csr-active-config w%02%00%00 SystemAudioVolume 0 LocationServicesEnabled %01

black-dragon74 commented 3 years ago

Umm. What macOS version are you on? Also your SIP config is invalid. Refer to https://dortania.github.io/OpenCore-Install-Guide/troubleshooting/extended/post-issues.html#disabling-sip

Fixing SIP will get us some progress on the matter.

Dry05 commented 3 years ago

config.plist.zip

idk what's wrong with my config file. please tell me. its OpenCore

Dry05 commented 3 years ago

okay just disabled sip the right way with nvram. System Integrity Protection status: unknown (Custom Configuration).

Configuration: Apple Internal: enabled Kext Signing: disabled Filesystem Protections: disabled Debugging Restrictions: disabled DTrace Restrictions: disabled NVRAM Protections: disabled BaseSystem Verification: disabled

This is an unsupported configuration, likely to break in the future and leave your machine in an unknown state.

I still get driver extension not approved to run

black-dragon74 commented 3 years ago

You mean the warning popup? You have to click allow and then approve from system preferences. Extension will load then.

Also, these issues have nothing to do with the Driver itself and are configuration errors on your end.

Closing this issue. If ROG_HID_Driver loads and then you face some problem, I can help you with that.

If it’s not loading it’s due to some misconfiguration. Refer to the README for troubleshooting.

Regards

Dry05 commented 3 years ago

No I get driver not approved when u run sudo kextcache -i /. That’s what I was referring to, I configured SIP the way you said it just still doesn’t load

Dry05 commented 3 years ago

anyways, SIP was already completely disabled from recovery. I now also added the right config in OpenCore for nvram. still nothing. systemextensionsctl list
1 extension(s) --- com.apple.system_extension.driver_extension enabled active teamID bundleID (version) name [state]

as you can see its enabled just fine. reenumerated fine too. just nothing happening. can it be my laptop after all maybe?

black-dragon74 commented 3 years ago

No keyboard backlight after using the new driver and macrogauracore either

This is not helpful. What is the message that you get when you run the aforementioned macRogAuraCore commands?

You didn’t answer this. If macRogAuraCore doesn’t work. ROG-HID never will. Both are fundamentally same with respect to keyboard backlight.

Dry05 commented 3 years ago

macRogAuroCore commands don’t give any message at all

black-dragon74 commented 3 years ago

Open Terminal. Type macRogAuraCore , press enter. Post the screenshot.

Also forgive me for speculating but I don’t think you have technical knowledge of stuff? Right? If so, unfortunately there’s not much that I can do as half of the things are getting lost in comprehension.

Regards

Dry05 commented 3 years ago

Schermafbeelding 2021-06-25 om 16 50 51

no problem. I do have technical knowledge besides I'm a software dev haha

Dry05 commented 3 years ago

That is the right screenshot right? Still got the driver installed rn

black-dragon74 commented 3 years ago

Yeah. That screenshot is alright. Run macRogAuraCore initialize_keyboard and post output.

Dry05 commented 3 years ago

Schermafbeelding 2021-07-01 om 15 24 48