[SOLVED]Configuration tool for Razer mouse does not run

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED]Configuration tool for Razer mouse does not run

Postby banjo » May 11th, '24, 21:07

I just purchased a new Razer Basilisk V3 mouse and put it on my system. The mouse works fine, and I like it.

I saw that there is a configuration tool, qrazercfg in the repository so I installed it to see if I can use it to configure the mouse. The tool fails to start with an error.

Code: Select all
$ qrazercfg
Failed to connect to razerd socket: [Errno 2] No such file or directory


Some research revealed that all of the configuration commands go through a daemon called "razerd", which must be running for any of it to work. So I attempted to start the daemon. The start command threw no errors, but apparently the daemon is not running.

Code: Select all
[root@linux8core:~]# systemctl status razerd
● razerd.service - Razerd Daemon
     Loaded: loaded (/usr/lib/systemd/system/razerd.service; disabled; vendor preset: disabled)
     Active: inactive (dead)

May 11 09:25:23 linux8core systemd[1]: Started Razerd Daemon.
May 11 09:25:23 linux8core systemd[1]: razerd.service: Succeeded.
[root@linux8core:~]# systemctl start razerd
[root@linux8core:~]# systemctl status razerd
● razerd.service - Razerd Daemon
     Loaded: loaded (/usr/lib/systemd/system/razerd.service; disabled; vendor preset: disabled)
     Active: inactive (dead)

May 11 09:25:23 linux8core systemd[1]: Started Razerd Daemon.
May 11 09:25:23 linux8core systemd[1]: razerd.service: Succeeded.
May 11 14:36:54 linux8core systemd[1]: Started Razerd Daemon.
May 11 14:36:54 linux8core systemd[1]: razerd.service: Succeeded.
[root@linux8core:~]# qrazercfg
Failed to connect to razerd socket: [Errno 2] No such file or directory



After "starting" the razerd serviice, qrazercfg throws the same error. Systemctl status indicates that the daemon is still "inactive (dead)", even though it also says that "razerd.service: Succeeded".

What am I doing wrong?

During my search of the web for answers I ran into another project, openrazer, which appears to have active updates going on.

https://github.com/openrazer/openrazer

Openrazer is available for Mageia in a repository at opensuse.

https://software.opensuse.org/download.html?project=hardware%3Arazer&package=openrazer-meta

Has anybody been able to configure a Razer mouse on Mageia? I am running Mageia8. Here is the inxi info.

Code: Select all
$ inxi -b
System:    Host: linux8core Kernel: 5.15.126-desktop-1.mga8 x86_64 bits: 64 Desktop: KDE Plasma 5.20.4 Distro: Mageia 8 mga8
Machine:   Type: Desktop Mobo: Micro-Star model: MPG Z590 GAMING PLUS (MS-7D07) v: 2.0 serial: <superuser required>
           UEFI: American Megatrends LLC. v: A.10 date: 04/09/2021
CPU:       Info: 8-Core 11th Gen Intel Core i7-11700K [MT MCP] speed: 801 MHz min/max: 800/4900 MHz
Graphics:  Device-1: NVIDIA GA106 [Geforce RTX 3050] driver: nvidia v: 510.60.02
           Display: x11 server: Mageia X.org 1.20.14 driver: nvidia resolution: 1: 1920x1080~60Hz 2: 1920x1080~60Hz
           OpenGL: renderer: NVIDIA GeForce RTX 3050/PCIe/SSE2 v: 4.6.0 NVIDIA 510.60.02
Network:   Device-1: Intel Ethernet I225-V driver: igc
Drives:    Local Storage: total: 1.82 TiB used: 278.92 GiB (15.0%)
Info:      Processes: 386 Uptime: 7h 00m Memory: 31.26 GiB used: 2.85 GiB (9.1%) Shell: Bash inxi: 3.2.01


This issue is not a show stopper because the mouse works, but I thought I would look into some of its other features.

Thanks
Banjo
(_)=='=~
Last edited by banjo on May 12th, '24, 22:01, edited 2 times in total.
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 476
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Configuration tool for Razer mouse does not run

Postby doktor5000 » May 11th, '24, 21:35

It says failed to connect to razerd socket, not service. Usually the service should be socket-activated and queries to the socket should automatically start the service. Although here there doesn't seem to be a socket unit packaged.
Please start the daemon manually as root with debug output and post that here:
Code: Select all
/usr/sbin/razerd -l3
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18045
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Configuration tool for Razer mouse does not run

Postby banjo » May 11th, '24, 23:04

Interesting outcome. Razerd does run when started that way, and it just says that it is ignoring the fact that there is no config file. Then I ran qrazercfg and it ran.

Code: Select all
# /usr/sbin/razerd -l3
Razer device service daemon
librazer: No config file /etc/razer.conf present. Ignoring.
[razerd debug]: Client connected (fd=9)
[razerd debug]: Client disconnected (fd=9)


However, all the menu items in qrazercfg are empty.

Screenshot_20240511_165631.png
Screenshot_20240511_165631.png (11.56 KiB) Viewed 12470 times


I guess that means that my mouse is not supported. Perhaps this tool will not be very useful.
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 476
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Configuration tool for Razer mouse does not run

Postby morgano » May 11th, '24, 23:32

Looking at
https://madb.mageia.org/package/show/name/razercfg
i see link to
https://bues.ch/cms/hacking/razercfg.html
-"Basilisk" is not listed among the devices there.
The version we have is the one listed there released 29 May 2020.
Page say "next generation" does the imply the version there is beta?

The openrazer page list "Razer Basilisk V3"
I suggest to open a bug about changing Mageia 10 to openrazer, backport to Mageia 9
- but it would be very good if you somehow could test it first :)

And why are you still using Mageia 8?
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1489
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: Configuration tool for Razer mouse does not run

Postby banjo » May 12th, '24, 00:12

Thanks for the links. I did land on razercfg.html and did not see my mouse. I found openrazer by accident in a search.

I am still on Mageia8 because I got caught half done with the upgrade and have not found enough down time on this computer to finish the setup. I have been trying to get the upgrade done for months now. This is a very busy computer. :shock: I am hoping to get finished soon.

I would be happy to test openrazer if I can figure out how to get it installed and working. I am not an expert in installing drivers. My test computer in the basement is on Mageia9. I break that one all the time, so I might take my new mouse down there and see what mischief I can get into with it.

Stay tuned.
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 476
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Configuration tool for Razer mouse does not run

Postby banjo » May 12th, '24, 15:10

I installed openrazer on my Mageia9 computer using the instructions at the website.

Code: Select all
dnf config-manager --add-repo https://download.opensuse.org/repositories/hardware:razer/Mageia_9/hardware:razer.repo
dnf install openrazer-meta


Here is the installation log

Code: Select all
[brian@linux6core ~]$ su
Password:
[root@linux6core:~]#
[root@linux6core:~]# dnf config-manager --add-repo https://download.opensuse.org/repositories/hardware:razer/Mageia_9/hardware:razer.repo
Adding repo from: https://download.opensuse.org/repositories/hardware:razer/Mageia_9/hardware:razer.repo
[root@linux6core:~]# dnf install openrazer-meta
determining the fastest mirror (10 hosts).. done.          100% [==========================================================] 1.9 kB/s | 801  B     00:00 ETA
Mageia Cauldron - x86_64                                                                                                     5.0 MB/s |  40 MB     00:08   
determining the fastest mirror (4 hosts).. done.           100% [==========================================================] 1.9 kB/s | 799  B     00:00 ETA
Mageia Cauldron - x86_64 - Updates                                                                                            75  B/s | 257  B     00:03   
google-chrome                                                                                                                 10 kB/s | 3.6 kB     00:00   
hardware:razer (Mageia_9)                                                                                                    8.2 kB/s | 8.4 kB     00:01   
determining the fastest mirror (6 hosts).. done.           100% [==========================================================] 1.9 kB/s | 788  B     00:00 ETA
Mageia 9 - x86_64                                                                                                            4.5 MB/s |  38 MB     00:08   
determining the fastest mirror (6 hosts).. done.           100% [==========================================================] 1.8 kB/s | 760  B     00:00 ETA
Mageia 9 - x86_64 - Updates                                                                                                  3.6 MB/s |  19 MB     00:05   
Dependencies resolved.
=============================================================================================================================================================
 Package                                           Architecture               Version                              Repository                           Size
=============================================================================================================================================================
Installing:
 openrazer-meta                                    noarch                     3.8.0-1.1                            hardware_razer                      6.7 k
Installing dependencies:
 openrazer-daemon                                  noarch                     3.8.0-1.1                            hardware_razer                      149 k
 openrazer-kernel-modules-dkms                     noarch                     3.8.0-1.1                            hardware_razer                       63 k
 python3-daemonize                                 noarch                     2.5.0-4.mga9                         mageia-x86_64                       183 k
 python3-openrazer                                 noarch                     3.8.0-1.1                            hardware_razer                       48 k
 python3-pyudev                                    noarch                     0.24.0-2.mga9                        mageia-x86_64                        78 k
 python3-setproctitle                              x86_64                     1.3.2-1.mga9                         mageia-x86_64                        22 k
 xautomation                                       x86_64                     1.09-7.mga9                          cauldron-x86_64                      53 k

Transaction Summary
=============================================================================================================================================================
Install  8 Packages

Total download size: 603 k
Installed size: 3.0 M
Is this ok [y/N]: y
Downloading Packages:
determining the fastest mirror (8 hosts).. done.             0% [                                                          ] 2.4 MB/s | 1.5 kB     00:08 ETA
(1/8): openrazer-kernel-modules-dkms-3.8.0-1.1.noarch.rpm                                                                    100 kB/s |  63 kB     00:00   
(2/8): xautomation-1.09-7.mga9.x86_64.rpm                                                                                     78 kB/s |  53 kB     00:00   
(3/8): openrazer-meta-3.8.0-1.1.noarch.rpm                                                                                    33 kB/s | 6.7 kB     00:00   
(4/8): python3-daemonize-2.5.0-4.mga9.noarch.rpm                                                                             1.2 MB/s | 183 kB     00:00   
(5/8): python3-pyudev-0.24.0-2.mga9.noarch.rpm                                                                               2.0 MB/s |  78 kB     00:00   
(6/8): openrazer-daemon-3.8.0-1.1.noarch.rpm                                                                                 142 kB/s | 149 kB     00:01   
(7/8): python3-openrazer-3.8.0-1.1.noarch.rpm                                                                                123 kB/s |  48 kB     00:00   
(8/8): python3-setproctitle-1.3.2-1.mga9.x86_64.rpm                                                                          478 kB/s |  22 kB     00:00   
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                        161 kB/s | 603 kB     00:03     
hardware:razer (Mageia_9)                                                                                                    2.2 kB/s | 1.1 kB     00:00   
Importing GPG key 0xD6D11CE4:
 Userid     : "hardware OBS Project <hardware@build.opensuse.org>"
 Fingerprint: E96C 496E 4E77 C159 C2FC A053 062F 9FD4 D6D1 1CE4
 From       : https://download.opensuse.org/repositories/hardware:/razer/Mageia_9/repodata/repomd.xml.key
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                     1/1
  Running scriptlet: openrazer-kernel-modules-dkms-3.8.0-1.1.noarch                                                                                      1/8
  Installing       : openrazer-kernel-modules-dkms-3.8.0-1.1.noarch                                                                                      1/8
  Installing       : python3-setproctitle-1.3.2-1.mga9.x86_64                                                                                            2/8
  Installing       : python3-pyudev-0.24.0-2.mga9.noarch                                                                                                 3/8
  Installing       : python3-daemonize-2.5.0-4.mga9.noarch                                                                                               4/8
  Installing       : xautomation-1.09-7.mga9.x86_64                                                                                                      5/8
  Installing       : openrazer-daemon-3.8.0-1.1.noarch                                                                                                   6/8
  Installing       : python3-openrazer-3.8.0-1.1.noarch                                                                                                  7/8
  Installing       : openrazer-meta-3.8.0-1.1.noarch                                                                                                     8/8
  Running scriptlet: openrazer-kernel-modules-dkms-3.8.0-1.1.noarch                                                                                      8/8

Creating symlink /var/lib/dkms/openrazer-driver/3.8.0/source ->
                 /usr/src/openrazer-driver-3.8.0

DKMS: add Completed.

Preparing kernel 6.6.28-desktop-1.mga9 for module build:
(This is not compiling a kernel, just preparing kernel symbols)
Storing current .config to be restored when complete
Running Generic preparation routine
make mrproper....
using /proc/config.gz
make oldconfig....
make prepare....

Building module:
cleaning build area....
KERNELDIR=/lib/modules/6.6.28-desktop-1.mga9/build make driver......
cleaning build area....
cleaning kernel tree (make mrproper)....

DKMS: build Completed.

razerkbd.ko.xz:
 - Installation
   - Installing to /lib/modules/6.6.28-desktop-1.mga9/dkms/drivers/hid/

razermouse.ko.xz:
 - Installation
   - Installing to /lib/modules/6.6.28-desktop-1.mga9/dkms/drivers/hid/

razerkraken.ko.xz:
 - Installation
   - Installing to /lib/modules/6.6.28-desktop-1.mga9/dkms/drivers/hid/

razeraccessory.ko.xz:
 - Installation
   - Installing to /lib/modules/6.6.28-desktop-1.mga9/dkms/drivers/hid/

depmod......

DKMS: install Completed.
********************************************
* To complete installation, please run:    *
* # sudo gpasswd -a <yourUsername> plugdev *
********************************************

  Running scriptlet: openrazer-meta-3.8.0-1.1.noarch                                                                                                     8/8
  Verifying        : xautomation-1.09-7.mga9.x86_64                                                                                                      1/8
  Verifying        : openrazer-daemon-3.8.0-1.1.noarch                                                                                                   2/8
  Verifying        : openrazer-kernel-modules-dkms-3.8.0-1.1.noarch                                                                                      3/8
  Verifying        : openrazer-meta-3.8.0-1.1.noarch                                                                                                     4/8
  Verifying        : python3-openrazer-3.8.0-1.1.noarch                                                                                                  5/8
  Verifying        : python3-daemonize-2.5.0-4.mga9.noarch                                                                                               6/8
  Verifying        : python3-pyudev-0.24.0-2.mga9.noarch                                                                                                 7/8
  Verifying        : python3-setproctitle-1.3.2-1.mga9.x86_64                                                                                            8/8

Installed:
  openrazer-daemon-3.8.0-1.1.noarch                  openrazer-kernel-modules-dkms-3.8.0-1.1.noarch           openrazer-meta-3.8.0-1.1.noarch             
  python3-daemonize-2.5.0-4.mga9.noarch              python3-openrazer-3.8.0-1.1.noarch                       python3-pyudev-0.24.0-2.mga9.noarch         
  python3-setproctitle-1.3.2-1.mga9.x86_64           xautomation-1.09-7.mga9.x86_64                         

Complete!
[root@linux6core:~]#


Apparently openrazer is just the backend. They recommend several GUI interfaces.

Code: Select all
The following applications complement and interact with this driver:

Polychromatic - a graphical management tool and tray applet to managing Razer peripherals.
RazerGenie - Qt application for configuring your Razer devices under GNU/Linux.
razerCommander - Simple GUI written in Gtk3
Snake - a stylised tool and tray applet for configuring Razer devices on Linux, written in Java.
Chroma Feedback - Turn your Razer keyboard, mouse or headphone into a extreme feedback device


I tried RazerGenie, installed as a flatpak.

RazerGenie threw connection errors when I ran it.

Code: Select all
$ flatpak run xyz.z3ntu.razergenie

(flatpak run:290063): GLib-GIO-WARNING **: 07:56:46.829: /usr/share/applications/kde-mimeapps.list contains a [Added Associations] group, but it is not permitted here.  Only the non-desktop-specific mimeapps.list file may add or remove associations.
Qt: Session management error: Could not open network socket
Translation loaded: false
Invalid backend value. Using openrazer backend.
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
libopenrazer: There was an error in virtual QString libopenrazer::openrazer::Manager::getDaemonVersion()
libopenrazer: org.freedesktop.DBus.Error.NoReply
libopenrazer: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Failed to get daemon version: "org.freedesktop.DBus.Error.NoReply" "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."

libopenrazer: There was an error in virtual QString libopenrazer::openrazer::Manager::getDaemonVersion()
libopenrazer: org.freedesktop.DBus.Error.NoReply
libopenrazer: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Failed to get daemon version: "org.freedesktop.DBus.Error.NoReply" "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
[brian@linux6core ~]$


The GUI simply says that there is no daemon.

Screenshot_20240512_075835.png
Screenshot_20240512_075835.png (29.46 KiB) Viewed 12342 times


I clicked on Open Settings and after a delay got this screen

Screenshot_20240512_080152.png
Screenshot_20240512_080152.png (51.4 KiB) Viewed 12342 times


It looks like it failed to connect to the openrazer-daemon.

I also tried snake, which is a java app. Snake got stuck in a loop during bootup, saying "Updating bootstrap ....", whatever that means.

Code: Select all
$ ./snake
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
Updating bootstrap ....
^CException in thread "Glass/Prism Shutdown Hook" java.lang.NullPointerException: Cannot invoke "com.sun.glass.ui.Timer.stop()" because "this.pulseTimer" is null
        at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.dispose(QuantumToolkit.java:842)
        at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit$1.run(QuantumToolkit.java:253)


Not a good outcome so far.

I will see if I can start the razer-daemon manually.
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 476
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Configuration tool for Razer mouse does not run

Postby banjo » May 12th, '24, 15:57

No luck starting the daemon.

Code: Select all
[root@linux6core:~]# systemctl status openrazer-daemon
Unit openrazer-daemon.service could not be found.
[root@linux6core:~]# cd /usr/lib/systemd/user
[root@linux6core:/usr/lib/systemd/user]# ls | grep razer
openrazer-daemon.service
[root@linux6core:/usr/lib/systemd/user]# systemctl start openrazer-daemon
Failed to start openrazer-daemon.service: Unit openrazer-daemon.service not found.
[root@linux6core:/usr/lib/systemd/user]# file openrazer-daemon.service
openrazer-daemon.service: ASCII text
[root@linux6core:/usr/lib/systemd/user]# cat openrazer-daemon.service
[Unit]
Description=Daemon to manage razer devices in userspace
Documentation=man:openrazer-daemon(8)

[Service]
Type=dbus
BusName=org.razer
ExecStart=/usr/bin/openrazer-daemon -F

[Install]
WantedBy=default.target
[root@linux6core:/usr/lib/systemd/user]# ll /usr/bin/openrazer-daemon
-rwxr-xr-x 1 root root 7027 Apr 14 05:44 /usr/bin/openrazer-daemon*
[root@linux6core:/usr/lib/systemd/user]# file /usr/bin/openrazer-daemon
/usr/bin/openrazer-daemon: Python script, ASCII text executable


Here is the file openrazer-daemon.service

Code: Select all
[Unit]
Description=Daemon to manage razer devices in userspace
Documentation=man:openrazer-daemon(8)

[Service]
Type=dbus
BusName=org.razer
ExecStart=/usr/bin/openrazer-daemon -F

[Install]
WantedBy=default.target


The file /usr/bin/openrazer-daemon is a python script.

Code: Select all
#!/usr/bin/python3
# SPDX-License-Identifier: GPL-2.0-or-later

import argparse
import os
import shutil
import signal
import sys
import time
import logging

from openrazer_daemon.daemon import RazerDaemon, __version__
from subprocess import check_output
from time import sleep
from daemonize import Daemonize

# Basically copied from https://github.com/jleclanche/python-xdg/blob/master/xdg/basedir.py
HOME = os.path.expanduser("~")
XDG_DATA_HOME = os.environ.get("XDG_DATA_HOME", os.path.join(HOME, ".local", "share"))
XDG_CONFIG_HOME = os.environ.get("XDG_CONFIG_HOME", os.path.join(HOME, ".config"))

RAZER_DATA_HOME = os.path.join(XDG_DATA_HOME, "openrazer")
XDG_RUNTIME_DIR = os.environ.get("XDG_RUNTIME_DIR", RAZER_DATA_HOME)
RAZER_CONFIG_HOME = os.path.join(XDG_CONFIG_HOME, "openrazer")
RAZER_RUNTIME_DIR = XDG_RUNTIME_DIR

EXAMPLE_CONF_FILE = '/usr/share/openrazer/razer.conf.example'

CONF_FILE = os.path.join(RAZER_CONFIG_HOME, 'razer.conf')
PERSISTENCE_FILE = os.path.join(RAZER_CONFIG_HOME, 'persistence.conf')
LOG_PATH = os.path.join(RAZER_DATA_HOME, 'logs')

args = None


def parse_args():
    parser = argparse.ArgumentParser()

    parser.add_argument('-v', '--verbose', action='store_true', help='Enable verbose logging')

    parser.add_argument('-F', '--foreground', action='store_true', help='Don\'t fork stay in the foreground')

    parser.add_argument('-r', '--respawn', action='store_true', help='Stop any existing daemon first, if one is running.')
    parser.add_argument('-s', '--stop', action='store_true', help='Gracefully stop the existing daemon.')
    parser.add_argument('--version', action='version', version='%(prog)s {version}'.format(version=__version__))

    parser.add_argument('--as-root', action='store_true', help='Allow the daemon to be started as root')

    parser.add_argument('--config', type=str, help='Location of the config file', default=CONF_FILE)
    parser.add_argument('--persistence', type=str, help='Location to file for storing device persistence data', default=PERSISTENCE_FILE)
    parser.add_argument('--run-dir', type=str, help='Location of the run directory', default=RAZER_RUNTIME_DIR)
    parser.add_argument('--log-dir', type=str, help='Location of the log directory', default=LOG_PATH)

    parser.add_argument('--test-dir', type=str, help='Directory containing test driver structure')

    return parser.parse_args()


def stop_daemon(args):
    pidfile = os.path.join(args.run_dir, 'openrazer-daemon.pid')
    try:
        with open(pidfile) as f:
            pid = int(f.readline().strip())

            # if we have psutil, check that the process name matches the
            # pidfile. Otherwise we might terminate a process that's not
            # ours.
            try:
                import psutil
                try:
                    if psutil.Process(pid).name() != "openrazer-daemon":
                        raise ProcessLookupError()
                except psutil.NoSuchProcess:
                    raise ProcessLookupError()
            except ImportError:
                print("Module psutil is missing, not checking for process name")

            os.kill(pid, signal.SIGTERM)
            pid_exists = True
            delay = 3000
            while delay > 0:
                delay -= 100
                try:
                    time.sleep(0.1)
                    os.kill(pid, 0)
                except ProcessLookupError:
                    print("Process {} stopped".format(pid))
                    pid_exists = False
                    break

            # if we have to kill it, we probably need to remove the
            # pidfile too, otherwise we rely on it to clean up properly
            if pid_exists:
                print("Process {} is hung, sending SIGKILL".format(pid))
                os.kill(pid, signal.SIGKILL)
                os.remove(pidfile)

    except FileNotFoundError:
        print("No pidfile found, assuming openrazer-daemon is not running")
    except ProcessLookupError:
        print("pidfile exists but no process is running. Remove {} and continue".format(pidfile))


def install_example_config_file(config_file):
    """
    Installs the example config file
    """
    if os.path.exists(config_file):
        return

    try:
        os.makedirs(os.path.dirname(config_file), exist_ok=True)
        if os.path.exists(EXAMPLE_CONF_FILE):
            shutil.copy(EXAMPLE_CONF_FILE, config_file)
        else:
            print('Cant find "{0}"'.format(EXAMPLE_CONF_FILE), file=sys.stderr)
    except NotADirectoryError as e:
        print("Failed to create {}".format(e.filename), file=sys.stderr)
        sys.exit(1)


def init_persistence_config(persistence_file):
    """
    Creates a new file for persistence, if it does not exist.
    """
    if os.path.exists(persistence_file):
        return

    try:
        os.makedirs(os.path.dirname(persistence_file), exist_ok=True)
        with open(persistence_file, "w") as f:
            f.writelines("")

    except NotADirectoryError as e:
        print("Failed to create {}".format(e.filename), file=sys.stderr)
        sys.exit(1)


def run_daemon():
    global args
    daemon = RazerDaemon(verbose=args.verbose,
                         log_dir=args.log_dir,
                         console_log=args.foreground,
                         config_file=args.config,
                         persistence_file=args.persistence,
                         test_dir=args.test_dir)
    try:
        daemon.run()
    except KeyboardInterrupt:
        daemon.logger.debug("Exited on user request")
    except Exception as err:
        daemon.logger.exception("Caught exception", exc_info=err)


def run():
    global args

    logger = None
    args = parse_args()

    if args.stop:
        stop_daemon(args)
        sys.exit(0)

    if os.getuid() == 0:
        if args.as_root:
            print("The daemon is being run as root.")
        else:
            print("The daemon should not be run as root. If you have a good reason to do so, use the --as-root flag.")
            sys.exit(1)

    if args.respawn:
        stop_daemon(args)
        time.sleep(3)

    # daemonize logs exceptions to its logger (which defaults to the syslog)
    # and does not make them appear on stdout/stderr. If we're in foreground
    # mode, override that logger with our own.
    if args.foreground:
        logger = logging.getLogger('run-daemon')
        if args.verbose:
            logger.setLevel(logging.DEBUG)

    install_example_config_file(args.config)
    init_persistence_config(args.persistence)

    os.makedirs(args.run_dir, exist_ok=True)
    daemon = Daemonize(app="openrazer-daemon",
                       pid=os.path.join(args.run_dir, "openrazer-daemon.pid"),
                       action=run_daemon,
                       foreground=args.foreground,
                       verbose=args.verbose,
                       chdir=args.run_dir,
                       logger=logger)
    daemon.start()


if __name__ == "__main__":
    run()



I am a little over my head. I don't know where systemctl is looking for services that it cannot find this one.
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 476
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Configuration tool for Razer mouse does not run

Postby banjo » May 12th, '24, 20:39

I got this working. It was sort of an RTFM problem. Users have to be added to the plugdev group to get access to the daemon files.

Troubleshooting page is at:

https://github.com/openrazer/openrazer/wiki/Troubleshooting

Scroll down near the bottom to see the part about the plugdev group.

So I added myself to the plugdev group, rebooted the computer and it works.

Screenshot_20240512_134532.png
Screenshot_20240512_134532.png (54.43 KiB) Viewed 12298 times


It connects to the mouse and lets me change the LED colors etc. So here is the simplified recipe to get this running.

Follow the directions at https://software.opensuse.org/download.html?project=hardware%3Arazer&package=openrazer-meta to install OpenRazer.
Follow directions at https://github.com/z3ntu/RazerGenie to install RazerGenie - I used the flatpak version.
Add yourself to the group plugdev
Reboot the computer.

I never got snake to work, but RazerGenie seems to work OK.

Now that I know how to install it, I might put it on my Mageia8 computer upstairs, although I will probably wait until I finish the upgrade to Mag9
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 476
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Configuration tool for Razer mouse does not run

Postby doktor5000 » May 12th, '24, 21:22

Please don't forget to mark the thread as solved, by editing the subject of the first post and prefix it with [SOLVED], thanks in advance.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18045
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Configuration tool for Razer mouse does not run

Postby morgano » May 12th, '24, 21:54

Thank you for testing and the recipe :)

I opened a bug about dropping razercfg and getting OpenRacer:
https://bugs.mageia.org/show_bug.cgi?id=33193, referencing this thread.
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1489
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: Configuration tool for Razer mouse does not run

Postby banjo » May 12th, '24, 22:00

I will mark it solved.

I might also create a bug request to move Mag10 from qrazercfg to openrazer, as morgano suggested, since qrazercfg does not seem to be well supported.

If that is done, we would also need to supply a GUI front end as well. RazorGenie is a QT application, and it appears to work fine.

I don't know what the protocol is for that kind of request. How are such things decided?
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 476
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: [SOLVED]Configuration tool for Razer mouse does not run

Postby doktor5000 » May 12th, '24, 23:27

Simply create a package request and add the reasoning, you can also link to this thread for more context information.
https://wiki.mageia.org/en/How_to_repor ... ge_request
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18045
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [SOLVED]Configuration tool for Razer mouse does not run

Postby banjo » May 12th, '24, 23:37

Thanks for the link.
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 476
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: [SOLVED]Configuration tool for Razer mouse does not run

Postby morgano » May 13th, '24, 11:34

At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1489
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: [SOLVED]Configuration tool for Razer mouse does not run

Postby morgano » May 16th, '24, 08:23

It is in Mageia MLO repository :)
Please anybody who have suitable hardware test that and comment on the bug and we can probably add it to official repos in Mageia10 and backport for Mageia 9.
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1489
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: [SOLVED]Configuration tool for Razer mouse does not run

Postby banjo » May 16th, '24, 18:58

Sorry I missed a bunch of this discussion. I had a bad stomach bug for a few days. :cry:

I am also not getting updates in the email so I have to keep checking in. Don't know why. Fodder for a different thread.

I will gladly test this later if that helps.
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 476
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: [SOLVED]Configuration tool for Razer mouse does not run

Postby squidf » May 16th, '24, 23:10

Hi.
It is also, now, available for testing in the official MGA repo, Core/Backports_testing.
Feel free to give it a try and, please, report the outcome (good or bad) on the bug report opened by Morgan:
https://bugs.mageia.org/show_bug.cgi?id=33193

Just look for razergenie, install it and read the notes explaining how to add your user to a specific group ;)

Cheers
User avatar
squidf
 
Posts: 5
Joined: Dec 23rd, '21, 13:37
Location: Lyon, France

Re: [SOLVED]Configuration tool for Razer mouse does not run

Postby banjo » May 17th, '24, 13:11

I just gave this a shot. I uninstalled the razercfg and flatpak razergenie that I had previously installed, then opened core/backports and core/backports_testing. When I search for "razer" it finds openrazer but not razergenie. What am I doing wrong?

Screenshot_20240517_070140.png
Screenshot_20240517_070140.png (95.43 KiB) Viewed 11946 times
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 476
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: [SOLVED]Configuration tool for Razer mouse does not run

Postby doktor5000 » May 17th, '24, 15:11

What do you mean you "opened core/backports and core/backports_testing" ? Did you enable those repos and update the metadata from those two ?
Code: Select all
urpmq --list-media active --list-url
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18045
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [SOLVED]Configuration tool for Razer mouse does not run

Postby banjo » May 17th, '24, 19:07

I enabled them in the MCC using the checkboxes.

Screenshot_20240517_125826.png
Screenshot_20240517_125826.png (96.23 KiB) Viewed 11902 times


Here's the command line output listing the active media.

Code: Select all
[brian@linux6core ~]$ urpmq --list-media active --list-url
Core Release https://mirror.math.princeton.edu/pub/mageia/distrib/9/x86_64/media/core/release
Core Updates https://mirror.math.princeton.edu/pub/mageia/distrib/9/x86_64/media/core/updates
Core Backports https://mirror.math.princeton.edu/pub/mageia/distrib/9/x86_64/media/core/backports
Core Backports Testing https://mirror.math.princeton.edu/pub/mageia/distrib/9/x86_64/media/core/backports_testing
Nonfree Release https://mirror.math.princeton.edu/pub/mageia/distrib/9/x86_64/media/nonfree/release
Nonfree Updates https://mirror.math.princeton.edu/pub/mageia/distrib/9/x86_64/media/nonfree/updates
Tainted Release https://mirror.math.princeton.edu/pub/mageia/distrib/9/x86_64/media/tainted/release
Tainted Updates https://mirror.math.princeton.edu/pub/mageia/distrib/9/x86_64/media/tainted/updates
google-chrome http://dl.google.com/linux/chrome/rpm/stable/x86_64
[brian@linux6core ~]$


Ok here is what I did. I disabled Core/Backports because that doesn't appear relevant. Then I used urpmi.update for Backports Testing

Code: Select all
# urpmi.update 'Core Backports Testing'
    $MIRRORLIST: media/core/backports_testing/media_info/20240516-210630-synthesis.hdlist.cz
updated medium "Core Backports Testing"


Razergenie now shows up.

Screenshot_20240517_132552.png
Screenshot_20240517_132552.png (110.08 KiB) Viewed 11892 times


Thanks for the tip.

On to the testing
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 476
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: [SOLVED]Configuration tool for Razer mouse does not run

Postby morgano » May 17th, '24, 19:58

I think it was as simple as that at first try your mirror had not synced fully. razergenie was built last of these.
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1489
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: [SOLVED]Configuration tool for Razer mouse does not run

Postby banjo » May 17th, '24, 20:02

I installed razergenie using the MCC, and it works. It runs and controls the mouse.

I am not sure how complete my testing is because the MCC showed openrazer already installed, and I could not figure out how to uninstall it.

I thought that I had uninstalled all of it before, but apparently I did not.

I would like to test it against a clean system.

Also, the notes say

Code: Select all
and razerd service enabled:

su -c "systemctl enable --now razerd"


My system does not see the razerd service,

Code: Select all
[root@linux6core:~]# systemctl status razerd
Unit razerd.service could not be found.
[root@linux6core:~]#


even though the software is working.

Hints how I can clean this all out and start my testing from scratch?
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 476
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: [SOLVED]Configuration tool for Razer mouse does not run

Postby banjo » May 17th, '24, 20:32

My boot journal shows references to openrazer-daemon

Code: Select all
[root@linux6core:~]# journalctl -b | grep openrazer-daemon
May 17 06:53:47 linux6core drakrpm[44632]: running: rpm -ql openrazer-daemon-3.8.0-1.1.noarch
May 17 06:53:47 linux6core drakrpm[44632]: running: rpm -q --qf '%{description}' openrazer-daemon-3.8.0-1.1.noarch
May 17 06:53:48 linux6core drakrpm[44632]: running: rpm -q --changelog openrazer-daemon-3.8.0-1.1.noarch
May 17 13:40:24 linux6core drakrpm[2092324]: running: rpm -ql openrazer-daemon-3.8.0-1.1.noarch
May 17 13:40:24 linux6core drakrpm[2092324]: running: rpm -q --qf '%{description}' openrazer-daemon-3.8.0-1.1.noarch
May 17 13:40:24 linux6core drakrpm[2092324]: running: rpm -q --changelog openrazer-daemon-3.8.0-1.1.noarch
May 17 13:43:51 linux6core drakrpm[2102658]: running: rpm -ql openrazer-daemon-3.8.0-1.1.noarch
May 17 13:43:51 linux6core drakrpm[2102658]: running: rpm -q --qf '%{description}' openrazer-daemon-3.8.0-1.1.noarch
May 17 13:43:51 linux6core drakrpm[2102658]: running: rpm -q --changelog openrazer-daemon-3.8.0-1.1.noarch
May 17 13:49:23 linux6core dbus-daemon[12195]: [session uid=1001 pid=12195] Activating via systemd: service name='org.razer' unit='openrazer-daemon.service' requested by ':1.207' (uid=1001 pid=2138576 comm="/usr/bin/razergenie")
May 17 13:49:23 linux6core systemd[12178]: Starting openrazer-daemon.service...
May 17 13:49:23 linux6core openrazer-daemon[2138584]: Starting daemon.
May 17 13:49:23 linux6core systemd[12178]: Started openrazer-daemon.service.
May 17 13:49:23 linux6core openrazer-daemon[2138584]: 2024-05-17 13:49:23 | razer                          | INFO     | Initialising Daemon (v3.8.0). Pid: 2138584
May 17 13:49:23 linux6core openrazer-daemon[2138584]: 2024-05-17 13:49:23 | razer.screensaver              | INFO     | Initialising DBus Screensaver Monitor
May 17 13:49:23 linux6core openrazer-daemon[2138584]: 2024-05-17 13:49:23 | razer                          | INFO     | Found device.0: 0003:1532:0099.0009
May 17 13:49:23 linux6core openrazer-daemon[2138584]: 2024-05-17 13:49:23 | razer.device0                  | INFO     | Initialising device.0 RazerBasiliskV3
May 17 13:49:23 linux6core openrazer-daemon[2138584]: 2024-05-17 13:49:23 | razer                          | INFO     | Serving DBus
[root@linux6core:~]#


