DIY Zynthian UI issue RPI 4B

Hi guys,

I’m working on a DIY Zynthian with the following elements.

Capture d’écran 2021-01-16 181817

However when I start the PI, it boots but fails to load the UI. I get the following info from the UI log. I have no clue where to go from there. Could you guys help me with me?

– Logs begin at Sat 2021-01-16 17:11:56 GMT. –
Jan 16 17:12:38 zynthian killall[1200]: zynthian_gui.py: no process found
Jan 16 17:12:38 zynthian systemd[1]: zynthian.service: Control process exited, code=exited, status=1/FAILURE
Jan 16 17:12:38 zynthian startx[1171]: xinit: giving up
Jan 16 17:12:38 zynthian startx[1171]: xinit: unable to connect to X server: Connection refused
Jan 16 17:12:38 zynthian startx[1171]: xinit: unexpected signal 15
Jan 16 17:12:38 zynthian systemd[1]: zynthian.service: Main process exited, code=exited, status=1/FAILURE
Jan 16 17:12:38 zynthian systemd[1]: zynthian.service: Failed with result ‘exit-code’.
Jan 16 17:12:38 zynthian systemd[1]: Stopped Zynthian User Interface.
Jan 16 17:12:38 zynthian systemd[1]: Dependency failed for Zynthian User Interface.
Jan 16 17:12:38 zynthian systemd[1]: zynthian.service: Job zynthian.service/start failed with result ‘dependency’.

Hi @WaNou, welcome.
Under the ssh console, check if jackd service is running. If not, Zynthian UI won’t start.
If yes, try to launch zynthianUI by hand:
from the ssh console run: /zynthian/zynthian-ui/zynthian.sh
and send the log messages here.

Here’s what I get… Keeps on like this indefinitely

root@zynthian:~# /zynthian/zynthian-ui/zynthian.sh
/zynthian/zynthian-ui/zynthian.sh: line 55: /sys/class/backlight/*/bl_power: No such file or directory
xset: unable to open display “”
xset: unable to open display “”
xset: unable to open display “”
ERROR:zynthian_gui_config.: Failed to configure geometry => no display name and no $DISPLAY environment variable
lilv_world_load_bundle(): warning: Replacing version 2071.7 of http://gareus.org/oss/lv2/b_whirl#extended from <file:///zynthian/zynthian-plugins/lv2/b_whirl.lv2/>
lilv_world_load_bundle(): note: New version 2071.11 found in <file:///zynthian/zynthian-plugins/lv2/b_whirl/>
lilv_world_load_bundle(): warning: Replacing version 2071.7 of http://gareus.org/oss/lv2/b_whirl#simple from <file:///zynthian/zynthian-plugins/lv2/b_whirl.lv2/>
lilv_world_load_bundle(): note: New version 2071.11 found in <file:///zynthian/zynthian-plugins/lv2/b_whirl/>
lilv_world_load_bundle(): warning: Ignoring bundle <file:///zynthian/zynthian-plugins/lv2/b_synth.lv2/>
lilv_world_load_bundle(): note: Newer version of http://gareus.org/oss/lv2/b_synth loaded from <file:///zynthian/zynthian-plugins/lv2/b_synth/>
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
libjackpeak failed to start jack client: 17
: Cannot open display

If you change the audio card settings to headphone in webconf ( if it runs) does it boot then?

Yep it does boot when I turn to rpbi headphones… Damn

I could just be a missing library. You are using an IQ card which isn’t typical, and I’ve had JALV missing which halted an Audio Injector start up. maybe similar.

Okay thanks for the tip, I’m gonna have to figure out how to proceed from here. I really am a noob…

It’s mostly reading error logs . . . But doing so very precisely.

something will be bleating.

I stopped the UI and started it again through PuTTY and here’s the error log I get…

root@zynthian:~#
root@zynthian:~# systemctl stop zynthian
root@zynthian:~# zynthian.sh

X.Org X Server 1.20.4
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.15.0-99-generic armv8l Raspbian
Current Operating System: Linux zynthian 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l
Kernel command line: coherent_pool=1M 8250.nr_uarts=1 cma=64M snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1 bcm2708_fb.fbwidth=800 bcm2708_fb.fbheight=480 bcm2708_fb.fbswap=1 smsc95xx.macaddr=DC:A6:32:94:29:36 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
Build Date: 07 July 2020 09:38:51PM
xorg-server 2:1.20.4-1+rpt2 (https://www.debian.org/support)
Current version of pixman: 0.36.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (–) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: “/var/log/Xorg.0.log”, Time: Wed Jan 20 16:57:22 2021
(==) Using config directory: “/etc/X11/xorg.conf.d”
(==) Using system config directory “/usr/share/X11/xorg.conf.d”
./zynthian.sh: line 55: /sys/class/backlight/*/bl_power: No such file or directory
INFO:zynthian_gui_config.: ZYNTHIAN-UI CONFIG …
INFO:zynthian_gui_config.: No Wiring Layout configured. Only touch interface is available.
DEBUG:zynthian_gui_config.: ZYNCODER A: [0, 0, 0, 0]
DEBUG:zynthian_gui_config.: ZYNCODER B: [0, 0, 0, 0]
DEBUG:zynthian_gui_config.: SWITCHES layout: [0, 0, 0, 0]
DEBUG:zynthian_config.get_disabled_midi_in_ports: DISABLED_MIDI_IN = [’’]
DEBUG:zynthian_config.get_enabled_midi_out_ports: ENABLED_MIDI_OUT = [‘ttymidi:MIDI_out’]
DEBUG:zynthian_config.get_enabled_midi_fb_ports: ENABLED_MIDI_FB = [’’]
DEBUG:zynthian_gui_config.set_midi_config: MMC Bank Change CCNum: 0
DEBUG:zynthian_gui_config.set_midi_config: MMC Bank Change UP: None
DEBUG:zynthian_gui_config.set_midi_config: MMC Bank Change DOWN: None
DEBUG:zynthian_gui_config.set_midi_config: MMC Program Change UP: None
DEBUG:zynthian_gui_config.set_midi_config: MMC Program Change DOWN: None
lilv_world_load_bundle(): warning: Replacing version 2071.7 of http://gareus.org/oss/lv2/b_whirl#extended from <file:///zynthian/zynthian-plugins/lv2/b_whirl.lv2/>
lilv_world_load_bundle(): note: New version 2071.11 found in <file:///zynthian/zynthian-plugins/lv2/b_whirl/>
lilv_world_load_bundle(): warning: Replacing version 2071.7 of http://gareus.org/oss/lv2/b_whirl#simple from <file:///zynthian/zynthian-plugins/lv2/b_whirl.lv2/>
lilv_world_load_bundle(): note: New version 2071.11 found in <file:///zynthian/zynthian-plugins/lv2/b_whirl/>
lilv_world_load_bundle(): warning: Ignoring bundle <file:///zynthian/zynthian-plugins/lv2/b_synth.lv2/>
lilv_world_load_bundle(): note: Newer version of http://gareus.org/oss/lv2/b_synth loaded from <file:///zynthian/zynthian-plugins/lv2/b_synth/>
INFO:zynthian_gui.: STARTING ZYNTHIAN-UI …
INFO:zynthian_gui_keybinding.load: Loading key binding from keybinding.yaml
DEBUG:zynthian_gui_keybinding.load: Loading default keyboard bindings.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
libjackpeak failed to start jack client: 17
/zynthian/config/img/fb_zynthian_error_ip.png is 800x480 PNG image, color type RGB_ALPHA, 8 bit, file gamma 0.4546
PNG file: /zynthian/config/img/fb_zynthian_error_ip.png - Application must supply a known background gamma
Zooming image by 100%…done
Merging…done
didn’t find evidence of prior run.
Building XImage…done

because jackd isn’t running, zynthian ui won’t start.
what’s the output of aplay -L (through a ssh connection) ?

I tried changing the default card by changing its number by doing this:

to set the device to your default card you will need to edit the file /usr/share/alsa/alsa.conf with the command sudo nano /usr/share/alsa/alsa.conf scroll down until you find the lines

defaults.ctl.card 0
defaults.pcm.card 0

and change them to (if your device is also listed as device 1, if not change the 1 to whatever address it was listed at)

defaults.ctl.card 1
defaults.pcm.card 1

Then I went into boot/config.txt and commented out rpbi soundcard. None of these changed anything.

Here’s what I get in PuTTY with aplay -L:

root@zynthian:~# aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=b1
bcm2835 HDMI 1, bcm2835 HDMI 1
Default Audio Device
sysdefault:CARD=b1
bcm2835 HDMI 1, bcm2835 HDMI 1
Default Audio Device
dmix:CARD=b1,DEV=0
bcm2835 HDMI 1, bcm2835 HDMI 1
Direct sample mixing device
dsnoop:CARD=b1,DEV=0
bcm2835 HDMI 1, bcm2835 HDMI 1
Direct sample snooping device
hw:CARD=b1,DEV=0
bcm2835 HDMI 1, bcm2835 HDMI 1
Direct hardware device without any conversions
plughw:CARD=b1,DEV=0
bcm2835 HDMI 1, bcm2835 HDMI 1
Hardware device with all software conversions
default:CARD=Headphones
bcm2835 Headphones, bcm2835 Headphones
Default Audio Device
sysdefault:CARD=Headphones
bcm2835 Headphones, bcm2835 Headphones
Default Audio Device
dmix:CARD=Headphones,DEV=0
bcm2835 Headphones, bcm2835 Headphones
Direct sample mixing device
dsnoop:CARD=Headphones,DEV=0
bcm2835 Headphones, bcm2835 Headphones
Direct sample snooping device
hw:CARD=Headphones,DEV=0
bcm2835 Headphones, bcm2835 Headphones
Direct hardware device without any conversions
plughw:CARD=Headphones,DEV=0
bcm2835 Headphones, bcm2835 Headphones
Hardware device with all software conversions
default:CARD=IQaudIODAC
IQaudIODAC, IQaudIO DAC HiFi pcm512x-hifi-0
Default Audio Device
sysdefault:CARD=IQaudIODAC
IQaudIODAC, IQaudIO DAC HiFi pcm512x-hifi-0
Default Audio Device
dmix:CARD=IQaudIODAC,DEV=0
IQaudIODAC, IQaudIO DAC HiFi pcm512x-hifi-0
Direct sample mixing device
dsnoop:CARD=IQaudIODAC,DEV=0
IQaudIODAC, IQaudIO DAC HiFi pcm512x-hifi-0
Direct sample snooping device
hw:CARD=IQaudIODAC,DEV=0
IQaudIODAC, IQaudIO DAC HiFi pcm512x-hifi-0
Direct hardware device without any conversions
plughw:CARD=IQaudIODAC,DEV=0
IQaudIODAC, IQaudIO DAC HiFi pcm512x-hifi-0
Hardware device with all software conversions

You shouldn’t need to faff around with changing alsa.conf. aplay -l lists the audio devices. Each has a card number followed by its short name. Ensure webconf audio settings “Jackd options” includes -d alsa -d hw;CARD_NAME where CARD_NAME is the short name of the card shown in aplay -l.

For example one of my Zynthians has three audio playback devices: HDMI, headphones and a USB sound card.

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
card 2: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 3/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
card 3: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

To use the headphone output I set Jackd Options:

-P 70 -t 2000 -s -d alsa -d hw:Headphones -r 44100 -p 512 -n 3 -X raw
1 Like

You were right hw was adressed as 0 in webconf, it now works. Next step touchscreen configuration, but that’s another story. Thank you so much.

2 Likes