Skip to content

Instantly share code, notes, and snippets.

@fcoclavero
Created December 28, 2020 21:55
Show Gist options
  • Save fcoclavero/431123c7708e42de63eb75264a44de02 to your computer and use it in GitHub Desktop.
Save fcoclavero/431123c7708e42de63eb75264a44de02 to your computer and use it in GitHub Desktop.
Fix Razer device not detected on macOS Big Sur 11.1

@Jandalf I recently had to reset my System Integrity Protection settings (csrutil clear) and once again ran into this issue, where my Razer device was not recognized.

I have upgraded to macOS Big Sur 11.1, and I can confirm that the solutions by @avaddon and @rdabban, which had worked for me on 11.0, no longer work.

Manually loading the kernel extension (the kextload command) will display the error code 27 "Extension with identifiers com.razer.common.razerhid not approved to load. Please approve using System Preferences.", but no pop-up or "Allow" option would appear anywhere on the System Preferences.

Adding the Razer TeamID with the /usr/sbin/spctl kext-consent add R2H967U7J8 command showed me a pop-up, but with no "Allow" option, and no option to allow the kernel extension would appear in the System Preferences, so no good.

I finally managed to make it work by temporarily disabling System Integrity Protection (SIP), as follows:

  1. Boot into Recovery Mode. This can be done by restarting your computer and holding Cmd+R on boot until a loading bar shows up.
  2. Once in Recovery Mode, sign in with your account and open a terminal. You can find it in the top menu under Utilities > Terminal.
  3. Disable SIP by running the following command: csrutil disable.
  4. Close the terminal and reboot (normal reboot, not into Recovery Mode).
  5. Open a terminal and load the extension with the following command: sudo kextload /Library/Extensions/RazerHid.kext.
  6. Reboot (normal reboot, not into Recovery Mode) and confirm that your Razer device is now correctly detected.
  7. Now we must reenable SIP to maintain system security. This should not break your device. Boot once more into Recovery Mode, open a terminal, run csrutil enable, close the terminal and reboot.

You should now be able to load your Razer device AND have SIP enabled.

Good luck y'all!

@viniciusmi00
Copy link

viniciusmi00 commented Apr 5, 2023

I preferred to create an Application in Automator, and put it to start with the login. I thought better. Just use "Utility > Run Shell Script" in Automator.
Put shell > /usr/local/bin/python3

# It is necessary install libusb on mac. "brew install libusb".
# Maybe need to install PyUSB. "python3 -m pip install pyusb".

import usb.core
import usb.util

VID = 0x1532 # VendorID of the device you want. In my case Razer Mamba.
PID = 0x0024 # ProductID of the device you want. In my case Razer Mamba.

dev = usb.core.find(idVendor=VID, idProduct=PID)
dev.reset()
exit(0)

You just need to remember to put your device's VendorID and ProductID so that it only reset.
Work in Ventura 13.3

@nwasmb
Copy link

nwasmb commented Nov 19, 2023

Hi Gents,

Frustrated to not be able to use my Razer Naga Trinity properly, I've been following a few leads online but without succeeding :(

I'm on Macbook pro Apple M1, Ventura 13.5.1 (22G90). Synapse 1.88.20

I've first tried the method by u/sidneytsilva
https://www.reddit.com/r/razer/comments/y82wwx/mac_users_getting_please_connect_a_razer_synapse/

then avaddon method
https://developer.apple.com/forums/thread/649829

Finally came to this thread, and tried CodeBlazer method. Unfortunally, when reaching to this step Open a terminal and load the extension with the following command (reboot (normally) when asked):
sudo kextload /Library/Extensions/RazerHid.kext
This should give a popup which tells to press the allow button in System Preferences
, I get "System extension blocked - System extension blocked a program tried to load new system extension(s) signed by "Razer USA Ltd." that need to be updated by the developer"

I did Disable SIP on R-mode and add R2H967U7J8. When I try to run sudo kextload /Library/Extensions/RazerHid.kext, I get the following:
Executing: /usr/bin/kmutil load -p /Library/Extensions/RazerHid.kext
Error Domain=KMErrorDomain Code=71 "Incompatible architecture: Binary is for x86_64, but needed arch arm64e
Unsupported Error: one or more extensions are unsupported to load Kext com.razer.common.razerhid v21.94 in executable kext bundle com.razer.common.razerhid at /Library/Extensions/RazerHid.kext
Unsupported Error: one or more extensions are unsupported to load Kext com.razer.common.razerhid v21.94 in executable kext bundle com.razer.common.razerhid at /Library/Extensions/RazerHid.kext" UserInfo={NSLocalizedDescription=Incompatible architecture: Binary is for x86_64, but needed arch arm64e
Unsupported Error: one or more extensions are unsupported to load Kext com.razer.common.razerhid v21.94 in executable kext bundle com.razer.common.razerhid at /Library/Extensions/RazerHid.kext
Unsupported Error: one or more extensions are unsupported to load Kext com.razer.common.razerhid v21.94 in executable kext bundle com.razer.common.razerhid at /Library/Extensions/RazerHid.kext}

Am I doing somethiong wrong? I'm completely neophyte when it comes to mac, usually a pc user. For what I can read from the error message it could be a compatibility issue? If someone is able to point me toward the right direction it'd be really grateful!

@huug69
Copy link

huug69 commented Nov 19, 2023

I'm using Steermouse now, running flawless since a few months, with all keys programmable and multiple profiles for al your apps. website is https://plentycom.jp/en/steermouse/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment