Reddit Linux_Gaming

Subscribe to Reddit Linux_Gaming feed
A subreddit for discussions and news about gaming on the GNU/Linux family of operating systems (including the Steam Deck).newest submissions : linux_gaming
Updated: 24 min 46 sec ago

Any update on lepton?

23 Apr 2026 - 5:53pm

A few months back we got news that vale was working on a waydroid fork (lepton). I cannot find any news on this compatibility layer. Is it possible to play with it?

submitted by /u/Oxcuridaz
[link] [comments]

Genshin stopped launching through steam deck

23 Apr 2026 - 5:47pm

I've been having an insane amount of trouble adjusting to Linux and I've only managed to get a few things working and I'm met with setbacks. I got an emulator but none of the roms will work for example and it wasn't worth the hassle, then I finally at least got Genshin on the steam deck with everything set up well just yesterday and now cut to today, when I open it up from steam, it loads for 3 seconds and then closes back to steam and none of the solutions I've looked up are making any sense to me whatsoever. I've never been able to play Genshin in such good graphics before and I was looking forward to coming back to the game after half a year away thanks to Lohen's release, I just feel distraught

Maybe I'm just stupid but I don't get it at all, I tried asking a friend but I just get lambasted for wanting things to be simple and made to feel stupid, I also don't feel like getting talked down to for playing Genshin so I have no one to ask but here in hopes that someone can make dumb it down enough for me to understand

submitted by /u/Suitable_Cover_506
[link] [comments]

Games crashing & shutting down PC

23 Apr 2026 - 5:02pm

I'm new to gaming on Linux. All my machines were Linux with the exception of my gaming PC. I recently installed POP OS 24.04 LTS with Cosmic DE on my gaming PC and installed a few games. Counter Strike 2 via Steam works just fine and doesn't seem to have any issues. For a couple Epic games I installed the Heroic Launcher and installed 2 games, Hogwarts Legacy and Jedi Survivor. Both games had no issues installing or getting started and when playing game play and graphics are great. Then about 15-20 minutes into playing my PC shuts off to the point I have to flip the switch on my power supply off and on to get the PC to power back on. I didn't have this type of issue no the same PC with Windows. Can someone tell me how I can troubleshoot this and what logs would be relevant (and where to find them)?

PC Specs:

AMD Ryzen 7 5800X

32GB Memory

NVIDIA RTX-3090

Using a Xbox Wireless Controller via USB cable.

Any help is greatly appreciated. Thank you!

submitted by /u/gmensching
[link] [comments]

Cursor not rendering bug on Rome 2 Total War

23 Apr 2026 - 4:35pm

I recently installed CachyOS on my PC and I have this strange bug when playing rome 2.
The game mouse is there but is invisible. So I can hover above things and see the animation, I can click, but I won't see the mouse.
If I move it rapidly I will see the KDE Plasma mouse rendering (as it makes the cursor bigger the more I move it) but when I stop moving it, it will disappear again.
Also, I noticed that after clicking the mouse will render again by rapid movement only after switching windows.

I tried using previous versions of Proton, I tried deleting the launcher file and renaming the game launching file to be the launcher file name (so that instead of launching the total war launcher, steam would launch the game directly).
Not sure what to do next...
Anyone encountered that problem?

https://reddit.com/link/1stkkja/video/k2zlbox9aywg1/player

submitted by /u/migiborshelima
[link] [comments]

help with genshin impact

23 Apr 2026 - 4:02pm

so i installed the heroic game launcher and ran the official installer exe in that which installed the hoyoverse launcher or something then i again create as a game and ran that launcher and download the whole game then when i am clicking play it closes the launcher and opens a very small white window it shows nothing i tried maximizing it nothing how to fix this?

im in arch

submitted by /u/saptak_maji
[link] [comments]

Grounded freeze in game

23 Apr 2026 - 4:00pm

Hello everyone,

