Black screen and flickering on Samsung TV

Hi everyone,
I have massive problems getting started with lightning on a samsung tv.
I always have black flickering or the screen is turning black for several seconds.
Even with the vod example of metrological I have this issues.
I already tested it on different tv models. At the moment a BU8000 with Tizen 6.5
Do you have any idea what the problem could be?

TV: Samsung Crystal UHD BU8000
Tizen: 6.5
Lightling JS Core: 2.10.0
Lightling JS SDK: 5.3.2
Lightling JS UI: 1.3.7
Lightling JS UI Components: 2.2.2
Tizen Studio: 5.0
MacBook Pro with Ventura 13.3.1

I was able to figure out, that the bottleneck is the cpu.
In the main menu the vod example has a cpu load of 70%.
As soon as I switch to the detail page it goes up to 80% - 125%
and the flickering and blackscreens are starting to show up.

But how can it be, that the example code produces such a high cpu load
even without any user interaction?
Is it a bad example? Or is LightningJS not meant for modern Samsung TV?

Try the following application stage setting:

{
  "appSettings": {
    "stage": {
      "readPixelsAfterDraw": true
    }
}
1 Like

Thanks for the quick answer.
I will test it within the next days.
Maybe it can at least avoid the flickering.
But it probably won’t change the high CPU load.
There seems to be a different problem here.

Is there a best practice to get LightningJS onto a samsung smart tv?

hi @DasD can you try adding the following setting to your stage config above:

"pauseRafLoopOnIdle": true

and let me know if that reduces the CPU load you are seeing?
alternatively, do you have a webinspector you can use on the Samsung device?
does the high CPU load also appear on your development machine/profiler?

If not we can try to turn things off to see if that reduces the CPU load, start by disabling animations, disable RTT, disable text/images and see if there is 1 component, or a shader, or animation that is causing the CPU to spike.

Is the CPU load consistently high even when not animating/using the app? or does it only spike on certain pages or during certain transitions?

Hi Wouter
Thanks for your suggestion.
I will try to test it next week and also answer as many of your questions as possible.

Hello again,
with the combination of both parameters I was able to solve the problem.
The flickering and blackouts are gone and the cpu load has dropped to about 10% in idle mode.

Thank you very much for your support!

Would you mind posting the final values that solved the issue for you?

Sure.
I was able to solve the problem by updating the settings.json as follows:

{
  "appSettings": {
    "keys": {
      "8": "Back",
      "13": "Enter",
      "27": "Exit",
      "33": "PageUp",
      "34": "PageDown",
      "37": "Left",
      "38": "Up",
      "39": "Right",
      "40": "Down",
      "68": "Debug",
      "71": "Guide",
      "72": "Hint",
      "73": "Info",
      "76": "Last",
      "77": "Menu",
      "78": "Next",
      "80": "Prev",
      "84": "TextBanner",
      "86": "VoiceGuidance",
      "179": "PlayPause",
      "83": "Star",
      "227": "Rewind",
      "228": "FastForward",
      "219": "Rewind",
      "221": "FastForward",
      "403": "ColorA",
      "404": "ColorB",
      "405": "ColorC",
      "406": "ColorD",
      "10009": "Back" // back button of samsung devices
    },
    "stage": {
      "clearColor": "0x00000000",
      "useImageWorker": true,
      "readPixelsAfterDraw": true, // solve flickering
      "pauseRafLoopOnIdle": true, // and blackouts
      "defaultFontFace": "Sofia-Pro-Bold"
    },
    "debug": false
  },
  "platformSettings": {
    "path": "./static",
    "log": true,
    "showVersion": true
  }
}