Skip to content
Peter Hutterer edited this page Sep 29, 2017 · 3 revisions

Debugging with ratbagctl.devel

This helper tool is a python wrapper around ratbagd.devel, a custom ratbagd that uses the git sha in the dbus name to avoid clashes with the system-wide ratbagd. ratbagctl.devel starts that ratbagd, runs the command and terminates it again after. This allows for quick testing without requiring install/restart service cycles. Use ratbagctl.devel in the same way as ratbagctl, e.g. sudo ./build/ratbagctl.devel info event20.

The --keepalive commandline argument keeps ratbagd.devel running after issuing the command, allowing other tools to connect to this temporary instance. The dbus name is printed on the commandline, e.g.

> sudo ./build/ratbagctl.devel --keepalive list
event20:   Logitech Gaming Mouse G303      
event7:    Logitech G500s Laser Gaming Mouse
test_device: Test device                     

export RATBAGCTL_DEVEL="org.freedesktop.ratbag_devel1_55670ea"

Appending -v, -vv, -vvv etc. passes down the verbosity level to ratbagd and is useful for debugging raw messages. Adding extra vs increases verbosity.

> sudo ./build/ratbagctl.devel -vv list        
ratbag debug: driver match found: Test driver
test_device: "Test device", 4 profiles
ratbag debug: Logitech Gaming Mouse G303 is device '/dev/hidraw3'.
ratbag debug: Logitech Gaming Mouse G303 is device '/dev/hidraw4'.
ratbag debug: report ID 01
ratbag debug: report ID 03
ratbag debug: report ID 04
ratbag debug: report ID 10
ratbag debug: report ID 11
ratbag debug: 'Logitech Gaming Mouse G303' is using protocol v4.2
ratbag debug: device has adjustable dpi
...

Clone this wiki locally