Skip to content

Releases

0.5.0-1

Choose a tag to compare

@wl04 wl04 released this 22 Nov 00:02

What's new (since 0.4.0-1)

  • Distinguish the edited GPU preference from the running GPU and its outputs.
  • Group hardware details by GPU and use model aliases throughout the window.
  • Fit expanded details and keep action buttons visible on smaller screens.
  • Apply either a GPU or automatic selection with one button.
  • Offer Log out or Reboot now only for the saved preference's pending switch.
  • Update English and Russian messages, the screenshot, and the user manual.

Install

sudo apt install ./gpu-switcher_0.5.0-1_all.deb

apt resolves any missing dependencies from the repository; offline, with
all dependencies present, sudo dpkg -i also works.

The package reloads the systemd unit and restarts a helper that is still
running after an upgrade, so no manual restart is needed.

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  1124505feb0440783ab2f340c3afdfc5c4142c4e02c33d13b41143d0f5ed2b43
file    gpu-switcher_0.5.0-1_all.deb

0.4.0-1

Choose a tag to compare

@wl04 wl04 released this 12 Nov 22:39

What's new (since 0.3.1-1)

  • New: gpu-switcher list, status and version answer in a terminal.
  • New: the terminal commands work over SSH: they need no display.
  • New: gpu-switcher version prints the version of the installed package.
  • New: a terminal names a card the way the window names it.
  • New: exit codes a script can branch on: 0 answered, 2 bad usage.
  • Tooling: the window itself is covered by tests on a virtual display.
  • Tooling: what a row advertises and what Apply means are pure functions.
  • Tooling: coverage floor is 78%; the terminal front-end is 98% covered.

Install

sudo apt install ./gpu-switcher_0.4.0-1_all.deb

apt resolves any missing dependencies from the repository; offline, with
all dependencies present, sudo dpkg -i also works.

The package reloads the systemd unit and restarts a helper that is still
running after an upgrade, so no manual restart is needed.

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  074f4b7ef38db7683dbed61a8fa3c36aa49edfaf0f9d456037effae19f58469b
file    gpu-switcher_0.4.0-1_all.deb

0.3.1-1

Choose a tag to compare

@wl04 wl04 released this 12 Nov 06:20

What's new (since 0.3.0-1)

  • New: each GPU row says which displays are plugged into it.
  • New: Apply warns before switching to a GPU with no display connected.
  • New: the app asks udev which rule it is really applying.
  • New: a rule udev never applied is no longer shown as a pending reboot.
  • New: a Refresh button re-reads the GPUs, the rule and the running adapter.
  • New: the window re-reads that state when it comes back into view.
  • Fix: a helper that vanished mid-call is no longer called a rejected rule.
  • Fix: the running adapter is read from a journal every user can read.
  • Fix: udevadm too old to verify is not reported as a rule it rejected.
  • Fix: a rule file that cannot be read has its own message.
  • Fix: the helper answers in the language of the person who clicked.
  • Packaging: postinst reloads and restarts the helper unit; postrm matches.
  • Packaging: the man page takes its version and date from the changelog.
  • Tooling: tests run under a coverage floor; CI checks the shell scripts.
  • Tooling: a guard fails if a translated string never reached its catalog.
  • Tooling: the app-helper D-Bus contract is pinned by a test.
  • Tooling: a script verifies the sandbox of the privileged helper.
  • Tooling: shipped languages come from po/, not from hardcoded lists.

Install

sudo apt install ./gpu-switcher_0.3.1-1_all.deb

apt resolves any missing dependencies from the repository; offline, with
all dependencies present, sudo dpkg -i also works.

The package reloads the systemd unit and restarts a helper that is still
running after an upgrade, so no manual restart is needed.

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  81e046d3ee111cc98cabaea0476fde16027fb276ea30e509486fe393843acfb2
file    gpu-switcher_0.3.1-1_all.deb

0.3.0-1

Choose a tag to compare

@wl04 wl04 released this 09 Nov 20:44

What's new (since 0.2.4-1)

  • New: state row shows running vs configured GPU and what applies when.
  • New: after login the app confirms GNOME used the configured GPU.
  • Change: helper replies no longer repeat timing and the backup path.
  • Fix: three Russian strings that appeared in English are translated.
  • Tooling: screenshot.sh renders the window with GTK, not gnome-screenshot.
  • Tooling: a test requires all translatable strings in each catalog.

Install

sudo apt install ./gpu-switcher_0.3.0-1_all.deb

apt 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 so the
new code takes over:

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  6b0f0782f92247e76f59e59cf99534843fc579b23434a9039194ae6c41f7863e
file    gpu-switcher_0.3.0-1_all.deb

0.2.4-1

Choose a tag to compare

@wl04 wl04 released this 08 Nov 13:12

What's new (since 0.2.3-1)

  • Fix: real GIO timeouts are now recognized (the code was wrong); a lost or silent helper connection is treated as an unknown outcome and the state is rechecked instead of restoring the old selection.
  • Fix: the managed rule is read from active lines only; a commented-out, unrecognized or unreadable rule is reported with a warning instead of being shown as the configured GPU or as automatic selection.
  • Fix: an unlistable udev rule directory is reported as a conflict by the helper; a failure creating the temporary rule file is reported as "nothing changed".
  • Fix: SetPrimary rechecks the GPU, conflicts and the rule path after authorization; removing the managed rule now fsyncs its directory.
  • Tooling: release.sh rejects an unknown third argument; new regression tests for helper lifecycle and rule parsing.

Install

sudo apt install ./gpu-switcher_0.2.4-1_all.deb

apt 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 so the
new code takes over:

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  5b4505bc7a6e9664f468d53617fe14d98c66e51ffdfecc365a1a79de114849ed
file    gpu-switcher_0.2.4-1_all.deb

0.2.3-1

Choose a tag to compare

@wl04 wl04 released this 07 Nov 22:34

What's new (since 0.2.2-1)

  • Fix: the helper no longer exits during a long polkit dialog; its operation lock is released after unexpected errors instead of leaving it answering Busy.
  • Fix: udev rule conflicts are detected when the tag is assigned after a match on the same line or on a continued line; TAG!= is no longer flagged.
  • Fix: a timed-out udevadm child is killed, and a timed-out polkit check is cancelled asynchronously.
  • Fix: SetAuto prunes old backups; no rule is written when the GPU vendor or device id cannot be read.
  • Fix: error messages no longer show the GDBus.Error prefix; buttons are disabled while the window re-detects.
  • Tooling: mypy per-module strictness and the ruff rule set are now enforced.

Install

sudo apt install ./gpu-switcher_0.2.3-1_all.deb

apt 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 so the
new code takes over:

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  d3fe48a7ffe994d5ea0f771a151f60d38416ce7b5a4125e729347f03f1502f48
file    gpu-switcher_0.2.3-1_all.deb

0.2.2-1

Choose a tag to compare

@wl04 wl04 released this 07 Nov 19:18

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 /proc uid scan (no
    logind round trip) with journalctl filtering server-side, and GPU names come
    from the lspci machine 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 .deb builds + lintian,
    systemd-analyze verify), pinned dev tools, a single install list in
    make install, and mypy now type-checks main.py with
    disallow_untyped_defs for 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.
  • SetPrimary survives 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 calls invocation.get_cancellable() (not exposed by the real
    GDBusMethodInvocation in this pygobject build); it uses a fresh
    Gio.Cancellable.
  • Polkit authorization no longer hangs — authorize() no longer passes
    user_data to connection.call (pygobject forwards it to the callback, which
    raised TypeError before the reply completed).
  • The udevadm refresh no longer crashes — g_subprocess_communicate_finish
    returns GLib.Bytes (or None), 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.deb

apt 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

0.1.1-1

Choose a tag to compare

@wl04 wl04 released this 04 Nov 23:21

What's new (since 0.1.0-26)

  • Fix: the helper no longer crashes (NameError) when its rate-limit cleanup removes expired per-caller entries.
  • The helper's reply messages are now composed from shared building blocks; the wording is unchanged in every shipped language.
  • ruff (lint and format) and mypy (type check) are wired into the local checks (make lint, make typecheck); public contracts are type-annotated.
  • Test suite: snake_case method names, language-agnostic (English primary), and a catalog-completeness guard (no empty or fuzzy translations in any shipped locale).

Install

sudo apt install ./gpu-switcher_0.1.1-1_all.deb

apt resolves any missing dependencies from the repository; offline, with
all dependencies present, sudo dpkg -i also works.

Upgrading from an older version: stop a still-running helper first —
sudo pkill -f gpu_switcher_helper.

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  8105547dbcfa054eb54f445caa691380c27684d6ad4cc8825b457d75a4cb2584
file    gpu-switcher_0.1.1-1_all.deb

0.1.0-26

Choose a tag to compare

@wl04 wl04 released this 04 Nov 20:05

What's new (since 0.1.0-25)

  • Detection: the running primary is no longer reported as unknown when gnome-shell is not a descendant of the logind session leader (current GNOME runs the session under a systemd user manager); the journal lookup now falls back to the single system-wide gnome-shell pid.

Install

sudo apt install ./gpu-switcher_0.1.0-26_all.deb

apt resolves any missing dependencies from the repository; offline, with
all dependencies present, also works.

Upgrading from an older version: stop a still-running helper first —
sudo pkill -f gpu_switcher_helper.

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  731ff527a4668afde4a706259670eb98b66401e0200d54601d212af877b72cca
file    gpu-switcher_0.1.0-26_all.deb

0.1.0-25

Choose a tag to compare

@wl04 wl04 released this 04 Nov 19:36

What's new (since 0.1.0-24)

  • Security: the caller's locale is mapped to the en/ru allowlist before catalog loading, so a caller-controlled locale can no longer hang the root helper.
  • Security: the helper's diagnostic log is bounded (2000-char lines, flattened), rotated (1 MiB, one slot), and rate-limited (20 calls/60 s per sender and method).
  • 3D-controller-class GPUs (PCI 0x030200) are now detected as valid display primaries, in the UI and in the helper.
  • Reset now refreshes udev when the managed rule is already absent, so a previously failed refresh can be retried.
  • When the configured GPU is not currently detected, the app shows a distinct "Configured GPU (not currently detected)" state instead of "auto"; Apply on that state is a guarded no-op pointing at "Reset to auto".
  • The polkit policy is fixed (a single block, as the DTD requires) and is validated during every build.
  • Udev verification now distinguishes verified / unsupported / failed: an error, timeout, or missing udevadm is no longer reported as success and never enables the fast-path logout.

Install

sudo dpkg -i gpu-switcher_0.1.0-25_all.deb

Upgrading from an older version: stop a still-running helper first —
sudo pkill -f gpu_switcher_helper.

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  acd49a9e0680d1e9d928b439616fe00e993d4e2b806d93db9486ca97bfc86ce0
file    gpu-switcher_0.1.0-25_all.deb