Repository navigation
Feature: Restrict power off to a specific HDMI input (REQUIRED_APP) - #15
Conversation
|
Thanks for this, and for explaining the use case, it makes the motivation clear. Switching between a desktop and a work laptop on the same TV is exactly the scenario the current code handles badly, and I've had "skip TV-off when the TV is on another input" on my own maybe-list for a while. Nice to see it actually implemented. No issue at all with AI-assisted work; the diff is small and readable, which is what matters. A few things before this can land. It needs to target Review notes:
If you'd like to take this the rest of the way, rebase onto |
|
Thanks for the detailed review and recommendations! I've addressed points 1, 2, 5 and 6, rebased onto testing, and tested on my setup (lgpowercontrol on cachyos on hdmi2, work laptop on hdmi1). Changes made:
Tests I ran:
On point 3 (extra round-trip):I considered combining the On point 4 (unguarded ON path):In my setup, both the CachyOS desktop and work laptop are connected to the TV via HDMI, but I don't use I agree the issue would exist for users who configure both IMO, if my monitor is asleep and I use my work mouse to wake, I would like the monitor to stay on the work laptop input. But if I use the lgpowercontrol connected mouse to wake, the screen should switch to the lgpowercontrol input. I might be missing something here though so would love some feedback. |
|
Merged into Since the guard is off by default ( Point 3, the extra round-trip. Still mine to measure. Your reasoning for not Point 4, the ON path. Your explanation is exactly right, and I found the So the counterpart isn't a guard on all of On your instinct about which mouse wakes it, I think you already get most of One thing I'll add separately: the config value isn't validated, so Thanks again, this was a genuinely useful contribution. |
The guard from #15 kept suspend from turning off a TV that was showing another source, but the wake path still ran set_input and grabbed it back, so the two halves worked against each other on any setup that also had HDMI_INPUT set. POWER_OFF_ONLY_ON_HDMI now overrides HDMI_INPUT rather than growing a second guard. Deciding per wake who owns the input would need another round-trip plus a rule for the case where we woke the TV ourselves, and nothing was asked for it - the contributor's own setup leaves HDMI_INPUT empty, so this is the arrangement the feature was actually tested against. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
I switch between my home PC and my work laptop frequently during the day. On Windows, I used to use LGTVCompanion and it had a way to only send commands to the TV when we were on a specific hdmi port which I found really useful. Using lgpowercontrol, I would switch away from cachyOS and while on my work laptop, the screen would go blank. I have been testing this implementation for a few days and it seems to work fine. Full disclosure, I used AI to help me make the change but the change is pretty minimal and easy to understand.