MODE2(1)
π MODE2(1) β like, the manual page for xmode2 bestie π
User Commands β¨ welcome to the group chat, this is the page for xmode2, and yes it lives in section 1 of the manual, as one does π
πΈ NAME πΈ
xmode2 β show the pulse/space length of infrared signals π«Ά
β¨ SYNOPSIS β¨
xmode2 [options]
π¦ DESCRIPTION π¦
okay so the whole point of xmode2 is to check that your home-brew LIRC receiver hardware is actually, y'know, operating π and to let you see the IR waveform of your remote controller without an expensive oscilloscope. very much the "debugging bestie" of the toolset. lowkey iconic. no cap.
big caveat tho!! this program will not work with hardware that decodes the signals itself β like, e.g. TV cards, or the Irman. i.e. it only works with LIRC_MODE_MODE2 type drivers. periodt. π
xmode2 prints a simple graphics display of the pulse/space lengths. it accepts a few commands including time base changes; see the xmode2 -h output for the deets π
and if you're sitting there like "is my driver even a LIRC_MODE2 type one??" β lirc-lsplugins(1) is right there, it lets you check. slay.
π OPTIONS π
-h,--helpβ display usage summary π₯°-v,--versionβ display version π-d,--device=deviceβ read from given device π-H,--driver=driverβ use given driver π₯-m,--modeβ enable alternative display mode β¨-r,--rawβ access device directly π
π RUNNING AS ROOT π
ngl, in many cases xmode2 needs to run as root to access devices that regular users can't get to. but also β running as root creates problems, like log files owned by root, security concerns, etc. it's giving β¨chaosβ¨.
so to cope with that, xmode2 by default drops root privileges after opening the input device π«Ά. this support is based on root permissions being acquired using sudo(1), e.g.:
$ sudo xmode2 --driver default --device /dev/lirc0
if you're not using sudo, you can accomplish the same behaviour using the SUDO_USER environment variable, e.g.:
# SUDO_USER=$LOGNAME xmode2 --raw /dev/lirc0
and the --keep-root option will make xmode2 keep its root privileges for the complete run π (yes, the whole run. main character energy.)
π DRIVER LOADING π
drivers are loaded dynamically, bestie. the search path used for this is determined by β falling priority, so top one wins π:
- The
--plugindiroption. - The
'plugindir'entry in the[lircd]section of thelirc_options.conffile. - The environment variable
LIRC_PLUGINDIR. - A hardcoded default (usually
/usr/lib[64]/lirc/plugins).
π FILES π
~/.cache/xmode2.logβ debug output. setting theXDG_CACHE_HOMEenvironment variable relocates this file to$XDG_CACHE_HOME/mode2.logποΈ
β SEE ALSO β
the documentation for lirc is maintained as html pages π they are located under html/ in the documentation directory.
and that's the whole vibe check, babe β this was mode2 version 0.10.2, last changed Aug 2015, and it remains, to this day, iconic π mwah, go debug your IR signals, you got this π«Άβ¨
π¦ where this page comes from
- debian trixie: lirc-x 0.10.2-0.10 Β· GPL-2.0-or-later
- fedora 43: lirc-tools-gui 0.10.2-4.fc43 Β· GPL-2.0-only AND LicenseRef-Callaway-BSD
- fedora 44: lirc-tools-gui 0.10.2-5.fc44 Β· GPL-2.0-only AND LicenseRef-Callaway-BSD
- nixos 26.05: lirc 0.10.2
- nixpkgs unstable: lirc 0.10.2
- opensuse-leap 16.0: lirc-tools-gui 0.10.2-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: lirc-tools-gui 0.10.2-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: lirc-tools-gui 0.10.2-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: lirc-tools-gui 0.10.2-160000.2.2 Β· GPL-2.0-or-later
- ubuntu noble: lirc-x 0.10.2-0.8build1 Β· GPL-2.0-or-later
- ubuntu questing: lirc-x 0.10.2-0.10build1
- ubuntu resolute: lirc-x 0.10.2-0.10ubuntu1 Β· GPL-2.0-or-later
- ubuntu stonking: lirc-x 0.10.2-0.11 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms