Skip to content

Repository files navigation

LG Buddy

LG Buddy makes an LG webOS TV behave more like a monitor for a Linux PC. It is inspired by LGTV Companion for Windows.

LG Buddy can:

  • turn the TV on at boot and wake
  • turn the TV off at shutdown and before system sleep
  • blank and restore the panel on supported desktop idle backends
  • keep the panel awake when supported gamepads are active
  • adjust OLED pixel brightness from a desktop dialog or the command line
  • control TV volume and mute from the command line
  • manage settings and check for updates from the command line

GNOME is not required. Official release bundles include a prebuilt lg-buddy binary, so normal installation does not require a Rust toolchain.

Desktop Compatibility

Functionality GNOME Compatible native Wayland Wayland with swayidle Other Linux sessions
TV control at boot, shutdown, sleep, and wake
Idle blank and activity restore
Gamepad activity keeps the panel awake
Brightness, volume, settings, and update commands
Brightness desktop dialog

The default auto backend uses GNOME when compatible, then falls back to swayidle when installed. Native Wayland is currently opt-in:

lg-buddy settings set screen.backend wayland

See the user guide for backend selection and troubleshooting. Protocol and event details are documented in the session backend model.

Before You Install

The native lg_webos control path does not require Python. Native-only packages can omit the Python client, venv, and pip. The current install.sh flow still provisions bscpylgtv as a compatibility fallback and installs the brightness dialog, so release-bundle installation checks for Python 3 with venv and pip, plus zenity. swayidle is required only when using that desktop backend.

Debian, Ubuntu, and Pop!_OS

sudo apt install python3-venv python3-pip zenity
# Optional swayidle backend:
sudo apt install swayidle

Fedora

sudo dnf install python3 python3-pip python3-virtualenv zenity
# Optional swayidle backend:
sudo dnf install swayidle

Arch Linux

sudo pacman -S python python-pip python-virtualenv zenity
# Optional swayidle backend:
sudo pacman -S swayidle

Source builds also require a Rust toolchain and a working C toolchain because the vendored D-Bus library is compiled during the build. See the development guide for build instructions.

Install

  1. Download and extract the release archive for your platform.
  2. Run the installer as your regular user:
chmod +x ./install.sh
./install.sh

Do not run the installer with sudo; it requests elevated access when needed.

The installer asks for the TV's IP address, MAC address, HDMI input, control platform, and desktop idle preferences, then installs the required services.

If you select the native lg_webos control platform, accept the pairing prompt during setup. With the default bscpylgtv platform, the prompt may instead appear on first use; see the bscpylgtv first-use guide.

The shell installer targets conventional Linux installations with mutable system locations. First-class NixOS packaging is tracked in issue #24.

Quick Start

LG Buddy's services run automatically after installation. Common commands are:

lg-buddy power on
lg-buddy power off
lg-buddy screen off
lg-buddy screen on
lg-buddy brightness
lg-buddy brightness get
lg-buddy brightness set 65
lg-buddy volume
lg-buddy volume 20
lg-buddy volume up
lg-buddy volume mute
lg-buddy settings list
lg-buddy settings describe screen.backend
lg-buddy updates check
lg-buddy --version

Change an individual setting with:

lg-buddy settings set <key> <value>

For example:

lg-buddy settings set screen.idle_timeout 600
lg-buddy settings set screen.restore_policy aggressive
lg-buddy settings set updates.auto_check disabled

Run lg-buddy <command> --help for scoped syntax. To revisit the complete interactive setup, run ./configure.sh.

The user guide covers all settings, desktop backends, TV platform selection, updates, service checks, and uninstalling.

Documentation

Credits

About

LG Buddy is a rust-based Linux daemon that makes an LG WebOS TV behave like a monitor, by turning it on and off automatically. It also protects your OLED TV by aggressively blanking the screen even when your DE inhibits suspend.

Resources

Contributing

Stars

85 stars

Watchers

2 watching

Forks

Releases

Contributors

Languages