Skip to main content

Real-time AI upscaler for any Linux window

Project description

icon

Real-Time Upscaler for Linux

PyPI version Python versions License: GPLv3

A real-time SRCNN upscaler for any X-Window (X11 or XWayland) on GNU/Linux. It uses CuNNy neural networks to perform 2x (or 4x) upscaling to full screen while preserving aspect ratio. Mouse clicks and motion are automatically forwarded to the original window.

Results at 400% magnification

Features

  • Neural-Network upscaling using SRCNNs trained for high-quality upscaling of visual novels and illustrations.
  • Model selection from 9 variants with variable quality/performance trade-offs.
  • Hardware accelerated using Vulkan compute.
  • Tile-Based processing that upscales only the frame regions that change, reducing GPU load for mostly static content.
  • Customizable output geometry: scaling mode (fit, stretch, cover), offset, crop and zoom.
  • Input forwarding as if interacting directly with the original window.

Requirements

  • GNU/Linux (X11 or Wayland with XWayland)
  • Vulkan-capable GPU (NVIDIA, AMD, Intel)
  • Python 3.10 or newer
  • Qt XCB plugin

[!IMPORTANT]

Qt XCB plugin

This library is not installed by default on most desktop environments.

Install instructions (click to expand)

Debian / Ubuntu / Linux Mint

sudo apt update
sudo apt install libxcb-cursor0

Fedora / RHEL / CentOS

sudo dnf install xcb-util-cursor

Arch Linux / CachyOS

sudo pacman -S xcb-util-cursor

openSUSE

sudo zypper install libxcb-cursor0

Installation

Install with pipx (recommended)

pipx install linux-rt-upscaler

Install from source

Required development packages (click to expand)

Debian / Ubuntu / Linux Mint

sudo apt update
sudo apt install gcc make libvulkan-dev libx11-dev libxcb1-dev libx11-xcb-dev \
    libxext-dev libxdamage-dev libxfixes-dev

Fedora / RHEL / CentOS

sudo dnf install gcc make vulkan-loader-devel libX11-devel libxcb-devel libX11-xcb-devel \
    libXext-devel libXdamage-devel libXfixes-devel

Arch Linux / CachyOS

sudo pacman -S base-devel vulkan-devel libx11 libxcb libxext libxdamage libxfixes

openSUSE

sudo zypper install gcc make vulkan-devel libX11-devel libxcb-devel libX11-xcb-devel \
    libXext-devel libXdamage-devel libXfixes-devel

git clone https://github.com/baronsmv/linux-rt-upscaler.git
cd linux-rt-upscaler

pip install -e .

Optional: Desktop integration

After installing, you can add a desktop entry so the GUI appears in your application menu:

curl -fsSL https://raw.githubusercontent.com/baronsmv/linux-rt-upscaler/refs/heads/main/scripts/desktop_integration.sh \
    -o /tmp/desktop_integration.sh
less /tmp/desktop_integration.sh  # always review scripts before running them
sh /tmp/desktop_integration.sh

Usage

After installation, the upscale-gui and upscale commands will be available globally:

Graphical mode

upscale-gui

The GUI displays live thumbnails of every open valid window. Click one to start upscaling that window.

Use the right panel to adjust any setting, and the left panel to create profiles that automatically apply when a matching window is detected, or when selected manually.

Command-line mode

# Upscale the currently active window
upscale

# Interactively select from visible windows
upscale -s

# Run a command and upscale its window
upscale -- <command>

# Choose a specific model (examples)
upscale -m 8x32      # Highest quality, slowest
upscale -m veryfast  # Maximum performance

# Perform 4x upscaling (two 2x passes)
upscale -2

# Crop 100 pixels from top and left, then upscale
upscale --crop-top 100 --crop-left 100

For a full list of options and examples:

upscale --help

Controls

Shortcut Action
Alt+Shift+S Pause upscaling
Alt+Shift+Escape Exit upscaling
Alt+Shift+P Take a lossless screenshot
Alt+Shift+M Switch to the next model
Alt+Shift+G Cycle output geometry (fit, stretch, cover)
Alt+Shift++ / - Zoom in / Zoom out
Alt+Shift+ / / / Pan the upscaled content

All hotkeys can be customised in the configuration file.

Profiles

You can define named configuration profiles in your YAML config file. Profiles let you quickly switch settings for different games or applications without typing long command lines each time.

Create a config file (e.g., ~/.config/linux-rt-upscaler/config.yaml) and add a top-level profiles key. Each profile is a dictionary with an optional match section and an options section.

If no profile is selected manually, the program checks all profiles that have a match section against the title of the target window. If a profile matches (any match criterion is sufficient), its options are applied automatically.

# General defaults (lowest priority)
model: 3x12
double_upscale: true

# Profiles that override if matched
profiles:
  game:
    match:
      title: "Danganronpa"     # Exact match (case-insensitive)
      title_contains: "ronp"   # Or substring match (case-insensitive)
      title_regex: "Dangan.*"  # Or regular expression (case-insensitive)
    options:
      model: 4x24
      double_upscale: true

A more detailed example is included here.

How It Works

  1. Selects a window using X11 to find the target window by PID or WM_CLASS.
  2. Captures the window's pixels using XShm and XDamage.
  3. Upscales with SRCNN compute shaders to a 2x (or 4x) larger image.
  4. Scales with a Lanczos2 shader to fill the monitor.
  5. Renders in a overlay window that bypasses the window manager (so it always stays on top).
  6. Forwards mouse events to the original window.

Future Plans

  • Addition of more SRCNN models (FSRCNNX planned).
  • Native Wayland support (on hold: Wayland capture is deeply compositor-specific and currently doesn’t align with the XShm/XDamage pipeline.)

Known Issues

Mouse forwarding may not work with Wine, Proton <10 and other applications

Synthetic mouse events (clicks, motion, wheel) sent by the overlay are ignored by:

  • Wine and Proton versions older than 10.0 (GE-Proton10 + UMU works).
  • Some native applications like Firefox.

For more details, see issue #7.

Acknowledgments

This project stands on the shoulders of several open-source works, mantained by amazing people:

  • L65536, for the original RealTimeSuperResolutionScreenUpscalerforLinux, which demonstrated the feasibility of real-time SRCNN upscaling on Linux and served as a proof-of-concept for this project.
  • funnyplanter, for the incredible CuNNy neural network upscaling models.
  • Compushady, which served as an invaluable Vulkan foundation during early development.
  • PySide6, the Qt binding that powers the entire graphical interface and overlay window.
  • xcffib, the XCB binding used for window management, monitor querying and event forwarding.
  • Pillow, the Python Imaging Library, used for saving screenshots and rendering OSD messages.
  • PyYAML, the YAML parser used for configuration file operations.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

linux_rt_upscaler-1.0.1.post3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

linux_rt_upscaler-1.0.1.post3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

linux_rt_upscaler-1.0.1.post3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

linux_rt_upscaler-1.0.1.post3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

linux_rt_upscaler-1.0.1.post3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file linux_rt_upscaler-1.0.1.post3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for linux_rt_upscaler-1.0.1.post3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6fc95c0b7b5a1cf69ab1d4a1457eb4ff419167a929b1bc12e26251aa920760e2
MD5 7ac2857e255bf9d4859fe8b38870e732
BLAKE2b-256 dfda2a909483d89878a4be2d2b2055a25feb0cafa4a1705bc4336b960261c4eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for linux_rt_upscaler-1.0.1.post3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on baronsmv/linux-rt-upscaler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file linux_rt_upscaler-1.0.1.post3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for linux_rt_upscaler-1.0.1.post3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4ede3e801854ec799150ca6f441a60f009f20d8ba6dd4e1adc237e4b6d2e2764
MD5 e5148f1a1c3450cd4d8e2e11f6b5164d
BLAKE2b-256 cc29bf16816d165579692ecae2907e7dbc75790f49ac1fd576b5b60743068ad2

See more details on using hashes here.

Provenance

The following attestation bundles were made for linux_rt_upscaler-1.0.1.post3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on baronsmv/linux-rt-upscaler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file linux_rt_upscaler-1.0.1.post3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for linux_rt_upscaler-1.0.1.post3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5d2df8bce8911ad1cca7728f895e7e27ff5ef71163297069dcf92d32d7bd0237
MD5 06ac529f40db5ef99144743cdccafe6a
BLAKE2b-256 8706e89c18185353bc4a184e939ad2a55a4392781866e6eb7557727a54f452eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for linux_rt_upscaler-1.0.1.post3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on baronsmv/linux-rt-upscaler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file linux_rt_upscaler-1.0.1.post3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for linux_rt_upscaler-1.0.1.post3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6d05c64da10721f35ae321c9225e5c68f18817034033cc4a77e7c8797777c0d1
MD5 6b7e5d0a1ff51bf1d9d83c56927512de
BLAKE2b-256 bc99d5fa27f571d9fc851f1089d1db3856edb3b2ff96956f8a8e1ca1a45a6479

See more details on using hashes here.

Provenance

The following attestation bundles were made for linux_rt_upscaler-1.0.1.post3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on baronsmv/linux-rt-upscaler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file linux_rt_upscaler-1.0.1.post3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for linux_rt_upscaler-1.0.1.post3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 277b97a44c8b99be127e8bcd583dd9ed6a7d1c75dc3be49d6a1a172c4e399102
MD5 c8ef605812a2dd893a2f6ea2c466e22d
BLAKE2b-256 001ad824719a64dc1920f8f7bd2af879e4e30ad3119c77a210bed0371d15234c

See more details on using hashes here.

Provenance

The following attestation bundles were made for linux_rt_upscaler-1.0.1.post3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on baronsmv/linux-rt-upscaler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page