Zynthian doesn't shutdown properly

Hi,
I have a Zynthian box with a Rpi3. When I long press the shutdown button, I say “yes”. Then it is stuck on the Zynthian logo. I need to unplug the power and I don’t like that.
Where can I find logs to investigate?

The webcongf gui log will possibly give you information…

else you log on to the zynthian and investigate with the system d journal

journalctl -fu zynthian . .

When I look journalctl -f via ssh I got this:

Feb 16 09:39:11 zynthian startx[424]: zynseq exit
Connection to 192.168.1.124 closed by remote host.
Connection to 192.168.1.124 closed.

I can’t find the logs from the previous session.
When I do a shutdown -h now in ssh it’s shuting down properly.

 ##########################       ----------------------------------------
#                          #      ZynthianOS: Built on os.zynthian.org
#            ##            #      Timestamp: 2020-05-27
#      ##   #  #   ##      #      Optimized: Raspberry Pi 3 Model B Plus
#     #  #  #  #  #  #     #      ----------------------------------------
###   #  #  #  #  #  #   ###      Kit:           V1
#  #  #  #  #  #  #  #  #  #      Display:       PiTFT 2.8 Resistive
#   ##   #  #  #  #   ##   #      Soundcard:     HifiBerry DAC+
#         ##    ##         #      Wiring Layout: PROTOTYPE-4
#                          #      ----------------------------------------
 ##########################
                                  zynthian-ui: master (11f49b)
                                  zynthian-webconf: master (8efc3b)
                                  zyncoder: master (465929)
                                  zynthian-sys: master (0a0ca1)
                                  zynthian-data: master (74ceb3)
                                  ---------------------------------------

Linux zynthian 4.19.97-v7+ #1294 SMP Thu Jan 30 13:15:58 GMT 2020 armv7l

I am currently updating it.

Still the same problem after update via web-ui

 ##########################       ----------------------------------------
#                          #      ZynthianOS: Built on os.zynthian.org
#            ##            #      Timestamp: 2020-05-27
#      ##   #  #   ##      #      Optimized: Raspberry Pi 3 Model B Plus
#     #  #  #  #  #  #     #      ----------------------------------------
###   #  #  #  #  #  #   ###      Kit:           V1
#  #  #  #  #  #  #  #  #  #      Display:       PiTFT 2.8 Resistive
#   ##   #  #  #  #   ##   #      Soundcard:     HifiBerry DAC+
#         ##    ##         #      Wiring Layout: PROTOTYPE-4
#                          #      ----------------------------------------
 ##########################
                                  zynthian-ui: master (ae6fb3)
                                  zynthian-webconf: master (45bcb0)
                                  zyncoder: master (ef24e0)
                                  zynthian-sys: master (6d9366)
                                  zynthian-data: master (336ead)
                                  ---------------------------------------

Linux zynthian 4.19.97-v7+ #1294 SMP Thu Jan 30 13:15:58 GMT 2020 armv7l

What is the command/script preformed when clicking on “YES” ?

Zynthian UI is run from a BASH script which monitors its exit status. If the exit status is 0 then the BASH scripts runs the poweroff command. If you are able to run poweroff successfully from the command line it suggests that zynthian is either not exiting or is returning a different exit value.

poweroff is working from comand line.

Try this:

systemctl stop zynthian
cd /zynthian/zynthian-ui
X :0 & DISPLAY=:0 ./zynthian_gui.py ; echo "EXIT CODE: $?" ; killall Xorg 

Within Zynthian UI try to shutdown then see what is printed at the command line.

After executing your commands the ui doesn’t restart:
ERROR: PatternManager failed to open file for load /zynthian/zynthian-my-data/sequences/patterns.zynseq

In the meantime I enabled rsyslog. Maybe i will have more informations.

That error may be ignored and is removed from the development branch (soon to be merged).

here is what the log say:

Feb 16 13:02:42 zynthian startx[451]: zynseq exit
Feb 16 13:02:42 zynthian systemd[1]: systemd-rfkill.socket: Succeeded.
Feb 16 13:02:42 zynthian systemd[1]: Closed Load/Save RF Kill Switch Status /dev/rfkill Watch.
Feb 16 13:02:42 zynthian systemd[1]: Stopped target Graphical Interface.
Feb 16 13:02:42 zynthian systemd[1]: Stopped target Multi-User System.
Feb 16 13:02:42 zynthian systemd[1]: rpi-eeprom-update.service: Succeeded.
Feb 16 13:02:42 zynthian systemd[1]: Stopped Check for Raspberry Pi EEPROM updates.
Feb 16 13:02:42 zynthian systemd[1]: Stopping rng-tools.service...
Feb 16 13:02:42 zynthian systemd[1]: Stopped target Sound Card.
Feb 16 13:02:42 zynthian rngd[355]: stats: bits received from HRNG source: 60064
Feb 16 13:02:42 zynthian rngd[355]: stats: bits sent to kernel pool: 6144
Feb 16 13:02:42 zynthian systemd[1]: Stopping Turn on/off Screen Backlight...
Feb 16 13:02:42 zynthian rngd[355]: stats: entropy added to kernel pool: 6144
Feb 16 13:02:42 zynthian a2jmidid[510]: Bridge stopping...
Feb 16 13:02:42 zynthian rngd[355]: stats: FIPS 140-2 successes: 3
Feb 16 13:02:42 zynthian sh[1217]: /bin/sh: 1: cannot create /sys/class/backlight/*/bl_power: Directory nonexistent
Feb 16 13:02:42 zynthian systemd[1]: Stopping Alsa to Jack Bridge...
Feb 16 13:02:42 zynthian rngd[355]: stats: FIPS 140-2 failures: 0
Feb 16 13:02:42 zynthian systemd[1]: Stopping Zynthian User Interface...
Feb 16 13:02:42 zynthian rngd[355]: stats: FIPS 140-2(2001-10-10) Monobit: 0
Feb 16 13:02:42 zynthian rngd[355]: stats: FIPS 140-2(2001-10-10) Poker: 0
Feb 16 13:02:42 zynthian rngd[355]: stats: FIPS 140-2(2001-10-10) Runs: 0
Feb 16 13:02:42 zynthian rngd[355]: stats: FIPS 140-2(2001-10-10) Long run: 0
Feb 16 13:02:42 zynthian systemd[1]: Stopping Zynthian Webconf...
Feb 16 13:02:42 zynthian rngd[355]: stats: FIPS 140-2(2001-10-10) Continuous run: 0
Feb 16 13:02:42 zynthian rngd[355]: stats: HRNG source speed: (min=525.613; avg=613.663; max=732.385)Kibits/s
Feb 16 13:02:42 zynthian rngd[355]: stats: FIPS tests speed: (min=6.149; avg=6.582; max=6.851)Mibits/s
Feb 16 13:02:42 zynthian rngd[355]: stats: Lowest ready-buffers level: 2
Feb 16 13:02:42 zynthian systemd[1]: Stopped target Login Prompts.
Feb 16 13:02:42 zynthian rngd[355]: stats: Entropy starvations: 0
Feb 16 13:02:42 zynthian rngd[355]: stats: Time spent starving for entropy: (min=0; avg=0.000; max=0)us
Feb 16 13:02:42 zynthian rngd[355]: Exiting...
Feb 16 13:02:42 zynthian systemd[1]: Stopping QMidiNet Service...
Feb 16 13:02:42 zynthian systemd[1]: Stopping MOD ttymidi...
Feb 16 13:02:42 zynthian killall[1218]: zynthian_gui.py: no process found
Feb 16 13:02:42 zynthian systemd[1]: Stopping dphys-swapfile - set up, mount/unmount, and delete a swap file...
Feb 16 13:02:59 zynthian systemd-modules-load[102]: Inserted module 'i2c_dev'

It seems to stop properly except these two lines maybe:

zynthian sh[1217]: /bin/sh: 1: cannot create /sys/class/backlight/*/bl_power: Directory nonexistent
zynthian killall[1218]: zynthian_gui.py: no process found

Apparently the system is mostly stopped anyway. I think I can unplug the power without damaging the sdcard.

It will be good to resolve this though…

Will you describe the steps you took to get your device to this state? What image did you flash and how? What updates did you apply, etc.

Hi @Djeremaille !

I see you are running an older SD image and updates can cause problems with it. Also, i remember to have the same problem you have with older SD images. I strongly encourage you to try the latest stable SD image:

https://os.zynthian.org/2020-09-05-zynthianos-buster-lite-armhf-1.0.0-RC3.zip

Regards!

Thanks @jofemodo . I am downloading the latest stable image at the moment. Is this the same as the 1.0.0-RC3?

Apparently not. I will download the RC3

Edit: Yes It is the same md5

Fresh flash. No updates. Just changed from v4 to v1 in the web-ui then rebooted.
Screen and encoders are working.
Long press button 4. Press Yes. Raspberry hang on the zynthian screen and don’t power off.
Maybe I have a wiring problem. I have to check that.
I give up for the moment…

Do you let go of the long press?

Yes I do

I love the Zynthians Kit 4.5. But what really annoys me: It very often does not shutdown/powerOff. At Zynthian Splash screen it shows: Error, ip: .

and goes back to gui. What can I do? Thanks for any hints…

P.S.: It is the last stable Image, downloaded November 2021