Disabling the LED on a new Razer Cobra
14 January 2025
Recently my mouse began to die and I went searching for a replacement. I wanted something not too cheap but also not too expensive and gamery and eventually picked up a Razer Cobra. It's wired, nice and light, doesn't have an excess of buttons, and it's supposedly suitable for my style of mouse grip ("fingertip", according to companies who make mice). It's only been a few days but so far I'm quite happy with it. It's responsive and feels nice to use, though the button clicks are pretty loud.
I plugged this into a system running Debian testing (trixie) and had no intention of doing any sort of fancy mouse customisations, let alone letting using Razer's own software for anything. Unfortunately for me, it came out of the box with a very bright RGB-illuminated logo on the top that is continuously cycling through colours. I was thinking about just putting a sticker over it when I noticed that there is a very shmick OpenRazer project to facilitate controlling these Razer peripherals on Linux, so I thought I would give that a go. I would tolerate installing a bit of one-off software but I wanted to avoid adding custom apt repos or installing anything wildly unmaintained.
Complete success: my LED is now off.
First install the required Debian packages:
apt install openrazer-meta python3-pip
Then reboot the machine to let the driver take effect.
Install razer-cli, a CLI configuration tool written in Python. It needs to use the system openrazer install so I passed --break-system-packages, but to contain any chaos to my own user I also passed --user. This has the ultimate result that the program works and is installed at ~/.local/bin/razer-cli.
pip3 install razer-cli --user --break-system-packages
Hooray, it works:
$ ./.local/bin/razer-cli -l Found 1 Razer device(s) Razer Cobra: type: mouse DPI: (1800, 1800) max DPI: 8500 DPI stages: (3, [(400, 400), (800, 800), (1600, 1600), (3200, 3200), (6400, 6400)]) polling rate: 500 generic zone: logo zone: brightness: 75.0 colors: ['00FF00', '00FFFF', '0000FF'] effect: spectrum speed: 1 wave_dir: 1 effects available: breath_dual, breath_random, breath_single, brightness, none, reactive, spectrum, static serial: PM2443H27003395 firmware version: v1.0 driver version: 3.9.0 supported capabilities: name, type, firmware_version, serial, poll_rate, supported_poll_rates, dpi, dpi_stages, lighting, lighting_logo, lighting_logo_brightness, lighting_logo_spectrum, lighting_logo_static, lighting_logo_none, lighting_logo_reactive, lighting_logo_breath_single, lighting_logo_breath_dual, lighting_logo_breath_random
Now let's set that brightness down to zero.
$ ./.local/bin/razer-cli -b 0 creating path and file Adding new settings entry
All done. Nice.
Tech Tidbits Blog by Thomas Karpiniec
Posts RSS, Atom