Keep screen on, prevent screensaver/blackout

I created a web page that refreshes every hour, I want to display it on my LG TV. I want to to try to keep screen awake, I don’t want the screensaver to come on. It does so in 45 minutes even though all energy saver settings are off. It’s ok burn-in happens I’ll just get another TV after a year. The way I tried to keep screen open is with:

const lock = await navigator.wakeLock.request('screen');

However this just hangs forever and never resolves. And the screensaver comes on in 45min. Any ideas on how to work around this? I tried playing a muted video but same situation.

I think I did something weird with video playing and after 45min screensaver didn’t come on, but after the page refresh after 1 hour, and then 2 min afterwards, the screen went black.

Any ideas?

2 Likes

For users, there is a Screen Saver option in Settings > General > Screen saver on/off, but this option is not provided on the OLED TVs. In the OLED TVs, Screen Saver always works except while playing a video in the full screen mode. Thank you.

Thank you, I got the " LG 55UQ7570 55" Class (54.5" Diag.) 4K Ultra HD Smart LED TV" - this is an LED TV.

So shouldn’t the const lock = await navigator.wakeLock.request('screen'); work? Is there a way you can help me fix it?

If Screen Saver is on, it always works except while playing a video in the full screen mode. If your TV has the option, just turn it off. Thank you.

I understand that, I’ve turned it off. But how can I use web api to make it think it’s playing a full screen video? navigator.wakeLock.request('screen') is not supposed to hang forever, this is not how its documented. The API is supposed to resolve or reject that promise - WakeLock - Web APIs | MDN

1 Like

If you turned it off, why are you trying to use the wakeLock? Do you mean that Screen Saver works even if the option is off?

Yep correct on the second part. I turned the options off on energy saver, and timer sections. I don’t expect the screen saver to come on, yet it is still coming. So I tried the wakeLock API, but on webOS, it’s behavior doesn’t match any of the other platforms. The promise does not fail, nor does it succeed. It just hangs.

If the option is off, Screen Saver should not work. Can you take a video and share it with us?
Please email us the video and the following at developer@lge.com:

  • TV model name: (You can check this in the Settings > General > About This TV.)
  • TV software version:
  • webOS TV version: (This can be found when you click the TV model name in the About This TV menu.)
  • Region:
1 Like

Thank you! I will get this info by tomorrow please from home.

Hi there, here is that information, despite all this below, the TV screen saver keeps coming on. It’s an LED TV so I’m not sure why its not staying on. I also just sent this in email.

  • TV model: 55UQ7570PUJ
  • webOS version: 7.2.0-35 (mullet marine)
  • Software version: 03.20.85
  • Below is screenshot of energy saver settings off
  • Also below is the screenshot of the sleep timer off

1 Like

Sorry for the late reply. From the webOS TV 6.0, Screen Saver on/off option is no longer provided. Therefore, you cannot disable Screen Saver on your TV. Sorry for not being helpful.

No worries on the time for reply.

Are there any tricks to keep screen awake? I was thinking the WebLock API would keep screen on. However the WakeLock API request just hangs on webOS. This sounds like a bug, as on all other platforms, the navigator.wakeLock.request('screen') call resolves or rejects within a couple seconds at most. Are there plans for webOS to fix the wakeLock API?

2 Likes

There is no other way. Screen Saver always works except while playing a video in the full screen mode, and you cannot disable it without the option. Thank you.

Got it. But is there plans to fix the bugged wakeLock API? Are webOS aware of the bug? I can help file ticket.

1 Like

WakeLock is not an official spec for the webOS TV. If there are any updates, we will let you know via our website. Thank you.

Thanks very much I will super appreciate that if it lands. It’s super useful.

I was given an idea by another to get an Amazon Firestick, and then open the webpage in that while using WakeLock. They said it should keep the screen awake. Do you know if this is true before I try purchasing it?

Hi there! I wonder why “Art Gallery” doesn’t follow same rules? Is it because it’s part of WebOS? If not, how is it implemented that Screen Saver is not kicking in?

1 Like

Thank you for finding this. I’m also curious. I wasn’t able to fix this situation so had to give up. The LG TV is just sitting in storage right now.

1 Like

It makes a little sense to me. What could possibly be the reason to allow “full-screen video” to run uninterrupted by screen saver and not grant same thing to other applications?

1 Like

Agreed. WakeLock API is in most browsers these like over 80%, I’m not sure why LG is not adding this, it’s standard.

1 Like