Bug 14249 - Power Button weird behavior
: Power Button weird behavior
Status: CLOSED FIXED
Product: SB Radio
Classification: Unclassified
Component: Buttons/Knob
: Include FW version in comment
: PC Other
: P1 normal (vote)
: 7.4.0
Assigned To: Wadzinski Tom
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-24 12:52 UTC by Sam Feng
Modified: 2009-10-05 14:28 UTC (History)
4 users (show)

See Also:
Category: Bug


Attachments
Patch to fix behaviour (484 bytes, patch)
2009-09-25 02:04 UTC, Richard Titmuss
Details | Diff
Updated patch (1.41 KB, patch)
2009-09-25 03:36 UTC, Richard Titmuss
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Feng 2009-09-24 12:52:39 UTC
7641 Firmware

Tap power button to "turn off" -> Device goes into standby mode

Tap power button again to "turn on" -> Devices "turns on" for a sec and then goes back into standby mode

Can't "power on" which might seem weird.

-Sam
Comment 1 James Richardson 2009-09-24 13:12:18 UTC
Caleb: didn't you address issue like this in another bug already?
Comment 2 Caleb Crome 2009-09-24 15:07:30 UTC
Sam, please be specific on your issue.

'Tap' means short, less than 1 second press.
'Long Press' means > 2 second press

'On' means the device is in on state

'Standby' means the device is turned on, but visually in off state.  It comes on instantaneously when power is pressed.

'Shutdown' means the device is off-off, and requires a reboot when turned back on.

Given those definitions, please explain the problem.

I think that you're describing a sort of switch-bounce issue, where the power button may go on-off-on in quick succession, or off-on-off in quick succession.

Is that it?
Comment 3 Sam Feng 2009-09-24 15:11:26 UTC
I will come show you... its easier that way :-)

-Sam
Comment 4 Sam Feng 2009-09-24 15:20:40 UTC
So here is some more detail:

I changed the default screen saver for "When off" from "Screen Off" to "Digital
Clock (Transparent)"

I then tap the power button (to go into standby mode) and the transparent
digital clock does indeed show.

Now, I want tap the power button again to turn it on... The home menu comes up
for a second and then it immediately goes back to the transparent digital clock
screen.

Caleb says its not hardware related... Its some software bug that requires some
investigation.

Thanks,
Sam
Comment 5 Richard Titmuss 2009-09-25 02:04:58 UTC
Created attachment 5929 [details]
Patch to fix behaviour
Comment 6 Richard Titmuss 2009-09-25 02:31:28 UTC
Tom, this was broken in r7617 for bug 13971.

In deactivate screensaver you added a call to modify the soft power state. So what happens is:
- screensaver event handler detects button press and calls deactivate screensaver
- deactivate screensaver does a soft power on
- power button handler toggles the soft power, therefore turning the power off again

Turning the power on in deactivate screensaver seems like a bad side effect. Why is that needed, it's not clear from the bug or checkin comment.

This patch does not completely fix the problem, but now it usually works. I am still investigating.
Comment 7 Richard Titmuss 2009-09-25 03:36:22 UTC
Created attachment 5930 [details]
Updated patch
Comment 8 Richard Titmuss 2009-09-25 03:40:15 UTC
I now understand why the soft power on was added to the deactivate screensaver, for some reason any button now appears to turn the device on. This was discussed in the other bug, and it's not clear what has been implemented is correct.

However the attached seems to correct this bug, keeping the current behaviour.

Tom, is the powerActionHandler in the screen saver used now? This would seem to work correctly.
Comment 9 SVN Bot 2009-09-25 08:44:40 UTC
 == Auto-comment from SVN commit #7750 to the jive repo by tom ==
 == https://svn.slimdevices.com/jive?view=revision&revision=7750 ==

Fixed Bug: 14249
Description:
- power button now doesn't double send power when in Clock SS:  power button now always send wake command and deactivates SS and consumes the power action
- Reverted behavior where any key could deactivate, since now power will be better behaved (will always only deactivate and power on, never power off)
- power button was missing a sound effect
Comment 10 James Richardson 2009-10-05 14:28:42 UTC
This bug has been marked as fixed in the 7.4.0 release version of SqueezeBox Server!
    * SqueezeCenter: 28672
    * Squeezebox 2 and 3: 130
    * Transporter: 80
    * Receiver: 65
    * Boom: 50
    * Controller: 7790
    * Radio: 7790  

Please see the Release Notes for all the details: http://wiki.slimdevices.com/index.php/Release_Notes

If you haven't already, please download and install the new version from http://www.logitechsqueezebox.com/support/download-squeezebox-server.html

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.