Repository navigation
0.2.2-1
What's new (since 0.1.1-1)
The 0.2 line is a substantial overhaul: the code is restructured into
gpu_switcher.core and gpu_switcher.helper, the helper is now a
D-Bus-activated systemd service that is fully async, and the GUI is
accessible and compact.
Features
- Accessible, compact UI — GPU rows are two lines (name on top, PCI address and
badges below); the name is the radio's child, so screen readers announce each
card and clicking the label selects it; status banners use Adwaita's
success/warning/error styling; the window sizes to its content. - Faster detection — the running primary is found by a
/procuid scan (no
logind round trip) with journalctl filtering server-side, and GPU names come
from thelspcimachine format. - Helper as a systemd service — D-Bus-activated, fully async with a busy lock,
stable D-Bus error names, journal logging, and hardened (python3 -I -B, no
site/user.pyc). - i18n and data — honours
LANGUAGE, derives the shipped locales, and drops the
hard-coded GPU table (unknown cards show their PCI id). - Tooling — CI (test/lint/typecheck, both
.debbuilds + lintian,
systemd-analyze verify), pinned dev tools, a single install list in
make install, and mypy now type-checksmain.pywith
disallow_untyped_defsfor the core modules and tests.
Behaviour fixes
- Timeouts are matched as
G_IO_ERROR_TIMEOUT(7), so real timeouts are
reported and the stale polkit dialog is cancelled. - The idle-exit timer is armed at startup.
SetPrimarysurvives a non-UTF-8 existing rule; a second app start presents
the existing window; a vanished selected card is refused instead of silently
switching to auto; actions are disabled outside a GNOME Wayland session.
Runtime fixes (found in hardware testing)
- Apply / Reset to auto no longer fail with
Error.Internal— the helper no
longer callsinvocation.get_cancellable()(not exposed by the real
GDBusMethodInvocationin this pygobject build); it uses a fresh
Gio.Cancellable. - Polkit authorization no longer hangs —
authorize()no longer passes
user_datatoconnection.call(pygobject forwards it to the callback, which
raisedTypeErrorbefore the reply completed). - The udevadm refresh no longer crashes —
g_subprocess_communicate_finish
returnsGLib.Bytes(orNone), not Python bytes; the stream is decoded via
a normalizing helper.
Verified end-to-end on a two-GPU AMD system: Reset to auto, and Apply to each
card (udevadm verify Success: 1, and the mutter tag
MUTTER_DEVICE_PREFERRED_PRIMARY=1 on the chosen card).
Install
sudo apt install ./gpu-switcher_0.2.2-1_all.debapt resolves any missing dependencies from the repository; offline, with all
dependencies present, sudo dpkg -i also works.
Upgrading from an older version: restart the still-running helper first —
sudo systemctl restart gpu-switcher-helper.service.
Requires: python3 (>= 3.12), python3-gi, gir1.2-gtk-4.0 (>= 4.10),
libgtk-4-1 (>= 4.10), polkitd, dbus, udev, systemd, pciutils.
Checksum
sha256 32600f5f76dbc69b94ad1c65d77c2bf349cc03f3ce4f629cbbe674b09b0c07de
file gpu-switcher_0.2.2-1_all.deb