Linux device manager for Logitech devices
Go to file
Ken Sanislo 8a941c5553 Fix crash on exit from device cleanup during interpreter shutdown
`solaar show` (and any exit path) printed a cascade of "I/O operation
on closed file" / "sys.meta_path is None" logging errors at the bottom.

Two compounding causes:

- Device.close() was not idempotent. The CLI closes devices explicitly,
  then __del__ calls close() again during interpreter shutdown, re-running
  every device cleanup a second time. Guard with a _closed flag (not
  self.handle, which is legitimately None for receiver-paired devices).

- rgb_power.cleanup() read device.settings — the lazy property — which
  forces a first-time settings build. Running that build during shutdown
  fails because gettext can no longer import (sys.meta_path is None),
  raising inside a __del__ handler. Read the already-built settings (or
  the persister) via a new _rgb_control_off() helper that never triggers
  the build.

Either guard alone stops the crash; both are correct hardening for a
__del__-invoked path.
2026-07-31 16:36:04 -04:00
.github
…
bin
…
docs po: add Irish translation (#3256) 2026-06-11 15:50:43 -04:00
lib Fix crash on exit from device cleanup during interpreter shutdown 2026-07-31 16:36:04 -04:00
po
…
rules.d
…
rules.d-uinput
…
share
…
tests Fix crash on exit from device cleanup during interpreter shutdown 2026-07-31 16:36:04 -04:00
tools
…
.coveragerc
…
.git-blame-ignore-revs
…
.gitignore
…
.pre-commit-config.yaml
…
.python-version
…
CHANGELOG.md
…
COPYRIGHT
…
LICENSE.txt
…
MANIFEST.in
…
Makefile
…
README.md
…
RELEASE.md
…
RHEL.md
…
Release_Notes.md
…
mkdocs.yml
…
pyproject.toml
…
release.sh
…
setup.py
…

README.md

Solaar

Solaar is a Linux manager for many Logitech keyboards, mice, and other devices that connect wirelessly to a Unifying, Bolt, Lightspeed or Nano receiver as well as many Logitech devices that connect via a USB cable or Bluetooth. Solaar is not a device driver and responds only to special messages from devices that are otherwise ignored by the Linux input system.

More Information - Usage - Capabilities - Rules - Manual Installation - Known Issues

codecov License: GPL v2

 

 

Solaar supports:

  • pairing/unpairing of devices with receivers
  • configuring device settings
  • custom button configuration
  • running rules in response to special messages from devices

For more information see the main Solaar documentation page. -

Installation Packages

Up-to-date prebuilt packages are available for some Linux distros (e.g., Fedora) in their standard repositories. If a recent version of Solaar is not available from the standard repositories for your distribution, you can try one of these packages:

Solaar is available from some other repositories but may be several versions behind the current version: