Inspired by LGTV Companion for Windows, LG Buddy makes an LG WebOS TV behave more like a monitor for a Linux PC.
It 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 desktop idle and activity, including gamepad activity on GNOME
- adjust OLED pixel brightness with a small desktop dialog or CLI command
LG Buddy supports GNOME and swayidle-based sessions. Official release bundles include a prebuilt lg-buddy binary, so normal installation does not require a Rust toolchain.
If you build lg-buddy from source instead of using a release bundle, cargo
now also needs a working C toolchain because the vendored libdbus runtime is
compiled as part of the build.
Install prerequisites:
python3-venvpython3-pipzenity
Backend-specific:
swayidlefor theswayidlebackend
The GNOME backend requires a compatible GNOME session with:
- GNOME Shell
org.gnome.ScreenSaverorg.gnome.Mutter.IdleMonitor
At runtime, GNOME support now uses a persistent in-process session-bus client for shell detection, ScreenSaver signals, and Mutter idletime polling. The GNOME monitor also observes readable Linux gamepad input devices so controller activity can keep the TV output awake even when GNOME does not count that input as desktop activity. It refreshes the watched device set when Linux reports input-device add, remove, or change events, with a periodic reconciliation scan as a fallback.
Typical package installs:
Debian/Ubuntu/Pop!_OS
sudo apt install python3-venv python3-pip zenityFedora
sudo dnf install python3 python3-pip python3-virtualenv zenityArch
sudo pacman -S python python-pip python-virtualenv zenityFor source builds, also install a C toolchain:
- Debian/Ubuntu/Pop!_OS:
build-essential - Fedora:
gcc - Arch:
base-devel
- Download the release archive for your platform.
- Extract it.
- Run:
chmod +x ./install.sh
./install.shThe installer will prompt for your TV IP, MAC address, HDMI input, idle-monitor backend, idle timeout, and screen restore policy, then install the required services. System sleep/wake handling uses the default lifecycle service plus NetworkManager pre-down gate unless you opt out in config.env.
On first use, you may need to accept a pairing prompt on the TV:
https://github.com/chros73/bscpylgtv/blob/master/docs/guides/first_use.md
LG Buddy is mostly automatic after installation.
- To inspect settings, run
lg-buddy settings list - To change supported settings, use
lg-buddy settings set <key> <value> - To inspect TV brightness, run
lg-buddy brightness get - To set TV brightness directly, run
lg-buddy brightness set <0-100> - To inspect the installed runtime version, run
lg-buddy --version - To check GitHub releases on demand, run
lg-buddy updates check; add--notifyto send a desktop notification when an update is available - To rerun full setup for TV IP, MAC address, or HDMI input, run
./configure.sh - To check the screen monitor, run
systemctl --user status LG_Buddy_screen.service - To remove LG Buddy, run
./uninstall.sh
The settings CLI is a structured layer over config.env. These examples write
the same file that manual editing and configure.sh use:
lg-buddy settings describe tv.input
lg-buddy settings set tv.input HDMI_2
lg-buddy settings describe screen.restore_policy
lg-buddy settings set screen.idle_timeout 600
lg-buddy settings set screen.restore_policy aggressive
lg-buddy settings set system.sleep_wake_policy disabled
lg-buddy settings unset screen.restore_policySettings can also be edited directly in config.env:
tvs_primary_ip=192.168.1.100
tvs_primary_mac=aa:bb:cc:dd:ee:ff
tvs_primary_input=HDMI_2
screen_idle_timeout=300
screen_restore_policy=conservative
system_sleep_wake_policy=enabledtv_ip, tv_mac, and input are still accepted as legacy single-TV keys, but
new writes use the tvs_primary_* shape so the storage can grow later without
changing the current single-TV settings interface.
If a direct config.env edit leaves a value malformed, lg-buddy settings list
and describe show it as invalid instead of silently treating it as default or
missing. lg-buddy settings get <key> fails with the validation error so the
bad entry can be fixed with settings set, settings unset when supported, or
by editing config.env.
screen_restore_policy=conservative is the default. LG Buddy only restores when a matching LG Buddy marker says it previously blanked or powered off the TV.
Set screen_restore_policy=aggressive to let session wake/activity and system wake restore the TV even when no LG Buddy marker exists. This is intentionally more aggressive and can turn the TV on in cases where another device or a manual action powered it off.
marker_only is still accepted as a legacy alias for conservative.
system_sleep_wake_policy=enabled is the default. Set
system_sleep_wake_policy=disabled if you do not want LG Buddy to control the
TV around system sleep and wake. The lifecycle service and NetworkManager
pre-down hook stay installed and no-op while the policy is disabled.
- User guide
- Development
- Defaults and configuration
- Runtime event handler map
- Gamepad subsystem
- Contributing
- Release process
- https://github.com/chros73 for
bscpylgtv - https://github.com/JPersson77 for the original inspiration
- https://github.com/Faceless3882 for the original shell script implementation