How to get OpenRazer working easily on Steam Deck

I have a Steam Deck and I play with the Razer Tartarus (before with Nostromo) and sometimes also with a Razer mouse. Those devices are for gamers and require specific driver installed on the machine to let them recognized their specific buttons as examples.

If you are looking for an Italian review, check my video where I talk also about this tutorial!

OpenRazer are the open source driver implementations that let you use those devices on Linux. They extend the Linux kernel with their own driver and require some steps to proceed.

Introduction

SteamOS on the SD is updated by the native client and doesn’t include “things”. The first stuff that you need to know if you don’t know Linux is that SD use various partitions where your games, settings and app installed with KDE discover on the Desktop Mode are saved. The real OS like the program for the Desktop mode or “Linux” are in a specific partition that is on read only.

This means that you can just read, and you are not able to do any change. It is something common on Linux to avoid that you break things, but this means that if you are doing something like adding the support for the Razer devices at next update you have to install it again.

The next things you need to know is this device the OS is based on ArchLinux with custom Steam repositories. On Linux distributions a package repository is a “centralized server” that has all the software that you are capable to install with just a command (and they are tested and safe usually). This means that you are not using the ArchLinux original but a different version and OpenRazer is not there, and you have to compile it.

In IT, compile a software it means from source code generate the binary, driver, executable etc.

Let’s start with the 3 installation steps!

Set password for the deck user

On SD there is the deck user that run all the programs/games but doesn’t have any password defined. To proceed we need to set one, so in Desktop mode open the terminal (Konsole) and write passwd and press Enter.

You can use the overlay keyboard with Steam+X or with the dock station a real keyboard or a Bluetooth keyboard. How to set up one is not part of this tutorial.

I set deck as password in this way is the same user and I don’t confuse it with others.

Install OpenRazer

To achieve something that I can reuse (we will see later), I preferred to create a bash script with various commands:

#!/bin/bash

sudo steamos-readonly disable
sudo pacman-key --init
sudo pacman-key --populate archlinux
sudo pacman -Syu base-devel mlocate cmake gcc holo-rel/linux-headers jupiter-rel/linux-neptune-headers holo-rel/linux-lts-headers $(pacman -Qk 2>/dev/null | grep -ve ' 0 missing' | grep -ie ^libc -e glibc -e gcc -e clang -e headers -e udev -e systemd | awk -F ':' '{print $1}') --overwrite '*'
cd /tmp/
git clone https://aur.archlinux.org/openrazer.git
cd openrazer
makepkg -sri
systemctl --user enable --now openrazer-daemon.service
sudo gpasswd -a deck plugdev

This code is based on others that I found online, but it’s tested and improved.
Create a file and calling as you prefer, in my case is openrazer.sh. I put that on the sd card to get that on the SD easily and write every single command manually.

Next step in the Desktop mode, open the file manager (Dolphin) and go to the sd card folder that should be /run/media/mmcblk0p1. Now right-click on the bash script and on Proprierties->Permissions check the Executable option and press Ok. Now the script can be executed.

Now if you still have opened the terminal you can drag and drop the bash file so automatically fill it the path (if you don’t want to write it manually /run/media/mmcblk0p1/openrazer.sh) and press enter.

Now the procedure started and sometimes will ask you to insert the deck user password that we set before or to allow the (re)installation of some packages (just press y).

The script will proceed and will disable the read only mode, get the list of packages by the repositories, install the dependencies, download the OpenRazer package source for ArchLinux compile it, install it and enable the user.

If you get an error about a package python-jaraco.text just execute this command in the terminal sudo pacman-key --populate archlinux and try again.

RazerGenie

Before the reboot, you want to install with KDE Discover the GUI to manage the lights for the Razer devices, in this case RazerGenie. It is not similar to the one on WIndows (it’s more fast anyway) and doesn’t allow you to set custom mappings, but just change the lights. I didn’t look for a way to customize the mappings, as for me they were fine, as anyway in the steam deck you have to remap everything.

After the reboot, you will have the Razer devices working.

Here you can see a photo of Tartarus and the Tron mouse, both by Razer: https://www.instagram.com/p/CmjsmO3IA1V/

What to do on a new update

So Steam release a new shiny update to SteamOS and you have to repeat everything, but what specifically?

  • Set again the deck user password (I am not sure about this right now, but anyway the script cannot proceed if there is any password configured)
  • Execute again the bash script (if you don’t delete the file, it will already have the executable permissions)
Liked it? Take a second to support Mte90 on Patreon!

Leave a Reply

Your email address will not be published. Required fields are marked *