Skip to content

add keep_screen_on feature to orbic devices#919

Open
PapiJalopy wants to merge 4 commits intoEFForg:mainfrom
PapiJalopy:orbic-keep-screen-on
Open

add keep_screen_on feature to orbic devices#919
PapiJalopy wants to merge 4 commits intoEFForg:mainfrom
PapiJalopy:orbic-keep-screen-on

Conversation

@PapiJalopy
Copy link
Copy Markdown

@PapiJalopy PapiJalopy commented Feb 21, 2026

Summery

Adds a toggleable keep-screen-on feature that prevents the device display from sleeping. When enabled the daemon detects when the display has entered its sleep state and re-enables it by toggling display sysfs nodes.

Addresses #916 #539

Changes

Adds a toggle in the web UI,

Adds keep_screen_on: bool to config (default is false).

Adds a checkbox and tip to the configuration page.

When keep_screen_on is enabled, spawns a watchdog task that, polls display sysfs state (sleep_mode, bl_gpio, display_on).

If display is blanked (sleep_mode == 0 and bl_gpio == 0), writes 1 to display_on, bl_gpio, andsleep_mode.

No behavior change unless the option is enabled

Documents the new config option in the config.toml.in template and the configuration docs.

Testing

Verified source builds.

Verified binary installs.

Verified toggle is visible in web UI.

With keep_screen_on = true, the screen no longer stays blanked after the normal timeout.

With keep_screen_on = false, behavior matches current upstream behavior.

Pull Request Checklist

  • The Rayhunter team has recently expressed interest in reviewing a PR for this.
    • If not, this PR may be closed due our limited resources and need to prioritize how we spend them.
  • Added or updated any documentation as needed to support the changes in this PR.
  • Code has been linted and run through cargo fmt.
  • If any new functionality has been added, unit tests were also added.
  • CONTRIBUTING.md has been read.

…_screen_on enabled

While keep_screen_on is enabled, force /sys/power/autosleep to "off" and restore "mem" when disabled.
On battery power the device enters rapid suspend/resume cycles, causing the display to visually "blink".
untitaker
untitaker previously approved these changes Mar 29, 2026
Copy link
Copy Markdown
Collaborator

@untitaker untitaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want this feature I think the code is clean. Seems like if the feature won't work the code is still sufficiently isolated from the rest to make this safe to roll out.

Disabling it fixed a bug where the display colors become corrupted when spamming the on/off button.
This is not needed anyways because from monitoring the node I've never seen it change anyways.
@cooperq
Copy link
Copy Markdown
Collaborator

cooperq commented Apr 17, 2026

I'm hesitant to merge this for a couple reasons:

  1. it adds a lot of code and therefore complexity for a relatively minor feature which could be better solved by notifications and wifi client mode so people don't need cellular plans.
  2. It's orbic only meaning we won't have feature parity for other devices.
  3. If left on when the device was unplugged this feature could inadvertently cause users to quickly blow through battery life.

Given these hesitations I'm inclined to close this pull request unless a good case is made for merging it.

@cooperq cooperq self-assigned this Apr 17, 2026
@PapiJalopy
Copy link
Copy Markdown
Author

PapiJalopy commented Apr 18, 2026

Its literally just a toggle that starts a watchdog that monitors 3 sysfs nodes and writes "1" to them if it sees that they have been set to "0". I'm not sure I agree that its complicated.

Me personally I find it useful when paired with my other pull request regarding the severity PNG's. It allows the custom images to always be visible.

@PapiJalopy
Copy link
Copy Markdown
Author

I get the hesitation, but I think this is a little more useful than it may sound on paper.

It is basically just a toggle that starts a small watchdog loop watching a couple sysfs nodes and restoring them if the device turns the display back off. So even though it touches low level stuff, the actual logic is pretty small and self contained.

As for the use case, for me this is mainly about visibility. It is useful with the severity image work, but even outside of that it is helpful any time the device is being used as a dedicated display and the person wants to keep the current state visible without having to constantly wake the screen back up.

On the Orbic only point, I agree it is device specific, but I dont really see that as a blocker by itself. We already have Orbic specific behavior in other places where the hardware exposes capabilities that other devices dont. I wasnt trying to make a cross-device feature here, just expose something the Orbic can already do in a way that is useful.

On battery life, I agree that is the biggest tradeoff, which is why I made it an explicit toggle rather than default behavior. If it helps, I can make that clearer in the UI/config description so people understand that enabling it may increase battery usage if left on while unplugged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants