Moode Forum
[SOLVED] Local UI display with 3.5 inch TFT - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7)
+--- Thread: [SOLVED] Local UI display with 3.5 inch TFT (/showthread.php?tid=940)

Pages: 1 2


Local UI display with 3.5 inch TFT - Langohr - 01-25-2019

Hi there,

I'm trying to run moOde on Raspi 3B with Hifiberry AMP2 and Joy-IT 3.5" Touch Display on 16GB SDcard.
http://anleitung.joy-it.net/?goods=35-lcd-raspberry-pi

The display is only showing command line (ssh boot screen),
no moOde-local UI, no cover art....
All this UI is only visible in browser via ethernet/wifi connecting to moOde-player.

I have activated "Local UI display" and turned off HDMI port in moOde settings and according to the display manufacturer I've changed some settings:

config.txt
dtparam=spi=on
dtoverlay=joy-IT-Display_Driver-35a-overlay:rotate=270

cmdline.txt
fbcon=map:10

99-fbturbo.conf
"fbdev" "/dev/fb1"
(this file was missing, probably moOde uses Raspbian Stretch Lite)


Do I have to use pydPiper?
http://moodeaudio.org/forum/showthread.php?tid=461

Should I try portrait rotation?
http://moodeaudio.org/forum/showthread.php?tid=258
But I assume the problem is not in css


Please, can anybody give me support and point me to the right direction, I'm newbie to raspi and linux.
Many thanks in advance !


RE: Local UI display with 3.5 inch TFT - UpsiUps - 01-25-2019

I don't have attached a local display that could emulate the desktop like yours or the standard 7" display. I assume you will need to setup the display as a standard desktop display, where a browser opens full screen with the URL to localhost . Then you could use that as a local display.

The setup for the 7" starts the xinit and then a cromium Browser under the user pi ( at least that is what could read out of the source and trailing down local-ui.service etc.
So maybe that helps as a starting point to adapt and you should look to get a xinit/xstart up and runing on your system with your /dev/fb1
You will not need pydPiper as this is for Non-graphical displays where you can't start a browser.

BTW: Have you attached fbcon=... to the END of the cmdline in cmdline.txt ? And have you created /usr/share/X11/xorg.conf.d/99-calibration.conf ( including content like the manual is stating )?


RE: Local UI display with 3.5 inch TFT - Langohr - 01-26-2019

Hi UpsiUps,

thanks for the quick reply and you pointed me into the right direction. After searching and trying around for several hours I'm pretty sure that xserver is the clue.
With raspian-jessie I was able to run the TFT display as it should. But with moOde I'm receiving this error log from xinit:

[ 88.036] (==) Assigned the driver to the xf86ConfigLayout
[ 88.036] (II) LoadModule: "modesetting"
[ 88.036] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 88.037] (II) Module modesetting: vendor="X.Org Foundation"
[ 88.037] compiled for 1.19.2, module version = 1.19.2
[ 88.037] Module class: X.Org Video Driver
[ 88.037] ABI class: X.Org Video Driver, version 23.0
[ 88.037] (II) LoadModule: "fbturbo"
[ 88.037] (II) Loading /usr/lib/xorg/modules/drivers/fbturbo_drv.so
[ 88.037] (II) Module fbturbo: vendor="X.Org Foundation"
[ 88.037] compiled for 1.19.2, module version = 0.5.1
[ 88.037] Module class: X.Org Video Driver
[ 88.037] ABI class: X.Org Video Driver, version 23.0
[ 88.037] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 88.038] (II) FBTURBO: driver for framebuffer: fbturbo
[ 88.041] (WW) Falling back to old probe method for modesetting
[ 88.041] (EE) open /dev/dri/card0: No such file or directory
[ 88.041] (WW) Falling back to old probe method for fbturbo
[ 88.041] (II) Loading sub module "fbdevhw"
[ 88.041] (II) LoadModule: "fbdevhw"
[ 88.041] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[ 88.042] (II) Module fbdevhw: vendor="X.Org Foundation"
[ 88.042] compiled for 1.19.2, module version = 0.0.2
[ 88.042] ABI class: X.Org Video Driver, version 23.0
[ 88.042] (II) FBTURBO(0): using /dev/fb0
[ 88.042] (II) FBTURBO(1): using /dev/fb1
[ 88.042] (II) FBTURBO(2): using /dev/fb0
[ 88.042] (II) FBTURBO(3): using /dev/fb1
[ 88.042] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 88.042] (EE) Screen 0 deleted because of no matching config section.
[ 88.042] (II) UnloadModule: "fbturbo"
[ 88.042] (II) UnloadSubModule: "fbdevhw"
[ 88.042] (EE) Screen 0 deleted because of no matching config section.
[ 88.042] (II) UnloadModule: "fbturbo"
[ 88.042] (II) UnloadSubModule: "fbdevhw"
[ 88.042] (EE) Screen 0 deleted because of no matching config section.
[ 88.042] (II) UnloadModule: "fbturbo"
[ 88.042] (II) UnloadSubModule: "fbdevhw"
[ 88.042] (EE) Screen 0 deleted because of no matching config section.
[ 88.042] (II) UnloadModule: "fbturbo"
[ 88.042] (II) UnloadSubModule: "fbdevhw"
[ 88.042] (EE) Device(s) detected, but none match those in the config file.
[ 88.042] (EE)
Fatal server error:
[ 88.042] (EE) no screens found(EE)
[ 88.043] (EE)


I have found the missing file 99-fbturbo.conf after installing all missing fbturbo drivers and changing from fb0 to fb1, but the xserver can not find any display and stops with fatal error.
I have also followed this fantastic instructions without success:
https://rataks.com/blog/raspberry-pi-touchscreen-in-moode-with-chromium.html

-> Looks like I'm lost and need further help, please!

BTW: Yes, the cmdline is single line (I can see boot process on the 3.5" TFT). And yes I have edited 99-calibration.conf but I believe this is for touch and I will not use the touch.

Many thanks for your help


P.S. I found this for testing: "cat /dev/urandom > /dev/fb1" and it did what it should: my 3.5" display shows random pattern now but also on ssh I see error message:
cat: write error: No space left on device
Perhaps this could help


RE: Local UI display with 3.5 inch TFT - UpsiUps - 01-27-2019

Hmm, as I said - I don't know the hardware nor have I a similar system in front of me. So I only can make some guesses and a second verification.

a) So to be clear: in the cmdline.txt you added fbcon=map:10 at the end of the original line ?
a1) Have you changed form /dev/fb0 to /dev/fb1 in the 99-fb-turbo.conf ? The error messages looks like it still try to get to /dev/fb0 ?!
b) it is clear your display works ( as command line is showing , but the X11 System is not working.
c) even if you won't use the touch screen capabilities, I would recommend to follow the install instruction to also install that. Currently the manual only shows a InputDevice as your screen. So a configuration is missing to use your screen as display. Therefore I believe (Believe means " I don't know ! Big Grin )if you setup your display including the touch function, you will also install the right drivers for touch - that then will also announce display capabilities.
----
sudo apt-get install xserver-xorg-input-evdev
sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf
-----
you don't need to calibrate it , when you any how don't want to use it.
I will look into my MoOde system to understand the local X11 setup a bit better and will post more later the day. But i think the lines above will point you into a solution.

[Update] Have you tried Xorg -configure ? This is normal the first step to setup X11 and to recognise the HW. It also setups a /etc/X11/Xorg.conf that you could edit later to include the touch screen data given by the manual.


RE: Local UI display with 3.5 inch TFT - Langohr - 01-28-2019

Hi,

thanks for the proposals.
Here my answers:

> a)
yes, all in one line.

> a1)
yes, changed correctly

> b)
still my problem

> c)
I have installed everything for the touch and I also set the appropriate conf file "99-calibration.conf".
also done: sudo apt-get install xserver-xorg-input-evdev
and this too: sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf


> [Update]
I did not know about this command before, I think good idea.
Output at my system:
No devices to configure. Configuration failed.
(EE) Server terminated with error (2). Closing log file.


I found out some more details. In the downloaded joy-IT driver "joy-IT-Display_Driver-35a-overlay.dtb" I found that this display is waveshare35a.
According https://github.com/swkim01/waveshare-dtoverlays I could use other driver, so I changed /boot/config.txt from joy-IT to waveshare35a.
Result: all the same. Looks like the display driver is not the problem, but initialisation of Xorg still not correct.


RE: Local UI display with 3.5 inch TFT - UpsiUps - 01-29-2019

Can you post the /etc/X11/Xorg.conf ?


RE: Local UI display with 3.5 inch TFT - Langohr - 01-30-2019

Hi,

this is /etc/X11/Xorg.conf

btw: xinit mentioned that config is in file /etc/X11/xorg.conf
Because it might be case sensitive I copied the file to Xorg.conf:

# This is a minimal sample config file, which can be copied to
# /etc/X11/xorg.conf in order to make the Xorg server pick up
# and load xf86-video-fbturbo driver installed in the system.
#
# When troubleshooting, check /var/log/Xorg.0.log for the debugging
# output and error messages.
#
# Run "man fbturbo" to get additional information about the extra
# configuration options for tuning the driver.

Section "Device"
Identifier "Allwinner A10/A13 FBDEV"
Driver "fbturbo"
Option "fbdev" "/dev/fb1"

Option "SwapbuffersWait" "true"
EndSection



I have a suspicion: The output of dmesg | grep -iC 3 "graphics" shows:

[ 5.015471] graphics fb1: fb_ili9486 frame buffer, 480x320, 300 KiB video memory, 32 KiB buffer memory, fps=33, spi0.0 at 16 MHz

But I have no ili-display nor 480 resolution. How can I set this to the waveshare35a and 320 pixels ?
Somehow the settings are wrong.
I will make a backup from current image and start from skratch tomorrow. I have the feeling that something went terribly wrong during all this setup process and I'm lost.

Thanks again for your help!
Keep on trying.....


RE: Local UI display with 3.5 inch TFT - UpsiUps - 01-31-2019

Yeah, maybe you want to use the image from the manufacturer to see the diffrent setup-files. This might enable you to copy some of them for later use by your MoOde image.
BTW: when I run sudo Xorg -configure (with no display ) I get a kernel line lik ethe following :
Kernel command line: 8250.nr_uarts=0 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 net.ifnames=0 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=PARTUUID=7ee80803-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

The second entry is clearly a framebuffer - that might be conflicting with your /dev/fb0
But it is difficulty to debug without the same hardware. So I hope you get it up and running ! I cross my fingers for you ...


RE: Local UI display with 3.5 inch TFT - Langohr - 02-01-2019

Yeah, it works now !
I simply installed the moode-r44.img and then followed the instructions of TFT manufacturer Joy-IT, struggled again with missing file 99-fbturbo.conf (see above), found an older version of this instruction manual PDF which stated the way how to create the correct 99-fbturbo.conf file and now xinit works!
I have only one minor issue now: The display image is cut and I suspect the fb1 settings. The output of dmesg | grep -iC 3 "graphics" shows:
[ 5.014423] graphics fb1: fb_ili9486 frame buffer, 480x320, 300 KiB video memory, 32 KiB buffer memory, fps=33, spi0.0 at 16 MHz
So perhaps moOde is using this resolution on my 320x240 display and cuts 160pixels in width and 80pixels in height.
I could live with this because cover art is still visible enough.
Now I will concentrate on the next steps which are more important: Buttons !

Thanks again for all your patience and help !


RE: Local UI display with 3.5 inch TFT - UpsiUps - 07-04-2019

(03-31-2019, 06:39 PM)marcoblom Wrote: I had a similar problem with a cheap 480x320 screen.

dmesg | grep -iC 3 "graphics" gives: graphics fb1: fb_ili9486 frame buffer, 480x320, etc. .

But fbset -s gives: mode "640x480" etc. .
  
and ~/.xinitrc uses fbset -s to set the resolution:
SCREENSIZE="$(fbset -s | awk '$1 == "geometry" { print $2","$3 }')"

I edited ~/.xinitrc to become:
SCREENSIZE="480,320"

and this works :-). It also makes it work in Landscape, not Portrait (that would be "320,480").

Your screensize may be different.

Just bought also a 3,5" Touch from Joy-it and the Screensize setting was the deal ( and not mentioned in the handbook :Smile