Skip to content

Screen saver

CleanYourTV replaces LG's screen saver with its own page: the same pictures as behind Home (the theme's scenes, your photos from the wallpaper library or the theme's wallpaper), cross-faded, with the clock and date in the corner. It appears when the TV is idle, when LG's screen saver would have (see When it appears).

It is off until you switch it on: in the manager app, Features → Screen saver (the TV restarts). A new install and an update keep LG's screen saver.

It is applied the same way as Home (RAM only): a reboot without the boot scripts, or the Homebrew Channel's failsafe mode, brings LG's screen saver back.

What it shows

  • What Home has behind it, worked out in Home's own order, changed every 25 seconds (a new photo starts when the page opens):
    1. the theme's scenes: the five landscapes of the couch scenes (or an add-on's scenes in their place, such as Seasons, with their credit line), or a theme's own scenes;
    2. else, with Wallpapers on, the wallpaper library: uploads from the phone, the photos of a source add-on (Immich), and a live source (Unsplash: the photo Home shows now, with the photographer's name; the saver does not ask the source for another, which would make Home skip one; right after the service starts, the photo the saver fetched first is the one Home gets next; with only a live source the page looks again every 25 seconds and follows Home when its photo changes);
    3. else the theme's wallpaper.
  • The clock and the date, bottom right, solid white over the photo: no transparency, so it stays readable on a bright picture. It sits in the same corner all the time, which is the one thing to watch on a panel that retains static content.
  • Nothing behind Home (a plain theme, Wallpapers off): the clock and date alone, on black.

The first key, click or touch closes it and the app that was on screen comes back. Nothing is saved or uploaded.

How it replaces LG's screen saver

The same idea as for Home, on the app the TV starts when it is idle: com.webos.app.screensaver. Nothing happens while the switch is off (no SCREENSAVER-ON).

  1. At boot, 10-cleanyourtv-home takes over Home with its folder mount and restarts the app manager so that it reads it. Just before that restart, it calls 20-cleanyourtv-screensaver prepare, which mounts the screen saver's folder over /usr/palm/applications/com.webos.app.screensaver: the one restart reads both.
  2. The folder holds the page and an appinfo.json derived from this TV's own screen saver (saved in backup/screensaver-appinfo.orig.json the first time), switched to the web type while it keeps this TV's own window type (screenSaver, which is the only one tvpowerd counts, see When it appears). The app id stays LG's, which is why the TV keeps asking for it. The folder is built on every run, also while it is already mounted, so a setup over a running install puts the new page in place (as 10-cleanyourtv-home does for Home).
  3. The page runs as LG's screen saver app, so the TV treats it as its screen saver, and closing it gives the app that was underneath back instead of going to Home (that was seen with the earlier overlay manifest, see Limits).

Which TVs

This version replaces the screen saver only in the way that was tried on a TV (an LG 65UR91006LB, webOS 25, whose Home and screen saver are Flutter apps): where the Home takeover is the folder mount, with its app manager rescan or restart. In the manager, Screen saver reads "not available on this TV yet" elsewhere, and those TVs keep LG's screen saver:

  • LG's Home is a native program (webOS 5 to 23, Home taken over by the stand-in): there is no app manager restart at boot to read the screen saver's folder. A restart of its own would take down the launcher's page in webapp-mgr, and a folder mounted without a restart would leave the TV with no screen saver at all, so nothing is mounted.
  • LG's screen saver is a native program (helper/tvprofile.js saverTakeover is none): not replaced.

Both could come in a later version, once they have been tried on such a TV.

When it appears

tvpowerd starts it after the TV's idle timeout (two minutes, com.webos.surfacemanager.userActivityTimeout) and starts it again after each dismissal, as LG's own saver does — provided the window type is LG's own. With defaultWindowType: "overlay" it started the page once and then stayed at Screen Saver Ready for good; with "screenSaver" (inherited from the stock manifest, see scripts/jtool.js) it re-arms. Three timed cycles on the tested TV: 61 s, 112 s, 61 s.

The service keeps a second, slower timer as a fallback (helper/screensaver.js): two quiet minutes with the launcher in front and it opens the page itself. It covered one of those three cycles, where tvpowerd did not fire. "Quiet" is the launcher's own word: its page reports every key, click and pointer movement to the service (POST /api/screensaver/active), and the timer only fires when no report has come for two minutes — a TV being browsed with the remote is Home in front all evening, and only tvpowerd's timer knows about that. A launcher that reports nothing (LG's Home in front, a launcher from before this) is left to tvpowerd.

The limit that follows: over a video app the service cannot tell an idle TV from a watched one, so there the saver comes only from tvpowerd.

The page ignores keys for its first two seconds: webOS delivers a key with the launch, and without that guard the page closed itself right after opening.

While it runs

  • The page asks the service for the photos (GET /api/screensaver/photos, which also returns lang, the CleanYourTV language setting: the date on the clock follows it, and with Language follows the TV it is empty and the TV's own language is used) and closes itself through the service (POST /api/screensaver/dismiss). The service closes the page with com.palm.webappmanager/killApp and the app manager's closeByAppId, each tried on its own, which is what works where window.close() does nothing.
  • If the system ends the screen saver by itself (the TV is back on an app) and the page is still listed, the service closes it within about a minute. A page left behind would keep the remote.

Turning it off and on

It is off by default. In the manager app: Features → Screen saver or CleanYourTV as Home → Screen saver, On or Off. Switching restarts the TV, as that switch does for Home; after the restart the screen saver is ours or LG's. The row under Features also says which one runs now: ours or LG's own.

The same thing from a shell on the TV — LG's own screen saver back, and the TV restarts:

sh /media/developer/cleanyourtv/undo-screensaver.sh

Add --no-reboot to switch it off for the next restart only.

CleanYourTV's screen saver again (the next restart):

touch /media/developer/cleanyourtv/SCREENSAVER-ON

The setting is the file SCREENSAVER-ON in /media/developer/cleanyourtv: present means ours, absent (the default) means LG's.

Limits

Power-off stalled on the first TV, then was fixed

On the LG 65UR91006LB (2026-10-31) turning the TV off while the page was up stalled: the picture stayed frozen for a few minutes before the TV went off. The page had no standby handling, and the service had closed it with killApp while tvpowerd owned it. The page now closes itself on visibilitychange (standby, another app on top), and with that in place a power-off with the saver on screen went cleanly (verified on the same TV). The killApp path on dismissal is still there, so treat this as "fixed once, watch it".

What was verified on that TV

LG's screen saver is a Flutter app started by tvpowerd: after the mount and one app manager restart, sam reports type: web, main: index.html; tvpowerd starts the page after the idle timeout (caller_id: com.webos.service.tvpower), with the window type of the manifest, and the first key closes it and gives the launcher back. Without the app manager restart the registry keeps type: flutter and nothing appears — the restart is what makes the mount take effect. The rescan of rescan-home.sh (a moment of another UI language) reads every app folder the same way; with the screen saver it is not yet verified on a TV.

The launch showed a grey "loading" screen with a spinner for a second, like any web app: the derived manifest now sets noSplashOnLaunch: true and spinnerOnLaunch: false, so the page's own black background is what appears. (Not yet seen on the TV.)

  • While the page is up the power state stays Active with processing: "Screen Saver Ready"; that is why the service treats it as the screen saver and leaves it alone (a page that was closed every minute by its own safety check was the first bug found on the TV). The safety close rests on that one string of LG's, seen on the tested TV: a build that reports Active with another processing while the page is up would see the page closed and opened again. To keep one odd reading from doing that, the service closes the page only after a minute and at two readings in a row (10 seconds apart) without "Screen Saver" in processing.
  • The page keeps LG's screenSaver window type: that is what makes tvpowerd arm it again after a dismissal (with overlay it started once and then stayed at Screen Saver Ready, see When it appears).
  • "Closing it gives the app underneath back" was seen with the earlier overlay manifest, where the first key closed the page and gave the launcher back. With LG's own window type that is worth one look on a TV with a video app behind the saver.
  • If the page does not open where its folder is mounted, the TV stays on the app it was showing: the screen stays on rather than turning black.
  • LG's Screen Saver setting (Clock, Gallery, Photo) still exists and is untouched; only the app it starts is replaced.
  • The TV's own sleep and power-off timers are untouched.
  • Photos are streamed from the service on 127.0.0.1, so they are as fast as the wallpaper library behind Home.