Bug 16148 - Blank screen SS does not work on SB Touch as fallback whenOff SS when clock is not set
: Blank screen SS does not work on SB Touch as fallback whenOff SS when clock i...
Status: CLOSED FIXED
Product: SB Touch
Classification: Unclassified
Component: UI
: 7.5.0
: All All
: -- normal with 9 votes (vote)
: 7.5.x
Assigned To: Ben Klaas
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-27 05:31 UTC by John Swenson
Modified: 2010-09-13 11:59 UTC (History)
3 users (show)

See Also:
Category: ---


Attachments
fallback to blank screen on non-server requested soft power off & clock not set (4.80 KB, patch)
2010-06-08 14:39 UTC, Ben Klaas
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Swenson 2010-04-27 05:31:37 UTC
When the Touch is not connected to a server pressing the power button will not display the OFF screensaver. 

The screensaver is activated if the Touch is connected to any server: MySB.com, external SBS or TinySBS. 

This normally occurs when the Touch is run completely standalone, no connection to the outside world and either a USB drive (or SD card) has not been connected or TinySBS has died for some reason. 

The problem seems to be in Player.lua, the setPower function. This calls the server to tell it the power state has changed. If the Touch is not connected to any server this call does not seem to return preventing the screensaver from being activated. Some form of "if connected to server" should probably preceed the call to the server. 

John S.
Comment 1 Mike 2010-04-27 09:44:39 UTC
I have been using my Touch with only a USB HDD attached.  My PC based slimserver is regularly turned off as my PC is often put into standby mode for power saving purposes.

Note that at least my perspective the ability to turn off the display with the remote would be a very acceptable temporary work around.
Comment 2 jtXXII 2010-04-28 21:52:37 UTC
*** This bug has been confirmed by popular vote. ***
Comment 3 philg2e 2010-06-02 20:35:46 UTC
The power off no longer worked after updating to 7.5 even with USB drive attached.
Comment 4 Ben Klaas 2010-06-03 11:19:06 UTC
I'm unable to reproduce this with 7.5.1 firmware. I'd like to initially assign this to QA to reproduce. flagging with bug_meeting keyword.
Comment 5 Ben Klaas 2010-06-03 11:26:05 UTC
...just for added info, the important core bits for soft power state are not in Player.lua but in JiveMain.lua, particularly getSoftPowerState() and setSoftPowerState(). In those chunks of code, it appears clear it should be possible to set a player to off without the server being present. In my tests with 7.5.1, that is the case.
Comment 6 Chris Owens 2010-06-07 15:31:35 UTC
I couldn't reproduce this with a 7.5.0 local server, but I was able to repro by the following steps:

1) Connect power to unit
2) wait for boot
3) Insert USB drive
4) wait for scan
5) hit the reset button on the back of the unit
6) after reboot, note the power button on the home screen has no effect

Following the same steps in 7.5.1, the first time I tried it there was an odd delay after hitting 'power' while connected to tinysc before the 'off' screensaver popped up.  However, I tried the same steps again and it worked promptly.

I think this one seems to be fixed in 7.5.1.  John if you or one of the other people seeing this want to try 7.5.1 and make sure that I was reproducing the same bug you were seeing, that would be great.  For now I will go ahead and mark this as 'worksforme' since it was not fixed with an explicit checkin, but apparently as a side effect of one of the other fixes in 7.5.1.
Comment 7 Jim McAtee 2010-06-07 16:22:15 UTC
I can reproduce it.  I'm running 7.51, with r8837 firmware on the Touch.  Here are the steps to reproduce:

1. Connect the Touch to a network Squeezebox Server.
2. Shut down the server.
3. Reboot the Touch.
4. Now try the Power button (touch screen or remote).  Nothing happens.  On the touch screen it only flashes.

Note that the power button _does_ work in following case:

1. Connect the Touch to a network Squeezebox Server.
2. Shut down the server.
3. Now try the Power button.  It works, even though the Touch is no longer connected to an SbS server.
Comment 8 John Swenson 2010-06-07 18:42:48 UTC
It seems even worse in 7.5.1. The original scenario for this was: not connected to any network, completely stand alone running off of TinySBS with a USB drive. The power button would work as long as TinySBS was running. Upon ejecting the drive (or just turning it off) TinySBS would stop, at which point the power button would not work.

Now with 7.5.1 (r8837) the power button does not work at all when not connected to a network, even when TinySBS is up and running nicely. 

If I boot with no network, run TinySBS, button does not work. If I then connect to a network, it still does not work. Then explicitly connect to mysqueezebox.com, the button starts working. Then disconnect from the network and the button continues to work even with no connection. From then on even if I eject the USB drive the button continues to work.

So it looks like the issue really is "has the Touch made at least one connection to mysqueezebox.com". If it has the power button works, if it hasn't the button doesn't work. Whether it is currently connected to mysqueezebox.com or even if it is currently connected to a server doesn't seem to matter. As long as the current session has made a connection sometime in the past to mysqueezebox.com, the button works. 

John S.
Comment 9 Jim McAtee 2010-06-07 18:50:38 UTC
(In reply to comment #8)
> So it looks like the issue really is "has the Touch made at least one
> connection to mysqueezebox.com".

I haven't tested the behavior with TinySbS, but I think I'd make it: "has the Touch made at least one connection to BigSbS."

Either BigSbS on the local network or on mysqueezebox.com.
Comment 10 John Swenson 2010-06-07 20:02:55 UTC
You are right, any connection to a server over the network at some time seems to work. What I can't test is if its BigSBS or just any server over the network. I don't have two Touches to see if a connection over the net to a TinySBS is just as good as a connection to BigSBS or mysqueezebox.com. 

John S.
Comment 11 Ben Klaas 2010-06-07 20:22:40 UTC
Can someone who has reproduced this issue let me know what the date command shows from a linux command line?

If it shows 1970 as the year, that narrows things down considerably.
Comment 12 Jim McAtee 2010-06-07 20:32:00 UTC
Sun Apr 19 12:46:38 MST 1981
Comment 13 Jim McAtee 2010-06-07 20:46:36 UTC
Looks like it must be random.

Tue Oct 30 11:11:17 MST 1934
Comment 14 John Swenson 2010-06-08 00:26:51 UTC
Tue Jun  8 00:27:19 PDT 2010
Comment 15 John Swenson 2010-06-08 00:32:14 UTC
One additional bit of info, the act of logging in seemed to fix the problem. I'll have to try a logging in without a network connected to the outside world. That will have to wait til later.
Comment 16 Ben Klaas 2010-06-08 07:38:39 UTC
Aside from comments#14/15 which I believe are misleading, it's clear that the when off screensaver is not kicking in because the clock is not set.

The blank screen screensaver should still be operable as a fallback power-off SS in this condition (by design we do not show clock screensavers when the Squeezebox Touch has "time travelled" because its clock is not set). That's the bug, and I will investigate that further today.
Comment 17 John Swenson 2010-06-08 08:53:33 UTC
OK I tried it again without connection to the outside world or local server and got:

Wed Dec 31 16:01:52 PST 1969

Also it not just a clock thing. Even if the OFF screensaver is set to "screen off" pressing the power button doesn't call it if no connection has been made to an external server.

Then I tried setting the now playing scrrensaver to screen off, and it did get invoked while playing from the USB drive, but if now playing screensaver was set to a clock it was not invoked while playing a song. 

So it does look like there is a "don't show clock if time not set" going on, but it seems to be more than that for the power button since a "screen off" was not shown for a power button press.

To hopefully summarize the tests:

All cases, no connection to external server, TinySBS was running

When off screensaver set to clock:  not activated 
When off screensaver set to screen off: not activated

Now playing screensaver set to clock: not activated
Now playing screensaver set to screen off: activated

Stopped screensaver showing the same results.
I tried a couple different clocks, same results.
Comment 18 Jim McAtee 2010-06-08 09:48:18 UTC
Wow. I had no idea that the Touch couldn't maintain system time between reboots.  I guess that means you also can't use alarms in standalone mode.  Seems to me that there should be a setting under Date & Time to manually set the clock.

The off screensaver also has the behavior of displaying the time when the screen is touched.  Maybe that's why it's not being shown.  I would suppose that this feature will have to be disabled if the clock hasn't been set.
Comment 19 Ben Klaas 2010-06-08 10:12:11 UTC
bug #15654 caused the regression that opened this bug.

My recommendation is to seek out a different fix for 15654 and then move the fallback screensaver for whenOff from nothing back to the blank screen SS.
Comment 20 Ben Klaas 2010-06-08 14:39:24 UTC
Created attachment 6881 [details]
fallback to blank screen on non-server requested soft power off & clock not set

IMO, the key to fixing this bug while not reverting bug#15654 is to differentiate between server requests and user requests for soft power off.

with this patch, when the clock is set incorrectly and the request for power off was initiated by the user, the fallback SS is blank screen rather than none.

Would like Felix, Michael or Alan to review.
Comment 21 Felix Mueller 2010-06-09 01:16:08 UTC
Hi Ben, I checked your patch and I can see two minor issues when time is not set correctly:
- Fab4 cannot be turned off from the WebControl interface on SN (but I guess that is not a biggie as we assume correct time when connected to the network and if we are not connected to the network there is no server that can turn it on or off anyways.)
- Turning off Fab4 via touch screen is ok, but when I touch the screen again to then turn it on I see the incorrect time on that immediate screen with the power button.
Comment 22 Ben Klaas 2010-06-09 06:45:05 UTC
(In reply to comment #21)
> Hi Ben, I checked your patch and I can see two minor issues when time is not
> set correctly:
> - Fab4 cannot be turned off from the WebControl interface on SN (but I guess
> that is not a biggie as we assume correct time when connected to the network
> and if we are not connected to the network there is no server that can turn it
> on or off anyways.)

Right, I don't view that as a problem since if we're connected to SN (or SBS) the clock will be set correctly, thus no bug.

> - Turning off Fab4 via touch screen is ok, but when I touch the screen again to
> then turn it on I see the incorrect time on that immediate screen with the
> power button.

Hmmm...that shouldn't happen. BlankScreenApplet.lua should work but not show the time on the screen when the clock isn't set. I'll take another look at that part today.
Comment 23 SVN Bot 2010-06-15 12:37:09 UTC
 == Auto-comment from SVN commit #8862 to the jive repo by bklaas ==
 == http://svn.slimdevices.com/jive?view=revision&revision=8862 ==

Bug: 16148
Description: fallback to blank screen on non-server requested soft power off when clock is not set
Comment 24 Ben Klaas 2010-06-15 12:51:55 UTC
patch is checked in.

leaving bug open while I investigate the BlankScreenApplet displaying the time when the clock isn't set.
Comment 25 SVN Bot 2010-06-15 13:52:48 UTC
 == Auto-comment from SVN commit #8866 to the jive repo by bklaas ==
 == http://svn.slimdevices.com/jive?view=revision&revision=8866 ==

Fixed Bug: 16148
Description: do not display time in BlankScreen SS if clock is deemed not set
add isClockSet() method to datetime.lua
Comment 26 Chris Owens 2010-09-13 11:59:20 UTC
This bug has now been fixed in a released version of the Squeezeplay firmware (SB Touch, SB Radio, and SB Controller).  If you are still seeing this bug, please make certain you are running firmware 9009 or higher, and re-open it.

Thanks!