systemctl does not see the service.

Code: Select all
[root@linux6core:~]# systemctl status openrazer-daemon
Unit openrazer-daemon.service could not be found.


Strange?
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 476
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: [SOLVED]Configuration tool for Razer mouse does not run

Postby squidf » May 17th, '24, 21:51

banjo wrote:My boot journal shows references to openrazer-daemon

Code: Select all
[root@linux6core:~]# journalctl -b | grep openrazer-daemon
May 17 06:53:47 linux6core drakrpm[44632]: running: rpm -ql openrazer-daemon-3.8.0-1.1.noarch
May 17 06:53:47 linux6core drakrpm[44632]: running: rpm -q --qf '%{description}' openrazer-daemon-3.8.0-1.1.noarch
May 17 06:53:48 linux6core drakrpm[44632]: running: rpm -q --changelog openrazer-daemon-3.8.0-1.1.noarch
May 17 13:40:24 linux6core drakrpm[2092324]: running: rpm -ql openrazer-daemon-3.8.0-1.1.noarch
May 17 13:40:24 linux6core drakrpm[2092324]: running: rpm -q --qf '%{description}' openrazer-daemon-3.8.0-1.1.noarch
May 17 13:40:24 linux6core drakrpm[2092324]: running: rpm -q --changelog openrazer-daemon-3.8.0-1.1.noarch
May 17 13:43:51 linux6core drakrpm[2102658]: running: rpm -ql openrazer-daemon-3.8.0-1.1.noarch
May 17 13:43:51 linux6core drakrpm[2102658]: running: rpm -q --qf '%{description}' openrazer-daemon-3.8.0-1.1.noarch
May 17 13:43:51 linux6core drakrpm[2102658]: running: rpm -q --changelog openrazer-daemon-3.8.0-1.1.noarch
May 17 13:49:23 linux6core dbus-daemon[12195]: [session uid=1001 pid=12195] Activating via systemd: service name='org.razer' unit='openrazer-daemon.service' requested by ':1.207' (uid=1001 pid=2138576 comm="/usr/bin/razergenie")
May 17 13:49:23 linux6core systemd[12178]: Starting openrazer-daemon.service...
May 17 13:49:23 linux6core openrazer-daemon[2138584]: Starting daemon.
May 17 13:49:23 linux6core systemd[12178]: Started openrazer-daemon.service.
May 17 13:49:23 linux6core openrazer-daemon[2138584]: 2024-05-17 13:49:23 | razer                          | INFO     | Initialising Daemon (v3.8.0). Pid: 2138584
May 17 13:49:23 linux6core openrazer-daemon[2138584]: 2024-05-17 13:49:23 | razer.screensaver              | INFO     | Initialising DBus Screensaver Monitor
May 17 13:49:23 linux6core openrazer-daemon[2138584]: 2024-05-17 13:49:23 | razer                          | INFO     | Found device.0: 0003:1532:0099.0009
May 17 13:49:23 linux6core openrazer-daemon[2138584]: 2024-05-17 13:49:23 | razer.device0                  | INFO     | Initialising device.0 RazerBasiliskV3
May 17 13:49:23 linux6core openrazer-daemon[2138584]: 2024-05-17 13:49:23 | razer                          | INFO     | Serving DBus
[root@linux6core:~]#


systemctl does not see the service.

Code: Select all
[root@linux6core:~]# systemctl status openrazer-daemon
Unit openrazer-daemon.service could not be found.


Strange?


Hi. Indeed. As I wrote on the bug report:
Code: Select all
The proper command is:
systemctl --user enable --now openrazer-daemon


My bad and it is now fixed.
User avatar
squidf
 
Posts: 5
Joined: Dec 23rd, '21, 13:37
Location: Lyon, France


Return to Basic support

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron