unfoldedcircle / feature-and-bug-tracker

Feature and bug tracker repository for Unfolded Circle products
21 stars 0 forks source link

[bug] Remote activates standby when removed from dock #375

Open kennymc-c opened 2 months ago

kennymc-c commented 2 months ago

Is there an existing issue for this?

Description

I have repeatedly noticed that the remote has to reconnect to the wifi immediately after it has been removed from the dock. I previously thought that it could be due to my router, but on closer analysis of the log, I noticed that the remote switches to standby mode the moment it is removed from the dock, which of course makes no sense. Unfortunately, this cannot always be reproduced and it is not due to how long the remote has been in the dock. It has also occurred after just 20 minutes.

How to Reproduce

  1. Make sure the remote is not in standby mode
  2. Place it in the dock
  3. Wait
  4. Remove the remote from the dock

Expected behavior

The remote shouldn't switch to standby when removed from the dock

System version

1.7.7

What part of the system affected by the problem?

Overall system

Additional context

UCR2_logs_2024-04-27.txt

kennymc-c commented 2 weeks ago

Still a problem with 1.7.12. Could this be reproduced or is there any (maybe also hardware related) explanation for this behaviour?

zehnm commented 2 weeks ago

I haven't experienced that behaviour yet, but the remote definitely shouldn't go into standby mode immediately after removing it from the dock. But your logs clearly show that standby is initiated less than 500ms after removing it from the dock. The main "remote-is-active" input sources to prevent standby are the accelerometer, user inputs and if it's in the charger. If the accelerometer were damage, you would most likely have noticed it. Or you got a Jedi hand, not triggering it while taking it out of the dock :-)

I will double check the standby logic. My assumption is that this is a race condition in handling the power-mode inputs.

zehnm commented 2 weeks ago

A workaround is included in the next release which prevents standby right after taking the remote out of the charger: standby is blocked for 5 seconds which gives plenty of time for an input event to activate normal operation mode (turning screen on etc).

Otherwise we can classify the charger-disconnect event as an activity event. This would immediately put the remote into normal operation mode. The only "downside" would be for special use cases like powering the dock with a USB-C POE splitter and turning off power on a schedule. Then the screen would turn on, instead or remaining dark.

zehnm commented 1 week ago

The workaround is included in beta 1.7.13 and I'll close this issue once a public release is out. If it still happens, please reopen the issue and I'll implement the alternative solution.

zehnm commented 1 week ago

Part of 1.7.14

kennymc-c commented 1 week ago

@zehnm Unfortunately, the error still occurs with 1.7.14. I can't reopen this issue as you closed it as a maintainer UCR2_logs_2024-06-21.txt

I should perhaps add that I set the accelerometer sensitivity to the lowest value on the remote.

zehnm commented 4 days ago

Reopen: I will double check it again, either I've missed something, or I'll have to implement the alternative solution.

zehnm commented 1 day ago

I should perhaps add that I set the accelerometer sensitivity to the lowest value on the remote.

This must be it: what do you consider the "lowest" value? Slider completely to the left, which is off, or the first step to the right?

The log shows that standby was prevented by the new logic when taking out of the dock for exactly 5 seconds. Since no input event happened (button or touch screen) and the accelerometer switched off, standby was activated. I simply didn't consider that use case! I'll change the logic that when the accelerometer is disabled, the charger-disconnected event is considered as input activity event. This will reset the standby counter. The combination is required for another edge case when the dock-power is cut (for example with a PoE splitter) to prevent the remote-display from turning on.

kennymc-c commented 1 day ago

This must be it: what do you consider the "lowest" value? Slider completely to the left, which is off, or the first step to the right?

The slider is completely to the left

from GET /cfg:

"power_saving": { "wakeup_sensitivity": 0, "display_off_sec": 15, "standby_sec": 300 }