hyperion.ng icon indicating copy to clipboard operation
hyperion.ng copied to clipboard

Smoothing incorrectly disabled when LED status enabled

Open Ajwinarski opened this issue 1 year ago • 3 comments

  • [x] I confirm that this is an issue rather than a question.

Bug report

I have smoothing defaulted to be enabled when LED status is enabled, however, it appears to be on when the LEDs are off and off when the LEDs are on. Smoothing section of the config.json is as follows: "smoothing": { "decay": 1, "dithering": false, "enable": true, "interpolationRate": 25, "time_ms": 150, "type": "linear", "updateDelay": 0, "updateFrequency": 25 }

Gif of bug shown here.

Steps to reproduce

Toggling the LED status. Monitoring the status of smoothing.

What is expected?

Smoothing should be enabled by default.

What is actually happening?

Smoothing is turned off when LEDs turn on.

System

Hyperion Server:

  • Build: (HEAD detached at 2.0.16) (Paulchen-Panther-cb85d2d/a93d79b-1705568419)
  • Build time: Jan 21 2024 19:47:19
  • Git Remote: https://github.com/hyperion-project/hyperion.ng
  • Version: 2.0.16
  • UI Lang: en (BrowserLang: en-US)
  • UI Access: expert
  • Avail Screen Cap.: dispmanx,framebuffer,qt
  • Avail Video Cap.: v4l2
  • Avail Audio Cap.: audio
  • Avail Services: boblight,cec,effectengine,forwarder,flatbuffer,protobuffer,mDNS,SSDP,borderdetection
  • Config path: /root/.hyperion
  • Database: read/write
  • Mode: Non-GUI

Hyperion Server OS:

  • Distribution: Debian GNU/Linux 12 (bookworm)
  • Architecture: arm64
  • CPU Type: Raspberry Pi 3 Model B Plus Rev 1.3
  • CPU Revision: a020d3
  • Kernel: linux (6.1.0-rpi7-rpi-v8 (WS: 64))
  • Root/Admin: true
  • Qt Version: 6.4.2
  • Python Version: 3.11.2
  • Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36

Ajwinarski avatar Mar 02 '24 20:03 Ajwinarski

Would you mind sharing a debug log, please?

  • Activate Debug log via System-Log
  • Disable the LED instance and Enable the instance to trigger the issue described above
  • Share the Debug log and config via System-Log->Copy log to clipboard

Lord-Grey avatar Mar 03 '24 10:03 Lord-Grey

Would you mind sharing a debug log, please?

  • Activate Debug log via System-Log
  • Disable the LED instance and Enable the instance to trigger the issue described above
  • Share the Debug log and config via System-Log->Copy log to clipboard

Lines 2048 and 2071 from the config file show that ComponentRegister.cpp:89:setNewComponentState() is enabling smoothing after the TV LEDs are turned off and vice versa when turned on.

Smoothing_Disabling_Summary_Report.json

Ajwinarski avatar Mar 04 '24 02:03 Ajwinarski

Thank you for the Log.

Line 2048 enables Smoothing, as a background effect is started with smoothing configured

2024-03-04T02:15:01.109Z [HYPERION|TV Leds] (DEBUG) (BGEffectHandler.h:130:handlePriorityUpdate()) Start background (color-) effect as it moved in scope
..
2024-03-04T02:15:01.111Z [HYPERION|TV Leds] (INFO) Initial background effect 'Rainbow swirl' started
...
2024-03-04T02:15:01.233Z [SMOOTHING|TV Leds] (DEBUG) (LinearColorSmoothing.cpp:676:selectConfig()) Run Effect with Smoothing enabled
2024-03-04T02:15:01.233Z [COMPONENTREG|TV Leds] (DEBUG) (ComponentRegister.cpp:89:setNewComponentState()) Smoothing: enabled

Line 2071 disables Smoothing, as the background effect is stopped because the V4L input took priority

2024-03-04T02:15:03.782Z [MUXER|TV Leds] (DEBUG) (PriorityMuxer.cpp:178:registerInput()) Register new input 'System/V4L' (V4L2) with priority 240 as inactive
...
2024-03-04T02:15:03.784Z [COMPONENTREG|TV Leds] (DEBUG) (ComponentRegister.cpp:89:setNewComponentState()) Smoothing: disabled
2024-03-04T02:15:03.784Z [HYPERION|TV Leds] (DEBUG) (BGEffectHandler.h:125:handlePriorityUpdate()) Stop background (color-) effect as it moved out of scope
...
2024-03-04T02:15:03.860Z [EFFECTENGINE|TV Leds] (INFO) Effect [Rainbow swirl] finished

Seems I need to check, why the background effects kicks in when the instance is disabled.

Do you remember how you triggered 2024-03-04T02:15:01.058Z [COMPONENTREG|TV Leds] (DEBUG) (ComponentRegister.cpp:114:handleCompStateChangeRequestAll()) Disable Hyperion instance, store current components' state

Via the Suspend or the Idle command? I assume Suspend...

Lord-Grey avatar Mar 11 '24 20:03 Lord-Grey