I am playing Grounded fully Yoked edition, from Steam client, on Bazzite, I have a freeze from time to time. If i am solo i doesn't last long and i can continue to play, but when i am in multi with a friend, it's completely frozen and i have to go outside of the game to the desktop and restart the computer. I don't know how to stop a app from running like we do in Windows with Ctrl Alt Del. How to do that with Bazzite ?

my PC : CPU 12700F, GPU 5060Ti 16Go, RAM : 2x16 Go.

Someone know how i can find a log that tell me what happen ?

TY.

submitted by /u/_B1OM4N_
[link] [comments]

Green Screen Rebooting Issue

23 Apr 2026 - 3:50pm

I could use some help. I am new to Linux so please forgive my ignorance. I have tried three distros, CachyOS, Bazzite, and SteamOS and get the same issue with all three. I will be playing a graphics intensive game and the system will green screen and reboot. I am thinking it is an FSR4 issue but I am not sure. What leads me to believe it is this is that the reboots happen in Cuberpunk when I try to force FSR4 and Pragmata when I use FSR because even though it says it uses FSR3, the description of the FSR implemented is for FSR4. The crashes are random, could be 3 minutes could be several hours into a play session.

I have updated the bios on my MB and did fresh installs on everything. I do not have these issues in Windows so I think it isn’t a hardware issue.

Any help or advice would greatly be appreciated, I would like to get away from Microsoft.

My specs are:

CPU: Ryzen 7 5800X3D

GPU: ASRock Challenger 9070XT

MB: ASRock X570 Pro4

RAM: DDR4-3200

NVME: 2x 1TB Gen 4 drives (1 Samsung, 1 Inland)

PSU: Seasonic Prime 750watt

submitted by /u/saintrobyn
[link] [comments]

I improved my SaveManager tool!

23 Apr 2026 - 3:33pm

Following up on my previous posts here

Since the last release I have put a lot of effort into improving the UI, performance and other background things and of course features such as the save editor!

What's new:

  • Save Editor (For GTA SA Classic)
  • Improved performance and a new UI
  • MacOS support (Apple Silicon)
  • A ton of fixes

The full changelog is available on the GitHub page, its noted in the release :)

Github | Codeberg | Download

submitted by /u/MXRCO007
[link] [comments]

Finally got Bazzite fully working on an ASUS ROG Zephyrus G15 GA503QS (Ryzen 9 / RTX 3080) so I wrote a full walkthrough because there's basically no documentation for getting this specific model going with Bazzite

23 Apr 2026 - 3:02pm

Hey r/linux_gaming

I saw a post from about six months ago where someone tried to get an ASUS laptop running on Linux, had a rough time, and gave up. I wanted to share what actually worked for me because I couldn't find anything specific to the GA503QS and had to piece this together myself.

https://preview.redd.it/j0pyva22uxwg1.jpg?width=5712&format=pjpg&auto=webp&s=b51a5493989b5d09daa3c09c047199fd4468d07e

Why I did this: I was completely done with Windows. Every single time I went to use this laptop I had to sit through Windows updating, ASUS updating, NVIDIA updating, AMD updating, Armoury Crate updating, literally everything on the system had its own update cycle. Anytime I wanted to actually use the machine I was looking at an hour or two of updates first. On a gaming laptop. It was insane. That's what pushed me over the edge.

I also basically wanted a Steam box, there isn't a great dedicated one on the market right now and this thing connected to my TV does exactly that.

The hardware:

  • ASUS ROG Zephyrus G15 GA503QS
  • AMD Ryzen 9 5900HS
  • NVIDIA RTX 3080 (laptop, 100W)
  • 15.6" QHD 165Hz IPS display
Step 1: Turn off BitLocker

Windows 11 enables BitLocker by default and it locks the entire drive even if you're not using all of it. You cannot shrink your partition or let Bazzite modify the partition table with BitLocker on. Turn it off in Windows before you do anything else and let it fully decrypt. If you want to duel boot, you'll have to do that and shrink the partition. Duelboot might be smart to test it out, I just jumped in the deep end personally.

Note: I did NOT have to turn off secure boot. Bazzite took care of that for me in their documentation and ended up writing its own keys.

Step 2: Flash Bazzite

Download the bazzite-nvidia-open ISO from bazzite.gg, flash it with Fedora Media Writer, plug it into the laptop.

Step 3: Get into BIOS

Spam F2 repeatedly at the ASUS logo. Set your USB drive as the first boot device. Disable Secure Boot. Save and exit.

Step 4: Install normally

Installer is straightforward. I wiped Windows entirely because I didn't have games I cared about keeping. (Eventually Xbox will have to make a Linux client and then we will have won!). I wiped the whole drive.

Step 5 (IMPORTANT FOR LED BACKLIGHTING AND FAN CONTROL): Rebase to the ASUS-specific image

bazzite-nvidia-open works but it's missing the entire ASUS hardware stack. No asusd, no asusctl, no keyboard backlight on cold boot, no performance profiles, no proper GPU switching. The keyboard backlight sysfs interface exists and you can write values to it all day and nothing happens because without asusd, the embedded controller never gets initialized at boot.

I spent two hours trying to fix this with ChatGPT. Kernel module reloads, kernel arguments, direct sysfs writes, nothing worked. ChatGPT helped me write a detailed prompt which I took to Claude, and Claude had me sorted in about 15 minutes.

The fix is one command:

bash

rpm-ostree rebase ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-asus-nvidia-open:stable

Reboot. Done. asusd starts on boot, keyboard backlight works on cold boot, all the ROG stuff works.

Step 6: Enable GPU switching

bash

systemctl enable --now supergfxd supergfxctl -g # should show Hybrid

Hybrid mode = iGPU drives the display, RTX 3080 only spins up when needed. Battery life is significantly better.

Step 7: Set battery charge limit

bash

asusctl -c 80

80% is the sweet spot for battery longevity. This persists across reboots.

Step 8: Performance profiles

bash

asusctl profile --profile-set Performance # gaming asusctl profile --profile-set Balanced # everyday asusctl profile --profile-set Quiet # battery saver

ROG Control Center is also installed and gives you a GUI for all of this.

How does it actually run?

Genuinely faster than Windows. Not placebo, it is noticeably faster just getting around the system. Zero update interruptions. I open it and it's ready. Steam works great, Proton 11 handles everything I've thrown at it.

Happy to answer questions. If you've got a GA503QS or similar G15 variant and you're thinking about making the jump.

This video was very helpful in getting it going, but wasn't specific to this laptop: https://youtu.be/lBqbk6Z8HrQ?si=dWCs6A5S9I5QWa_a

TLDR; it works, it works well, just make sure you end up on bazzite-asus-nvidia-open and not the generic image.

submitted by /u/hankypinky
[link] [comments]

Possible to run pre/post launch script in Faugus?

23 Apr 2026 - 2:58pm

I like the lightweight and simple feel of faugus compared to both lutris and heroic. But one thing I'm missing is the ability to run pre/post launch scripts as I use this to dl/ul my game save files using my dropbox like a form of cloud saving.

I'm wondering if I'm just blind and can't find this option in faugus or is it just not possible? Might be putting in a feature request if needed.

submitted by /u/MVindis
[link] [comments]

Intel CPU games freezing bug or slowdown to unplayable fps - split_lock_mitigate is the reason

23 Apr 2026 - 2:06pm

I saw multiple thread with weird freezes or unplayable fps - only with Intel CPU. And somehow turning off split lock fixes it.

If you on Intel CPU - maybe it is also the case for you.

To turn off split lock only for this boot - run in terminal:

sudo sysctl -w kernel.split_lock_mitigate=0

if it helped - permanent fix

echo "kernel.split_lock_mitigate=0" | sudo tee /etc/sysctl.d/50-split-lock.conf

sudo sysctl -p /etc/sysctl.d/50-split-lock.conf

fix from https://www.reddit.com/r/linux_gaming/comments/1sc5rlm/gaming_performance_split_lock_mitigate/

submitted by /u/S48GS
[link] [comments]

Best way to use Xcloud on Linux?

23 Apr 2026 - 1:10pm

So I got a redeem code for one month of xbox game pass Ultimate edition, and wanted to know if I can use it on my igpu laptop to play maybe 1-2 AAA games using cloud option.

I use EndeavourOS (with Cachy Os kernel) with hyprland. I also have a Gamesir G7 pro ZZZ edition controller.

submitted by /u/DAISIES_BLOOM
[link] [comments]

Xbox App and Gamepass on linux

23 Apr 2026 - 12:31pm

Hi I've always used windows 11 on my main pc for gaming/streaming and windows 10 on my laptop but I want to change to Linux because it's lighter and use less resources from my pc and most important no Telemetry and data collection (I've installed Linux before on my old laptop but I always return to windows cause of my Game pass PC subscription and Xbox app which offers cheaper prices than steam in Egypt)

currently I will install bazzite on my old laptop and tweak with it to try and run Xbox app based on your suggestions

I can't run cloud gaming cause of my internet monthly quota is 300GB/month and my internet speed won't give me a smooth experience so I'm looking for a more offline experience

I don't play games with kernel anti cheat so those games don't matter (for now)

submitted by /u/Majek093
[link] [comments]

Gaming with 4gb gpu

23 Apr 2026 - 12:27pm

Is it worth it to go to CachyOS from Mint considering the recent optimization for low vram gpus?

Specs:

OS: Linux Mint 22.3 XFCE

CPU: AMD Fx-4100

RAM: 8gb (2x4) DDR3

GPU: TUF GTX 1650

submitted by /u/Betonsarkany
[link] [comments]

DJI Studio on bazzite

23 Apr 2026 - 12:17pm

Cześć wczoraj próbowałem zainstalować na bazzite DJI studio i tak naprawdę się udało ale niestety po uruchomieniu widzę gui ale po jakiś 10 sekundach aplikacja się wyłącza. Czy macie może jakieś sugestie w jaki sposób mogę zobaczyć jaki jest powód crushowania się aplikacji?

submitted by /u/KeyCloud4660
[link] [comments]

Dragon Age Origins has no Dialogue

23 Apr 2026 - 11:01am

Hello! I am trying to set up Dragon Age Origins through Lutris and I am pulling my hair at a problem I can not solve. The game launches but I can hear no dialogue at all, all other sound works perfectly.

I have tried all the different runners, I have tried 32 and 64 bit. I have tried with and without xact, installing directx, removing libraries. It does not work through steam either. I have reset my wine prefix more times than I can count.

At this point I really do not know what to try. I have searched online but most people have either full audio or none, my problem is only with voices.

Any help is appreciated.

submitted by /u/Drexxl-the-Walrus
[link] [comments]

Monitor Screen Looks Blurry but not when HDR is Enabled.

23 Apr 2026 - 10:02am

As the title says if I disable HDR the Monitor Screen Looks Blurry, I tried scaling to 100% but it stills the same, the thing is I have a second monitor and it appears fine there, the monitor I have a issue with is a Samsung G60SD.

I'm using Fedora 43 KDE with Wayland.

Also I don't know if I should just leave HDR enabled all the time because on windows is generally not recommended,

Any help is appreciated.

submitted by /u/Alex_1_7
[link] [comments]

Automatic LG TV Power Control on Linux HTPC (No HDMI-CEC, No Windows)

23 Apr 2026 - 9:37am

Platform: CachyOS Handheld / Gamescope / Steam Big Picture
Goal: TV turns on/off automatiPlatform: CachyOS Handheld / Gamescope / Steam Big Picture
Goal: TV turns on/off automatically with the PC, Denon AVR switches to correct input, 8BitDo controller can be safely turned off during suspend without waking the system.

The Problem

Laptops and handhelds don't support HDMI-CEC output only TVs and dedicated HTPC hardware typically do. So you can't just rely on the TV to follow the PC's power state. My previous setup was a janky chain:

  • On wake: wait for network → ping Home Assistant → HA triggers automation → Apple TV turns on → LG TV turns on via HDMI-CEC from Apple TV → Denon switches input
  • On sleep: send HA event to notify of sleep

This took 20+ seconds before the PC's image appeared on screen, was fragile, and broke constantly.

Additionally, my 8BitDo Ultimate 2C controller (USB dongle) would wake the system when turned off because it sends a USB signal during shutdown — requiring a cooldown window before suspend.

The Solution

LG Buddy a set of systemd services using bscpylgtv to talk directly to the LG WebOS API over the network. No HA, no Apple TV in the chain.

Combined with: - Direct Denon AVR control via TCP/port 23 - USB driver unbind trick for the controller cooldown window

Prerequisites

sudo pacman -S python python-pip wakeonlan

Install LG Buddy: git clone https://github.com/Faceless3882/LG_Buddy cd LG_Buddy chmod +x install.sh ./install.sh

Run configure.sh to set your TV's IP, MAC address, and HDMI input. On first use, accept the pairing prompt on your LG TV.

How LG Buddy Works

Three systemd services handle everything:

Service Trigger Action LG_Buddy.service Boot/Shutdown TV on at boot, off at shutdown LG_Buddy_sleep.service Pre-suspend TV off, writes state file LG_Buddy_wake.service Post-resume Reads state file, WOL → TV on, switches HDMI input

The state file (/run/lg_buddy/screen_off_by_us) is the key on sleep it records that we turned the TV off. On wake, if the file exists it restores the TV; if not (TV was already off or on a different input), it skips. Smart behaviour that prevents randomly turning the TV on when you weren't watching.

Gamescope / swayidle note

LG Buddy includes a screen idle service using swayidle. This does not work in gamescope - gamescope doesn't implement the ext-idle-notify-v1 Wayland protocol. Disable it:

systemctl --user disable --now LG_Buddy_screen.service

The sleep/wake services work perfectly fine in gamescope since they're system-level and don't depend on the compositor.

The Network Problem on Sleep

LG Buddy's sleep service has After=network-online.target but on WiFi, NetworkManager tears down the connection during suspend preparation — often before LG_Buddy_sleep can open a WebSocket to the TV. Fix this by explicitly ordering LG_Buddy_sleep before NetworkManager's sleep hook:

/etc/systemd/system/LG_Buddy_sleep.service: ```ini [Unit] Description=Turn off LG TV before sleep Before=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target Before=systemd-suspend.service systemd-hibernate.service systemd-hybrid-sleep.service systemd-suspend-then-hibernate.service Before=NetworkManager-sleep.service Before=delay-suspend.service After=network-online.target Wants=network-online.target

[Service] Type=oneshot ExecStart=/usr/bin/LG_Buddy_sleep_pre TimeoutStartSec=60

[Install] WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target ```

The Before=delay-suspend.service line is explained in the next section.

Controller Cooldown: Preventing Wake-on-Shutdown

The 8BitDo Ultimate 2C sends a USB signal when powered off. If the system is in the process of suspending or already suspended, this signal wakes it back up.

The fix: unbind the USB drivers for the controller before suspend, giving a 20-second window to physically turn it off. udev automatically rebinds on wake.

/usr/local/bin/delay-suspend.sh: ```bash

!/usr/bin/env bash

set -u VID=2dc8 PID=310a WAIT=20 ints=() drvs=() for d in /sys/bus/usb/devices/; do [[ -f "$d/idVendor" && -f "$d/idProduct" ]] || continue [[ "$(cat "$d/idVendor")" == "$VID" && "$(cat "$d/idProduct")" == "$PID" ]] || continue for i in "$d":; do [[ -L "$i/driver" ]] || continue ints+=("$(basename "$i")") drvs+=("$(basename "$(readlink -f "$i/driver")")") done done for n in "${!ints[@]}"; do path="/sys/bus/usb/drivers/${drvs[$n]}/unbind" [[ -w "$path" ]] || continue printf '%s' "${ints[$n]}" > "$path" 2>/dev/null || true done sleep "$WAIT" exit 0 ```

Note: no rebind at the end — udev handles that on wake. If you rebind before suspend the controller is active again and defeats the purpose.

/etc/systemd/system/delay-suspend.service: ```ini [Unit] Description=Delay suspend 20s to let controller shut off first Before=sleep.target suspend.target

[Service] Type=oneshot ExecStart=/usr/local/bin/delay-suspend.sh

[Install] WantedBy=sleep.target suspend.target ```

Why LG_Buddy_sleep must run BEFORE delay-suspend

This is the critical ordering insight. delay-suspend takes 20 seconds. On WiFi, NetworkManager drops the connection within those 20 seconds. If LG_Buddy_sleep runs after delay-suspend, the network is already gone and it can't reach the TV — the state file never gets written — and on wake the TV never turns back on.

Correct suspend sequence: 1. LG_Buddy_sleep — network still up, turns TV off, writes state file (~5s) 2. delay-suspend — unbinds controller, 20s cooldown window 3. NetworkManager kills WiFi 4. System suspends

Enforced via Before=delay-suspend.service in LG_Buddy_sleep.service.

Denon AVR Input Switching

When the LG TV powers on, HDMI-CEC signals the Denon to switch to Apple TV input and turns Apple TV on. We need to override this with the correct PC input (GAME in my case) after everything settles.

Denon receivers support direct TCP control on port 23 using their AVR protocol. The HTTP API on newer firmware returns 403, but the telnet interface still works

Test it: python python3 -c " import socket, time s = socket.socket() s.connect(('YOUR_DENON_IP', 23)) s.send(b'SIGAME\r') time.sleep(0.5) print(s.recv(1024)) s.close() "

Common input command strings: SIGAME, SIMPLAY, SIBD, SICBL/SAT, SIDVD, SIAUX1

/usr/local/bin/on-wake.sh: ```bash

!/bin/bash Rebind controller immediately on wake

VID=2dc8 PID=310a for d in /sys/bus/usb/devices/; do [[ -f "$d/idVendor" && -f "$d/idProduct" ]] || continue [[ "$(cat "$d/idVendor")" == "$VID" && "$(cat "$d/idProduct")" == "$PID" ]] || continue for i in "$d":; do [[ -L "$i/driver" ]] && continue int=$(basename "$i") for drv in xpad usbhid; do path="/sys/bus/usb/drivers/$drv/bind" [[ -w "$path" ]] || continue echo "$int" > "$path" 2>/dev/null || true done done done

Wait for Apple TV CEC handshake to complete, then override Denon input

sleep 15 python3 -c " import socket, time s = socket.socket() s.settimeout(5) try: s.connect(('YOUR_DENON_IP', 23)) s.send(b'SIGAME\r') time.sleep(0.5) finally: s.close() " ```

Wire it into the wake service by adding to /etc/systemd/system/LG_Buddy_wake.service under [Service]: ini ExecStartPost=/usr/local/bin/on-wake.sh

The 15-second wait is to let Apple TV fully assert CEC control over Denon, then we send one clean override. Tune this value to your Apple TV's boot speed.

Final Suspend/Wake Flow

Suspend (hit power in Steam Big Picture): 1. Gamescope kills display — screen goes black 2. LG_Buddy_sleep: TV off via WebOS API, state file written 3. delay-suspend: controller input unbound — 20s to physically power off controller 4. NetworkManager drops WiFi 5. System suspends

Wake (press any button / power): 1. WiFi reconnects (nm-online) 2. LG_Buddy_wake: WOL packet → TV on → HDMI input switched 3. on-wake.sh: controller drivers rebound immediately 4. 15s wait → Denon switches to GAME input (overrides Apple TV CEC)

Reload After Any Changes

sudo systemctl daemon-reload

cally with the PC, Denon AVR switches to correct input, 8BitDo controller can be safely turned off during suspend without waking the system.

The Problem

Laptops and handhelds don't support HDMI-CEC output only TVs and dedicated HTPC hardware typically do. So you can't just rely on the TV to follow the PC's power state. My previous setup was a janky chain:

  • On wake: wait for network → ping Home Assistant → HA triggers automation → Apple TV turns on → LG TV turns on via HDMI-CEC from Apple TV → Denon switches input
  • On sleep: send HA event to notify of sleep

This took 20+ seconds before the PC's image appeared on screen, was fragile, and broke constantly.

Additionally, my 8BitDo Ultimate 2C controller (USB dongle) would wake the system when turned off because it sends a USB signal during shutdown — requiring a cooldown window before suspend.

The Solution

LG Buddy a set of systemd services using bscpylgtv to talk directly to the LG WebOS API over the network. No HA, no Apple TV in the chain.

Combined with: - Direct Denon AVR control via TCP/port 23 - USB driver unbind trick for the controller cooldown window

Prerequisites

sudo pacman -S python python-pip wakeonlan

Install LG Buddy: git clone https://github.com/Faceless3882/LG_Buddy cd LG_Buddy chmod +x install.sh ./install.sh

Run configure.sh to set your TV's IP, MAC address, and HDMI input. On first use, accept the pairing prompt on your LG TV.

How LG Buddy Works

Three systemd services handle everything:

Service Trigger Action LG_Buddy.service Boot/Shutdown TV on at boot, off at shutdown LG_Buddy_sleep.service Pre-suspend TV off, writes state file LG_Buddy_wake.service Post-resume Reads state file, WOL → TV on, switches HDMI input

The state file (/run/lg_buddy/screen_off_by_us) is the key on sleep it records that we turned the TV off. On wake, if the file exists it restores the TV; if not (TV was already off or on a different input), it skips. Smart behaviour that prevents randomly turning the TV on when you weren't watching.

Gamescope / swayidle note

LG Buddy includes a screen idle service using swayidle. This does not work in gamescope - gamescope doesn't implement the ext-idle-notify-v1 Wayland protocol. Disable it:

systemctl --user disable --now LG_Buddy_screen.service

The sleep/wake services work perfectly fine in gamescope since they're system-level and don't depend on the compositor.

The Network Problem on Sleep

LG Buddy's sleep service has After=network-online.target but on WiFi, NetworkManager tears down the connection during suspend preparation — often before LG_Buddy_sleep can open a WebSocket to the TV. Fix this by explicitly ordering LG_Buddy_sleep before NetworkManager's sleep hook:

/etc/systemd/system/LG_Buddy_sleep.service: ```ini [Unit] Description=Turn off LG TV before sleep Before=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target Before=systemd-suspend.service systemd-hibernate.service systemd-hybrid-sleep.service systemd-suspend-then-hibernate.service Before=NetworkManager-sleep.service Before=delay-suspend.service After=network-online.target Wants=network-online.target

[Service] Type=oneshot ExecStart=/usr/bin/LG_Buddy_sleep_pre TimeoutStartSec=60

[Install] WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target ```

The Before=delay-suspend.service line is explained in the next section.

Controller Cooldown: Preventing Wake-on-Shutdown

The 8BitDo Ultimate 2C sends a USB signal when powered off. If the system is in the process of suspending or already suspended, this signal wakes it back up.

The fix: unbind the USB drivers for the controller before suspend, giving a 20-second window to physically turn it off. udev automatically rebinds on wake.

/usr/local/bin/delay-suspend.sh: ```bash

!/usr/bin/env bash

set -u VID=2dc8 PID=310a WAIT=20 ints=() drvs=() for d in /sys/bus/usb/devices/; do [[ -f "$d/idVendor" && -f "$d/idProduct" ]] || continue [[ "$(cat "$d/idVendor")" == "$VID" && "$(cat "$d/idProduct")" == "$PID" ]] || continue for i in "$d":; do [[ -L "$i/driver" ]] || continue ints+=("$(basename "$i")") drvs+=("$(basename "$(readlink -f "$i/driver")")") done done for n in "${!ints[@]}"; do path="/sys/bus/usb/drivers/${drvs[$n]}/unbind" [[ -w "$path" ]] || continue printf '%s' "${ints[$n]}" > "$path" 2>/dev/null || true done sleep "$WAIT" exit 0 ```

Note: no rebind at the end — udev handles that on wake. If you rebind before suspend the controller is active again and defeats the purpose.

/etc/systemd/system/delay-suspend.service: ```ini [Unit] Description=Delay suspend 20s to let controller shut off first Before=sleep.target suspend.target

[Service] Type=oneshot ExecStart=/usr/local/bin/delay-suspend.sh

[Install] WantedBy=sleep.target suspend.target ```

Why LG_Buddy_sleep must run BEFORE delay-suspend

This is the critical ordering insight. delay-suspend takes 20 seconds. On WiFi, NetworkManager drops the connection within those 20 seconds. If LG_Buddy_sleep runs after delay-suspend, the network is already gone and it can't reach the TV — the state file never gets written — and on wake the TV never turns back on.

Correct suspend sequence: 1. LG_Buddy_sleep — network still up, turns TV off, writes state file (~5s) 2. delay-suspend — unbinds controller, 20s cooldown window 3. NetworkManager kills WiFi 4. System suspends

Enforced via Before=delay-suspend.service in LG_Buddy_sleep.service.

Denon AVR Input Switching

When the LG TV powers on, HDMI-CEC signals the Denon to switch to Apple TV input and turns Apple TV on. We need to override this with the correct PC input (GAME in my case) after everything settles.

Denon receivers support direct TCP control on port 23 using their AVR protocol. The HTTP API on newer firmware returns 403, but the telnet interface still works

Test it: python python3 -c " import socket, time s = socket.socket() s.connect(('YOUR_DENON_IP', 23)) s.send(b'SIGAME\r') time.sleep(0.5) print(s.recv(1024)) s.close() "

Common input command strings: SIGAME, SIMPLAY, SIBD, SICBL/SAT, SIDVD, SIAUX1

/usr/local/bin/on-wake.sh: ```bash

!/bin/bash Rebind controller immediately on wake

VID=2dc8 PID=310a for d in /sys/bus/usb/devices/; do [[ -f "$d/idVendor" && -f "$d/idProduct" ]] || continue [[ "$(cat "$d/idVendor")" == "$VID" && "$(cat "$d/idProduct")" == "$PID" ]] || continue for i in "$d":; do [[ -L "$i/driver" ]] && continue int=$(basename "$i") for drv in xpad usbhid; do path="/sys/bus/usb/drivers/$drv/bind" [[ -w "$path" ]] || continue echo "$int" > "$path" 2>/dev/null || true done done done

Wait for Apple TV CEC handshake to complete, then override Denon input

sleep 15 python3 -c " import socket, time s = socket.socket() s.settimeout(5) try: s.connect(('YOUR_DENON_IP', 23)) s.send(b'SIGAME\r') time.sleep(0.5) finally: s.close() " ```

Wire it into the wake service by adding to /etc/systemd/system/LG_Buddy_wake.service under [Service]: ini ExecStartPost=/usr/local/bin/on-wake.sh

The 15-second wait is to let Apple TV fully assert CEC control over Denon, then we send one clean override. Tune this value to your Apple TV's boot speed.

Final Suspend/Wake Flow

Suspend (hit power in Steam Big Picture): 1. Gamescope kills display — screen goes black 2. LG_Buddy_sleep: TV off via WebOS API, state file written 3. delay-suspend: controller input unbound — 20s to physically power off controller 4. NetworkManager drops WiFi 5. System suspends

Wake (press any button / power): 1. WiFi reconnects (nm-online) 2. LG_Buddy_wake: WOL packet → TV on → HDMI input switched 3. on-wake.sh: controller drivers rebound immediately 4. 15s wait → Denon switches to GAME input (overrides Apple TV CEC)

Reload After Any Changes

sudo systemctl daemon-reload

submitted by /u/Tall_Researcher3088
[link] [comments]

Pages