Rockbox Technical Forums

Support and General Use => Hardware => Topic started by: sansalex on February 25, 2020, 02:23:34 PM

Title: Screen scrambled on Clip Zip with RB 3.15
Post by: sansalex on February 25, 2020, 02:23:34 PM
Hello there, this is Alex, happy owner of a Sansa Clip Zip mounting RockBox since years ;D
Unfortunately with 3.15 and 3.14 I have the following issue: at boot, the main menu screen is all scrambled (see attached photo).
If I wait until the screen turns off to black, when I turn it on again with the power button, the graphics are perfect.
This happens with the release candidate and the latest developer build too. This doesn't occur with 3.13!
Is there any way you could help me? Thanks a lot  :)
Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: Bilgus on February 25, 2020, 11:33:01 PM
is this with a theme or totally stock? have you tried deleting the whole rockbox directory?

I have changed some display clocks since 3.14 IIRC but out of quite a few I have yet to see it look like
that unless there is memory corruption

Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: sansalex on February 26, 2020, 08:12:23 AM
There is no theme but the default one. I checked the failsafe theme, same thing. Also tried to delete RockBox folder and reinstall from scratch, same problem.
Please note that, as already said, when the screen turns off and then again on, there are no longer issues. The issue is at boot.
Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: Bilgus on February 26, 2020, 08:27:42 AM
hmm insanely hard to diagnose do you have the latest bootloader as well?
Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: Bilgus on February 26, 2020, 08:29:48 AM
does it only clear up after screen off / on or will it clear up if you run an app maybe one of the lua ones?
Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: sansalex on February 26, 2020, 09:15:47 AM
Yes, I have the latest bootloader as well.
Tried to install bootloader from RockBox Utility with the original firmware both .18 and .21 but same behaviour.
I can confirm running apps doesn't resolve, it resolves only after screen off/on and doesn't occur again, until reboot.
Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: Bilgus on February 27, 2020, 01:17:13 AM
Ok, I have compiled a version for you that turns the screen off and back on at initialization lets see if that works

http://www.mediafire.com/file/1322rd061hixj4h/ClipZip_Corrupted_display_2-27-20_rockbox-full.zip
Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: sansalex on February 27, 2020, 03:53:30 AM
Thank you so much, this solved the issue! :D
However, booting takes a huge time: previously 2-3 seconds and now 37 seconds, why?  :o
Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: Bilgus on February 27, 2020, 09:17:54 AM
I'm guessing now it has to wait for the screen to become available so lets try a different method

I think the variable is_enabled is in an indeterminate state so lets try setting its value explicitly
http://www.mediafire.com/file/9a3mhc8r0ndwipw/ClipZip_Corrupted_displayV2_2-27-20_rockbox-full.zip

and if that version doesn't work I have another idea which is pretty much the same as the original that takes 37s to boot but does it later in the boot process
http://www.mediafire.com/file/96wqqqyrprdzc3v/ClipZip_Corrupted_displayV3_2-27-20_rockbox-full.zip


Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: sansalex on February 27, 2020, 11:33:06 AM
Here are the results (not so good, V1 was better):

V2: 41 seconds. The screen turns off after the boot splash and turns on when the system is ready. Turning it on manually while waiting, will result in a new automatic turn off.
V3: 43 seconds. Same behaviour.

Thanks for your time!
Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: Bilgus on February 27, 2020, 02:16:29 PM
hmm rather odd lets try a version with no changes to rule everything else out

http://www.mediafire.com/file/3ymlzaj5s6wta3g/ClipZip_HEAD_2-27-20_rockbox-full.zip
Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: Bilgus on February 27, 2020, 03:21:17 PM
Probably the battery life 'improvements' strike again

http://forums.rockbox.org/index.php/topic,48549.msg229832.html#msg229832

@saratoga
Quote
Going into the debug menu and manually boosting hard locks the player, so I suppose that is the problem.

Edit:  1 time hard locked, the next corrupted the display, and the third worked correctly but crashed shortly there after when I tried to play a song.

Maybe a better approach would be to confirm that frequency scaling is really working, and then try to adjust PCLK? I think 120MHz is probably far outside of the device spec.
Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: Bilgus on February 27, 2020, 03:31:50 PM
when you get a chance try this version with power saving disabled and see if that improves the display
this build is older somewhere after 3.14 was released but before 3.15

http://www.mediafire.com/file/ncva10187km6za3/clipzip_powersave_12-5-17_rockbox-full.zip
Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: sansalex on February 27, 2020, 03:50:56 PM
Probably the battery life 'improvements' strike again

This is very interesting about the probable root cause of the problem.
Anyway, I must apologize for this inconvenience: after realizing I was having long boot times with any RockBox version, I searched everywhere and found that folders ##MUSIC# and ##PORT# contained corrupted files which I was unable to backup or delete and were freezing my PC, maybe due to the many tests I did on my ClipZip  :o
I decided to format the unit and reinstall all on the empty memory... magically the boot time is good again, and I can confirm that the very first build you provided (V1) is working flawlessly with a boot time of 2 seconds!
If you want to proceed further to find a "real" solution to the bug, I'm available to test your new builds.
I'm just wondering this: when 3.16 will be released, will I have again the screen problem or a fix (temporary/permanent) will be included?

ps: now testing the power saving one

Thanks again.
Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: sansalex on February 27, 2020, 04:09:24 PM
when you get a chance try this version with power saving disabled and see if that improves the display
this build is older somewhere after 3.14 was released but before 3.15

This is an update to the post above. Nope, this build still has the scrambled screen.
Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: Bilgus on February 27, 2020, 04:50:49 PM
could you try V2 again it is an optimal solution that I can put in main with no issues to any other players
Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: sansalex on February 27, 2020, 05:05:57 PM
could you try V2 again it is an optimal solution that I can put in main with no issues to any other players

I'm afraid: with the new clean device, the build V2 still has the issues. It looks like V1 is the only one resolving, do you want me to check V3 again?
Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: Bilgus on February 27, 2020, 05:32:14 PM
Ok here is another try that I won't feel too bad about pushing to main

Honestly I haven't heard of another clipzip user having this issue even among the 3 I personally have access to

http://www.mediafire.com/file/sdi2bb6ru64olgi/ClipZip_Corrupted_displayV5_2-27-20_rockbox-full.zip
Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: sansalex on February 28, 2020, 04:06:06 AM
Ok here is another try that I won't feel too bad about pushing to main

Yep, V5 is working fine!
May I ask the difference between V1/3 and V5? And why turning off/on is a dangerous solution? This is just for my curiosity.
Thanks, man  ;)
Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: Bilgus on February 28, 2020, 10:47:09 AM
None of them are dangerous solutions just non optimal
V1 I turned the screen on and off when the backlight started up

v2 I noted the lcd code is using a static bool variable that is only implicitly initialized
     basically the compiler is expected to set it to false but since the bootloader already
     used this variable it is possible it is already initialized to true

v3 turn the screen off and on again right before rockbox loads the main menu

v5 the lcd_enable command blocks if already set to the same state so if its enabled it won't re-enable it
     There are two different displays for the clip zip and I'm guessing you have the rarer undocumented one
      With no device to test its really hard to write code for it so the best I can do is write code that doesn't affect other devices negatively
      AND hopefully fixes your device

Could you try one last build I noticed there has been a change in the code between 3.13 and 3.14 on the backlight initialization
again in the name of power savings could you try this reversion of http://gerrit.rockbox.org/r/#/c/989/
https://www.mediafire.com/file/4hj1ao2lm1nzwq8/ClipZip_Corrupted_displayV7_2-28-20_rockbox-full.zip

Here is the patch if you are interested in seeing it
http://gerrit.rockbox.org/r/#/c/2303/


Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: sansalex on February 28, 2020, 01:52:35 PM
     There are two different displays for the clip zip and I'm guessing you have the rarer undocumented one

That's what I was thinking: my hardware could be slightly different.
I still have the original box and it says product number is SDMX22-004G-E46R, I don't know if this information is useful.

      With no device to test its really hard to write code for it so the best I can do is write code that doesn't affect other devices negatively
      AND hopefully fixes your device

Crystal clear.

      Could you try one last build I noticed there has been a change in the code between 3.13 and 3.14 on the backlight initialization
      again in the name of power savings could you try this reversion of http://gerrit.rockbox.org/r/#/c/989/

I tested V6 and it works. However I see you now re-edited by providing a V7, I will try this.

EDIT: V7 working too.
Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: Bilgus on February 28, 2020, 02:14:49 PM
awesome I've already tested it on my device so i'll push it in a few days and it will be in all dev versions / releases from then on

Thanks for testing
Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: Bilgus on February 28, 2020, 02:20:15 PM
The box for mine says SDMX22-004G-C57B but it means nothing to me lol I'm sure sandisk has (had) a nice list of what the last 4 characters mean
Title: Re: Screen scrambled on Clip Zip with RB 3.15
Post by: sansalex on February 28, 2020, 03:41:47 PM
awesome I've already tested it on my device so i'll push it in a few days and it will be in all dev versions / releases from then on

Thanks for testing

Great! Thank you so much!  :)

The box for mine says SDMX22-004G-C57B but it means nothing to me lol I'm sure sandisk has (had) a nice list of what the last 4 characters mean

They absolutely know the meaning and also the hardware nuances associated with those characters, but they'll never tell us the details hehe :-X