Another adventure with a generic spi display [Fixed]

Half a year ago I built a Zynthian inside a keytar and bought a generic spi display. I didn’t integrate it then (used mod-ui and vnc instead) but I remember I got it working on the Pi 3B+ with the terribly made script from the chinese manufacturer.

Now, I made another Zynthian with that display on the Pi 4. After running the script again and configuring the custom display in the display section, the X11 server doesn’t recognize it. A console and then the splash screen are shown, indicating the spi screen does recognize frames written to /dev/fb1. But I can’t get X11 to recognize my spi screen no matter what I try.

Datasheet of the display
Velleman, the reseller, slapped their name on it. The display itself is based on the ili9341.

What I’ve tried so far:
I followed this thread , both on a clean image and on an image tained by the poorly coded ‘driver’ (It’s not an actual driver, all it does is overwrite the boot config and change some X11 settings).

In the install script I found it writes the following to to the boot config:

I tried specifying these options in the display config section with a resolution of 480x320 and framebuffer /dev/fb1, to no avail. Wiring and audio is currently set to ‘Dummies’ to rule out any issues with that. The ui log shows that the x-server refused the connection.

I don’t really care about the touchscreen as I feel the encoders are a better way to navigate the ui. Does anyone have an idea why X11 can’t detect the display? I think there’s an incorrect config file for X11 somewhere, but doesn’t the Zynthian config take care of this? If you have any additional questions, feel free to ask them.

And thanks for all the effort you put in Zynthian.

Edit: The display works like a charm on stock Raspbian on the Pi4
Edit 2: On bootup, the Zynthian screen with ‘error’ in red is shown for a split second. Then it only shows the splash screen.

“startx &” log:

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=640 bcm2708_fb.fbheight=480 bcm2708_fb.fbswap=1 smsc95xx.macaddr=DC:A6:32:6E:CB:6D vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
Build Date: 07 July 2020 09:38:51PM
xorg-server 2:1.20.4-1+rpt2 (Debian -- User Support)
Current version of pixman: 0.36.0
Before reporting problems, check
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 Oct 21 13:08:48 2020
(==) Using config directory: “/etc/X11/xorg.conf.d”
(==) Using system config directory “/usr/share/X11/xorg.conf.d”
Fatal server error:
(EE) no screens found(EE)
Please consult the The X.Org Foundation support
for help.
(EE) Please also check the log file at “/var/log/Xorg.0.log” for additional information.
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

I fixed it!

I thought X11 was pulling configs from /etc/X11/xorg.conf.d, but it was pulling them from /usr/share/X11/xorg.conf.d instead.

In this folder I created a file ‘99-fbdev.conf’ with the following inside:

Section "Device"  
  Identifier "myfb"
  Driver "fbdev"
  Option "fbdev" "/dev/fb1"

Note: I’m still running on the image tainted by the LCD35-show script.

I found this solution here:


I was in your same situation with the touchscreen!
With that file IT WORKS without rebooting!


Which of course demands a :face_with_monocle:

99-fbdev.conf this solve all my problem!

1 Like