Hardware/Razer: Difference between revisions
Updating to unstable version of openrazer |
Add razer usb reset. |
||
Line 97: | Line 97: | ||
]; | ]; | ||
</syntaxHighlight> | </syntaxHighlight> | ||
== USB disable Issues == | |||
If you are encountering issues that your Razer keyboard does light up on boot shortly and then can not be found by the open-razer-daemon until you unplug your USB cable and re-plug it. Then you might want to reset your USB on startup so that after login the daemon finds it again.<syntaxhighlight lang="nixos" line="1"> | |||
# Razer usb reset. Since it disables somehow on boot. | |||
systemd.services."usb-reset" = { | |||
description = "Resets usb port for my Razer Keyboard"; | |||
after = ["multi-user.target"]; | |||
serviceConfig = { | |||
User = "root"; | |||
Type = "simple"; | |||
ExecStart=pkgs.writeShellScript "unit-restart-usb7_3" '' | |||
echo '7-3' |tee /sys/bus/usb/drivers/usb/unbind | |||
echo '7-3' |tee /sys/bus/usb/drivers/usb/bind | |||
''; | |||
KillMode = "process"; | |||
Restart = "on-failure"; | |||
}; | |||
wantedBy = ["graphical.target"]; | |||
}; | |||
systemd.services."usb-reset".enable = true; | |||
</syntaxhighlight>7-3 is the Bus: 7 and the Port: 3 | |||
How to figure those out you can read here: | |||
https://superuser.com/questions/1707773/how-to-turn-usb-connected-device-on-and-off-in-linux |