CSO Freezes when idle

c_hri_s
Posts: 29
Joined: Mon Oct 16, 2017 10:35 pm
Been thanked: 6 times

CSO Freezes when idle

Post by c_hri_s » Wed Mar 21, 2018 3:13 am

Hi,

If I start my CSO build and press no buttons then in a fairly short time ES becomes unresponsive and none of the keys work, with the exception of the 'A' button which makes the screen bright again if it has dimmed.

When logging in via SSH when the unit is in this state, it freezes at this point:

Code: Select all

chris@infinity:~$ ssh -l pi 192.168.1.145
pi@192.168.1.145's password: 

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Mar 21 09:01:09 2018 from infinity

SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.
And hangs there, although a CTRL-C will exit:

Code: Select all

^Cpi@retropie:~$ 
While in this state you can SCP/Samba to the device and load/manipulate files with no issue.

However the power button does not shut the unit down (nothing happens), and you either need to force a shutdown with mode+power, or SSH into the unit and shutdown that way.

I've rebuilt my image several times for various reasons and this is repeatable.

I guess I have a few questions - does it happen to anyone else, and is it ES or the CSO software build at fault.
The fact the power button doesn't work in this state would lead me to believe it might be the CSO build.

If it's an issue for everyone I'll add it to the github to track.
Last edited by c_hri_s on Fri Mar 23, 2018 4:32 am, edited 1 time in total.

c_hri_s
Posts: 29
Joined: Mon Oct 16, 2017 10:35 pm
Been thanked: 6 times

Re: CSO - ES Freezes when idle

Post by c_hri_s » Wed Mar 21, 2018 4:17 am

Hi,

Sure, thanks - I'll collect that.

I should have mentioned, if you start using it when it first comes on then it doesn't freeze and works perfectly - even for long playing times. It seems to be idle while in ES that kills it.

c_hri_s
Posts: 29
Joined: Mon Oct 16, 2017 10:35 pm
Been thanked: 6 times

Re: CSO - ES Freezes when idle

Post by c_hri_s » Wed Mar 21, 2018 5:48 am

Will do (when it's finished transferring stuff to the SD card) - but again just to be clear, when the input is frozen the underlying Pi still works okay. I can SSH in (providing I ctrl-c the login, it hangs on something) .. and I can scp/samba to the device with no problem.

c_hri_s
Posts: 29
Joined: Mon Oct 16, 2017 10:35 pm
Been thanked: 6 times

Re: CSO - ES Freezes when idle

Post by c_hri_s » Thu Mar 22, 2018 10:11 am

Hi,

It's a little tricky to reproduce. I turned the unit on, exited ES and then left it on the shell screen. I then opened a WinSCP session and proceeded to copy over a few PSX games; a couple of gig or so. When I SSHd into the unit, it was in this hung state.

It's not the SD card - I've had it happen with three different cards, all branded Sandisk.

The STS light behaves exactly as you stated - dim and bright/flashing when Mode is pressed

"sudo service cs-osd stop" hangs as well when you try to run it - it took about two minutes to return to the command line and stop the service. Other commands (file system commands for example) run without delay.

It's not temperature related. The fan comes on reliably at 60 degrees.
Interestingly /opt/vc/bin/vcgencmd measure_temp hangs as well when the system is in this state.

/var/log/messages doesn't seem to show much to my untrained eye, but it's here: https://pastebin.com/dX3VR0r5

As I said, using the system seems to be fine. It feels like a software thing as it plays games for as long as you want with no hangups.

c_hri_s
Posts: 29
Joined: Mon Oct 16, 2017 10:35 pm
Been thanked: 6 times

Re: CSO - ES Freezes when idle

Post by c_hri_s » Fri Mar 23, 2018 3:20 am

Hi,

Okay, it's in its frozen state:

Code: Select all

pi@retropie:~ $ sudo service cs-osd stop
pi@retropie:~ $ 
That command took (precisely) three minutes to execute. Note that battery and wifi display -remains- on the screen even though the command completes without an error and nothing osd-like seems to be left running:

Code: Select all

pi@retropie:~ $ ps aux|grep osd
root       581  0.0  0.0      0     0 ?        Zl   09:05   0:00 [cs-osd] <defunct>
pi        1001  0.0  0.2   4276  1844 pts/1    S+   09:12   0:00 grep --color=auto osd
The screen will dim/undim with a press of the key, but nothing on the display changes.
I've had this freeze both in ES and when at the pi prompt on the GB .. so it can't be ES freezing up.

"sudo python Circuit-Sword/cs-osd/cs-osd.py" spat out the following and then didn't say anything else:

Code: Select all

pi@retropie:~ $ sudo python Circuit-Sword/cs-osd/cs-osd.py
INFO:root:Program Started
INI CONFIG file [/home/pi/Circuit-Sword/cs-osd/cs-osd/config.ini] selected
INI CONFIG protocol->version=1
INI CONFIG battery->icon_batt=/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_BATT_LONG.png
INI CONFIG battery->icon_chrg=/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_BATT_CHRG.png
INI CONFIG battery->icon_pwr=/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_BATT_PWR.png
INI CONFIG wifi->icon_wifi=/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI.png
INI CONFIG wifi->icon_wifi=/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI_1.png
INI CONFIG wifi->icon_wifi=/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI_2.png
INI CONFIG wifi->icon_wifi=/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI_3.png
INI CONFIG wifi->icon_wifi=/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI_4.png
INI CONFIG wifi->icon_wifi=/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI_5.png
INI CONFIG mute->icon_mute=/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_MUTE.png
INI CONFIG loaded
INI DATA protocol->version=1
INI DATA data->voltage=-.--
INI DATA data->temperature=--.-
INI DATA data->showdebug=1
INI DATA data->showwifi=0
INI DATA data->showmute=0
INI DATA loaded
Loaded png [/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_BATT_LONG.png] with dimensions X=28 Y=11
Loaded png [/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_BATT_CHRG.png] with dimensions X=11 Y=11
Loaded png [/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_BATT_PWR.png] with dimensions X=12 Y=11
Loaded png [/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_MUTE.png] with dimensions X=14 Y=11
Loaded png [/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI.png] with dimensions X=14 Y=11
Loaded png [/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI_1.png] with dimensions X=14 Y=11
Loaded png [/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI_2.png] with dimensions X=14 Y=11
Loaded png [/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI_3.png] with dimensions X=14 Y=11
Loaded png [/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI_4.png] with dimensions X=14 Y=11
Loaded png [/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI_5.png] with dimensions X=14 Y=11
STARTED!
INFO:root:Volume  [25]
Simple mixer control 'PCM',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 9472
  Mono:
  Front Left: Playback 2368 [25%] [-27.75dB] [on]
  Front Right: Playback 2368 [25%] [-27.75dB] [on]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:VoltVal [506]
INFO:root:Volt    [412]V
INFO:root:CHRG [0] PGIN [0] STATE [0]
Mode+up/down/left/right/start didn't make it output anything else.

/var/log/messages is here: https://pastebin.com/UUnbaesT

It's very definitely a strange one ...

c_hri_s
Posts: 29
Joined: Mon Oct 16, 2017 10:35 pm
Been thanked: 6 times

Re: CSO Freezes when idle

Post by c_hri_s » Fri Mar 23, 2018 5:13 am

Okay, I made the edit and rebooted, then waited for it to hang.

"sudo service cs-osd stop" still took some time to run, and the OSD remained on the screen when it terminated.

"sudo python Circuit-Sword/cs-osd/cs-osd.py" was much more chatty and didn't hang without the call to getCPUtemperature()

Code: Select all

pi@retropie:~ $ sudo python Circuit-Sword/cs-osd/cs-osd.py
INFO:root:Program Started
INI CONFIG file [/home/pi/Circuit-Sword/cs-osd/cs-osd/config.ini] selected
INI CONFIG protocol->version=1
INI CONFIG battery->icon_batt=/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_BATT_LONG.png
INI CONFIG battery->icon_chrg=/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_BATT_CHRG.png
INI CONFIG battery->icon_pwr=/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_BATT_PWR.png
INI CONFIG wifi->icon_wifi=/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI.png
INI CONFIG wifi->icon_wifi=/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI_1.png
INI CONFIG wifi->icon_wifi=/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI_2.png
INI CONFIG wifi->icon_wifi=/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI_3.png
INI CONFIG wifi->icon_wifi=/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI_4.png
INI CONFIG wifi->icon_wifi=/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI_5.png
INI CONFIG mute->icon_mute=/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_MUTE.png
INI CONFIG loaded
INI DATA protocol->version=1
INI DATA data->voltage=-.--
INI DATA data->temperature=--.-
INI DATA data->showdebug=1
INI DATA data->showwifi=0
INI DATA data->showmute=0
INI DATA loaded
Loaded png [/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_BATT_LONG.png] with dimensions X=28 Y=11
Loaded png [/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_BATT_CHRG.png] with dimensions X=11 Y=11
Loaded png [/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_BATT_PWR.png] with dimensions X=12 Y=11
Loaded png [/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_MUTE.png] with dimensions X=14 Y=11
Loaded png [/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI.png] with dimensions X=14 Y=11
Loaded png [/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI_1.png] with dimensions X=14 Y=11
Loaded png [/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI_2.png] with dimensions X=14 Y=11
Loaded png [/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI_3.png] with dimensions X=14 Y=11
Loaded png [/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI_4.png] with dimensions X=14 Y=11
Loaded png [/home/pi/Circuit-Sword/cs-osd/cs-osd/resources/ICON_WIFI_5.png] with dimensions X=14 Y=11
STARTED!
INFO:root:Volume  [25]
Simple mixer control 'PCM',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 9472
  Mono:
  Front Left: Playback 2368 [25%] [-27.75dB] [on]
  Front Right: Playback 2368 [25%] [-27.75dB] [on]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:VoltVal [495]
INFO:root:Volt    [403]V
INFO:root:CHRG [0] PGIN [0] STATE [0]
INFO:root:Info    [0]
INFO:root:Wifi    [1]
INFO:root:Wifi    [ENABLING]
INFO:root:Wifi    []
INFO:root:BT      []
INFO:root:Audio   [1]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:VoltVal [495]
INFO:root:Volt    [403]V
INFO:root:CHRG [0] PGIN [0] STATE [0]
INFO:root:Info    [0]
INFO:root:Wifi    [1]
INFO:root:Wifi    [95]strength
INFO:root:Audio   [1]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:VoltVal [495]
INFO:root:Volt    [403]V
INFO:root:CHRG [0] PGIN [0] STATE [0]
INFO:root:Info    [0]
INFO:root:Wifi    [1]
INFO:root:Wifi    [95]strength
INFO:root:Audio   [1]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:VoltVal [495]
INFO:root:Volt    [403]V
INFO:root:CHRG [0] PGIN [0] STATE [0]
INFO:root:Info    [0]
INFO:root:Wifi    [1]
INFO:root:Wifi    [94]strength
INFO:root:Audio   [1]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:VoltVal [495]
INFO:root:Volt    [403]V
INFO:root:CHRG [0] PGIN [0] STATE [0]
INFO:root:Info    [0]
INFO:root:Wifi    [1]
INFO:root:Wifi    [94]strength
INFO:root:Audio   [1]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
INFO:root:Volume  [25]
^Cpi@retropie:~ $

c_hri_s
Posts: 29
Joined: Mon Oct 16, 2017 10:35 pm
Been thanked: 6 times

Re: CSO Freezes when idle

Post by c_hri_s » Fri Mar 23, 2018 5:33 am

Will do, I'll give that a go later and report back.
I assume I can plug a keyboard into the USB port and use it that way if I can't ssh into it (if there's no wifi)?

Just for clarity vcgencmd does work okay, just not in the hung state (and I assume it's trying to grab it when it's somehow screwy that's causing the hang)

If I reboot and run this script, it happily displays the temp of the unit

Code: Select all

#!/bin/bash
while true
do

        echo $(uptime) $(/opt/vc/bin/vcgencmd measure_temp)
        sleep 1
done
I haven't done anything to the underlying OS, just configured RetroPie.

This caught my eye, but I'm assuming the CM3 includes whatever fixes they made to the FW.
https://www.raspberrypi.org/forums/view ... 28&t=88127

[Edit] When it's hung you can see some vcgencmd processes:

Code: Select all

pi@retropie:~/Circuit-Sword/cs-osd $ ps aux|grep vcgencmd
root      3842  0.0  0.0   1908   392 ?        S    11:42   0:00 sh -c vcgencmd measure_temp
root      3843  0.0  0.0  11548   508 ?        Sl   11:42   0:00 vcgencmd measure_temp
pi        3890  0.0  0.0      0     0 ?        D    11:48   0:00 [vcgencmd]
pi        3899  0.0  0.0  11548   524 pts/0    Sl+  11:49   0:00 /opt/vc/bin/vcgencmd measure_temp
pi        3909  0.0  0.2   4272  2004 pts/1    S+   11:51   0:00 grep --color=auto

c_hri_s
Posts: 29
Joined: Mon Oct 16, 2017 10:35 pm
Been thanked: 6 times

Re: CSO Freezes when idle

Post by c_hri_s » Fri Mar 23, 2018 8:25 am

I left it at a shell prompt running the stock Retropie image for an hour and it didn't freeze. I was able to query the temperature without issue.

I will say that one of the surest ways to put my device into the frozen state seems to be to transfer a large amount of data over SCP and without networking on stock Retropie obviously this wasn't possible.

They do run different kernels - stock Retropie was on 4.9.35-v7+ while my CS build seems to be on 4.14.14-v7+

User avatar
kite
Posts: 950
Joined: Thu May 12, 2016 4:30 am
Location: UK
Has thanked: 242 times
Been thanked: 332 times
Contact:

Re: CSO Freezes when idle

Post by kite » Fri Mar 23, 2018 9:16 am

Can you try on my image and completely disabling wifi by following this: https://github.com/kiteretro/Circuit-Sw ... completely

See if we get the same behaviour..

c_hri_s
Posts: 29
Joined: Mon Oct 16, 2017 10:35 pm
Been thanked: 6 times

Re: CSO Freezes when idle

Post by c_hri_s » Fri Mar 23, 2018 10:48 am

I've disabled wifi as you outlined and haven't had it freeze.
Not sure if this is a good or bad thing! ...

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest