Jump to content

robertoj

Members
  • Posts

    398
  • Joined

  • Last visited

Posts posted by robertoj

  1. I confirm that this repository ffmpeg works for me:

     

    * Orange Pi Zero 3

    * self built image with Debian Trixie and Xfce desktop

    * Linux Edge 6.15.0

    * Login in Xfce X11 mode

    * follow all the instructions in original post

    * mpv plays most mp4s VERY SMOOTHLY :)

    * some resolutions will crash mpv with "Segmentation Fault" and cause a kernel crash shortly after

     

    Then, to make it work with an ili9488 LCD, I needed to change these:

     

    * install LCD DTS, firmware, remove plymouth (see my ili9488 thread)

    * I can't make X11 work with my LCD driver and panel-mipi-dbi-spi recently... (still investigating why it worked before)

    * but I can make it work with labwc and sway

    * install seatd (authorization library), labwc (I only have experience with labwc) and foot (wayland terminal)

    * Choose labwc instead of xfce in lightdm login

    * from SSH session: DISPLAY=:0 foot&

    * in foot: mpv videofile.mpv

    * it plays most mp4s VERY SMOOTHLY :)

    * some resolutions will crash mpv with "Segmentation Fault" and cause a kernel crash shortly after

     

  2. Ok I was able to get the LCD working with a self built image, by copying the linux config from the armbian.com image to the build/userpatches/linux-sunxi64-edge.config

     

    :)

     

    Currently rebuilding without the successful linux config, and then I will look at the difference

    Update: I didn't find any differences and the new image without the userpatches config accepts the LCD DTS and bin file. Ok, I dont understand what was happening before.

     

    Now I am getting the same X11 error as before:

    MESA-LOADER: failed to open panel-mipi-dbi: /usr/lib/dri/panel-mipi-dbi_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)

     

    I see that this panel-mipi-dbi_dri.so is part of libgl1-mesa-dri debian package, in DEBIAN SID, but not Bookworm

    https://packages.debian.org/sid/arm64/libgl1-mesa-dri/filelist

    https://packages.debian.org/bookworm/arm64/libgl1-mesa-dri/filelist

     

    Next, when I rebuilt the armbian OS with xfce desktop, I get the same panel-mipi-dbi-spi error: can't find the bin file. I checked the config again... and it was the same

     

    Update: It was easier to build Sid minimal, and install labwc (wayland), just remember to install seatd: https://eirenicon.org/labwc-a-tutorial/

    IMG_9274.jpeg

     

    I isolated why the panel-mipi-dbi-spi can't load when I apply it in an Armbian OS with XFCE.

    xcfe requires plymouth, and plymouth does something to the uInitRd

    Spoiler
    roberto@orangepizero3:~$ sudo apt install plymouth
    Installing:                     
      plymouth
    
    Installing dependencies:
      libplymouth5
    
    Suggested packages:
      desktop-base  plymouth-themes
    
    Summary:
      Upgrading: 0, Installing: 2, Removing: 0, Not Upgrading: 0
      Download size: 254 kB
      Space needed: 1,708 kB / 58.6 GB available
    
    Continue? [Y/n] Y
    Get:1 http://deb.debian.org/debian sid/main arm64 libplymouth5 arm64 24.004.60-5 [119 kB]
    Get:2 http://deb.debian.org/debian sid/main arm64 plymouth arm64 24.004.60-5 [135 kB]
    Fetched 254 kB in 0s (900 kB/s)   
    Selecting previously unselected package libplymouth5:arm64.
    (Reading database ... 36565 files and directories currently installed.)
    Preparing to unpack .../libplymouth5_24.004.60-5_arm64.deb ...
    Unpacking libplymouth5:arm64 (24.004.60-5) ...
    Selecting previously unselected package plymouth.
    Preparing to unpack .../plymouth_24.004.60-5_arm64.deb ...
    Unpacking plymouth (24.004.60-5) ...
    Setting up libplymouth5:arm64 (24.004.60-5) ...
    Setting up plymouth (24.004.60-5) ...
    update-initramfs: Generating /boot/initrd.img-6.15.0-edge-sunxi64
    update-initramfs: Armbian: Converting to u-boot format: /boot/uInitrd-6.15.0-edge-sunxi64
    Image Name:   uInitrd
    Created:      Fri Jul  4 07:25:17 2025
    Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
    Data Size:    18504970 Bytes = 18071.26 KiB = 17.65 MiB
    Load Address: 00000000
    Entry Point:  00000000
    update-initramfs: Armbian: Symlinking /boot/uInitrd-6.15.0-edge-sunxi64 to /boot/uInitrd
    '/boot/uInitrd' -> 'uInitrd-6.15.0-edge-sunxi64'
    update-initramfs: Armbian: done.
    Processing triggers for man-db (2.13.1-1) ...
    Processing triggers for libc-bin (2.41-9) ...
    roberto@orangepizero3:~$

     

    And when I reboot immediately after installing plymouth, the SPI LCD does not start, and dmesg shows that panel-mipi-dbi-spi could not find the firmware file.

     

    Update: I realized that even before plymouth, the uinitrd does not contain the LCD firmware file... but it is doing something that prevents panel-mipi-dbi-spi from loading the file.

  3. I keep having trouble with panel-mipi-dbi-spi not finding /lib/firmware/panel-mipi-dbi-spi.bin even if it exists and it works in another Armbian and Raspberry.

     

    This happens only with the armbian OS that I compiled with default linux configuration.

     

    The armbian OS image that I downloaded from armbian.com can drive the LCD (but has other problems with X11).

     

    When I boot my image while watching the serial output, I only see "Starting kernel", then a few lines regarding udev, then the login prompt (sorry, I will be more exact when I get back home).

    I changed console=both to console=serial, in armbianEnv.txt but I still don't see more kernel or init messages while booting.

     

    How can I activate this verbose boot?

     

    Is there any chance that the /lib/firmware is not mounted and available to the kernel module in this early stage?

  4. Please someone help :)

    I can't start X11... I installed:

    sudo apt install xserver-xorg-video-fbdev openbox x11-xserver-utils xinit xserver-xorg-input-evdev

    Created this /etc/X11/xorg.conf.d/99-fbdev.conf file

    Spoiler
    Section "Device"
        Identifier "myfb"
        Driver "fbdev"
        Option "fbdev" "/dev/fb0"
    EndSection

     

     

    And tried sudo startx, then the LCD got a black screen for a fraction of a second, and I got (in my ssh session)

     

    Spoiler
    roberto@orangepizero3:~$ sudo startx
    [sudo] password for roberto: 
    
    
    X.Org X Server 1.21.1.7
    X Protocol Version 11, Revision 0
    Current Operating System: Linux orangepizero3 6.12.30-current-sunxi64 #1 SMP Thu May 22 12:29:54 UTC 2025 aarch64
    Kernel command line: root=UUID=d276f8bc-e3b7-451c-88c3-5fa736369eee rootwait rootfstype=ext4 splash=verbose console=ttyS0,115200 console=tty1 consoleblank=0 loglevel=1 ubootpart=6329069a-01 usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u   cgroup_enable=memory
    xorg-server 2:21.1.7-3+deb12u10 (https://www.debian.org/support) 
    Current version of pixman: 0.42.2
    	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: Sat Jun 28 21:30:56 2025
    (==) Using config directory: "/etc/X11/xorg.conf.d"
    (==) Using system config directory "/usr/share/X11/xorg.conf.d"
    (EE) 
    Fatal server error:
    (EE) AddScreen/ScreenInit failed for driver 0
    (EE) 
    (EE) 
    Please consult the The X.Org Foundation support 
    	 at http://wiki.x.org
     for help. 
    (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
    (EE) 
    (EE) Server terminated with error (1). Closing log file.
    ^Cxinit: giving up
    xinit: unable to connect to X server: Connection refused
    xinit: unexpected signal 2
    
    
    roberto@orangepizero3:~$ tail -40 /var/log/Xorg.0.log
    [    36.850] 	ABI class: X.Org Video Driver, version 25.2
    [    36.850] (II) FBDEV(0): using /dev/fb0
    [    36.850] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
    [    36.850] (II) FBDEV(0): Creating default Display subsection in Screen section
    	"Default Screen Section" for depth/fbbpp 24/32
    [    36.850] (==) FBDEV(0): Depth 24, (==) framebuffer bpp 32
    [    36.850] (==) FBDEV(0): RGB weight 888
    [    36.850] (==) FBDEV(0): Default visual is TrueColor
    [    36.850] (==) FBDEV(0): Using gamma correction (1.0, 1.0, 1.0)
    [    36.850] (II) FBDEV(0): hardware: panel-mipi-dbid (video memory: 450kB)
    [    36.850] (DB) xf86MergeOutputClassOptions unsupported bus type 0
    [    36.850] (**) FBDEV(0): Option "fbdev" "/dev/fb0"
    [    36.850] (II) FBDEV(0): checking modes against framebuffer device...
    [    36.850] (II) FBDEV(0): checking modes against monitor...
    [    36.850] (II) FBDEV(0): Virtual size is 480x320 (pitch 480)
    [    36.850] (**) FBDEV(0):  Built-in mode "current"
    [    36.850] (==) FBDEV(0): DPI set to (96, 96)
    [    36.850] (II) Loading sub module "fb"
    [    36.850] (II) LoadModule: "fb"
    [    36.850] (II) Module "fb" already built-in
    [    36.850] (**) FBDEV(0): using shadow framebuffer
    [    36.850] (II) Loading sub module "shadow"
    [    36.850] (II) LoadModule: "shadow"
    [    36.851] (II) Loading /usr/lib/xorg/modules/libshadow.so
    [    36.855] (II) Module shadow: vendor="X.Org Foundation"
    [    36.855] 	compiled for 1.21.1.7, module version = 1.1.0
    [    36.855] 	ABI class: X.Org ANSI C Emulation, version 0.4
    [    36.855] (EE) FBDEV(0): FBIOPUT_VSCREENINFO: Invalid argument
    [    36.855] (EE) FBDEV(0): mode initialization failed
    [    36.855] (EE) 
    Fatal server error:
    [    36.855] (EE) AddScreen/ScreenInit failed for driver 0
    [    36.855] (EE) 
    [    36.855] (EE) 
    Please consult the The X.Org Foundation support 
    	 at http://wiki.x.org
     for help. 
    [    36.855] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
    [    36.855] (EE) 
    [    37.441] (EE) Server terminated with error (1). Closing log file.

     

     

    The error message is FBIOPUT_VSCREENINFO: Invalid argument

     

    I also see that xorg wants to use 24 bit color, but my LCD is 18 bit color.

     

    I will try to get X11 working again with the linux 6.13 build folders that worked for me in april

     

    panel-mipi-dbi-spi reference:

    https://github.com/notro/panel-mipi-dbi/wiki

    https://www.kernel.org/doc/Documentation/devicetree/bindings/display/panel/panel-mipi-dbi-spi.yaml

     

    Is anyone here experienced with panel-mipi-dbi-spi? I am having problems loading the bin file again. What's weird is that sometimes the same bin file works in one Armbian version and Raspberry, but not for the Armbian version I want.

     

    Ok. Here, they say that if the LCD works in console, but not X, then it is not a kernel problem

    https://github.com/raspberrypi/linux/issues/5615

     

    This might be related:

    https://forums.raspberrypi.com/viewtopic.php?t=386528

  5. Happy to report that with a different wiring, I got the touch part working... it served me well to follow examples from the Raspberry forum

     

    Spoiler
    roberto@orangepizero3:~/ili9488$ cat ili9488-ads7846.dts 
    /dts-v1/;
    /plugin/;
    / {
        compatible = "allwinner,sun50i-h616";
        fragment@0 {
            target = <&spi1>;
            __overlay__ {
                status = "okay";
                pinctrl-names = "default"; //new for linux 6.13
                pinctrl-0 = <&spi1_pins>; //new for linux 6.13
    	    cs-gpios = <&pio 7 9 0>,<&pio 2 10 0>;  //PIN24=PH9=CS0 (default) for lcd, PIN26=PC10=CS1 for touch
                panel: panel@0 {
                    compatible = "panel-mipi-dbi-spi";
                    reg = <0>;
                    spi-max-frequency = <40000000>;
                    width-mm=<84>;
                    height-mm=<56>;
                    reset-gpios = <&pio 2 7 0>; // PIN22=PC7
                    dc-gpios = <&pio 2 14 0>; // PIN18=PC14
                    write-only;
                    format = "b6x2g6x2r6x2";
                    panel-timing {
                        hactive = <480>;
                        vactive = <320>;
                        hback-porch = <0>;
                        vback-porch = <0>;
                        clock-frequency = <0>;
                        hfront-porch = <0>;
                        hsync-len = <0>;
                        vfront-porch = <0>;
                        vsync-len = <0>;
                    };
                };
    
                ads7846: ads7846@1 {
                    compatible = "ti,ads7846";
                    reg = <1>;
                    pinctrl-names = "default";
                    spi-max-frequency = <1000000>;
                    interrupt-parent = <&pio>;
                    interrupts = <2 15 2>; /* PIN16=PC15 - IRQ */
                    pendown-gpio = <&pio 2 15 1>; /* PIN16=PC15 */
                    
                    /* OPTIONS */
                    ti,x-min = /bits/ 16 <0>;
                    ti,y-min = /bits/ 16 <0>;
    		ti,x-max = /bits/ 16 <0xFFF>;
    		ti,y-max = /bits/ 16 <0xFFF>;
                    ti,pressure-min = /bits/ 16 <0>;
                    ti,pressure-max = /bits/ 16 <0xFFF>;
                    ti,x-plate-ohms = /bits/ 16 <400>;
                    ti,swap-xy = <1>;
    	    };
            };
        };
    };

     

     

    The mipi command string is the same as the one kungfupancake github, but removing the 0x21 command. The bin file should be copied into /lib/firmware/panel-mipi-dbi-spi.bin

     

    I used the vanilla armbian image with kernel 6.12.30 (not using my custom build method of removing the arm64-dts-sun50i-h618-orangepi-zero2w-Add-missing-nodes.patch ) :)

     

    It works with all the 3.5" and 4.0" red LCDs I have (some 3.5" LCDs I have are ili9486).

  6. They are in the same pin numbers, but different GPIO

    image.thumb.png.1eab4d844ace4930e2c97c646b6b65d8.png

    Update:

    I found that I can just use both CS0 and CS1 in opiz3 normally as expected in a DTS for a SPI ili948x LCD and touch screen, as seen in my ili9488 thread.

    (PH9=CS0, PC10=CS1)

    I was having so much trouble before, but now I finally got it

     

  7. Connect to the orange pi's serial port with a usb-serial from your laptop. Make sure you connect the TX with the RX, and viceversa. The speed is 115200.

    You will see booting messages, before the login prompt.

     

    If nothing works, re-write the img to the microSD.

  8. Thank you! I will try it tomorrow.

     

    What is spi1_cs0_pin and spi1_cs1_pin equal to, in Orange Pi Zero 2W, and in Opiz3?

     

    Is it defined in the spi-spidev dtso, or in the main opiz3/opiz2w dts? I need to have it correctly in the main DTS, because the LCD driver doesn't use spidev (and it would conflict).

     

    cs0 matches the pin position in raspberry pi: pin 24.... so it would make sense if cs1 is pin 26.

     

    Reference. This is the patch that changes the opiz3/2w DTS https://forum.armbian.com/topic/50418-dont-use-kernel-61216-on-sunxi64/page/2/#findComment-216934

     

     

  9. I am glad you could do it with the orange pi zero 2w, because I also want to use a very small arm board :)

     

    I am having trouble with the red ili9488 red LCD's touch function, and if I keep having no results, I will replace with the waveshare LCD model (I wanted to have 4-inch LCD :( )

     

    What armbian and linux version did you use? If you go to the latest linux, you may need to modify the DTS a little bit (modifications are in my ili9488 thread). Warning: I use a different driver (parameter "compatible") for DRM graphics, and different drivers might need different DTS lines.

     

    Always use a different microSD for experiments, so you don't mess with your working setup :) 

     

    Does the orange pi zero 2w just need male pin headers on the 40-pin connector, and then plug the LCD on top?

  10. I just did some new experiments, trying to get touch working in ili9488 LCD v2.1

     

    Increasing or decreasing the SPI MHz in both the LCD and touch section of the DTS DONT WORK... I couldn't get touch working

     

    Next is to use a software defined SPI with spi-gpio (based on my experience in my ili9341 thread)

     

    does anybody know a Python soft spi program which can talk to ads7846/xpt2046?

     

    update: I am getting some good touch results with Raspberry, which I hope I can transfer to opiz3.

    https://forums.raspberrypi.com/viewtopic.php?t=389230

  11. I was having some trouble with newer ili9488 LCD v2.1, and I didn't have ili9488 LCD v1.1, so I decided to experiment again with ili9341 LCD v1.2.

     

    I found that this DTS https://forum.armbian.com/topic/44191-orangepi-zero-lts-ili9341-tft-lcd-and-later-orangepi-zero-3/#findComment-204672

     

    Doesn't work with the touch chip.

     

    By accident, I ran the ili9488 driver on this ili9341, and I saw garbled graphics... but the good news: touch was working. Something in the ili9488 DTS which doesn't work for the ili9488 LCD, works for ili9341.

     

    I found the difference was not in the ads7846 section, but in the spi speed for the ili9xxx part.

     

    I switched back to the ili9341 DTS (with adafruit driver), but changed the SPI speed from 24MHZ to 40MHz.... then the ili9341 DTS was working with graphics and touch again :) ALTHOUGH the graphics have some flashing pseudo-colors in some places.

     

    Maybe the 40MHZ is too much, but I re-gained touch in ili9341 LCD v1.1. I will keep doing experiments.

     

    Playing with the SPI Mhz didn't help with the ili9488

  12. That github page tells you that the in-kernel driver is better than morrownr's driver.

     

    Have you tried that first? Search for rtw88 in the /lib/modules folder

     

    Try rebuilding armbian, find rtw88 or 8812au in the linux configuration menu and activate them.

  13. I finally got time to test my new ili9488 4.0 inch LCD (red, version 2.1)... the graphic display works, but the touch doesn't

     

    I see the interrupts number increasing (with watch -n0.1 cat /proc/interrupts , focusing on the line with ads7846)

     

    I also see that some people in the arduino community short diode D1, or else the SPI second slave wont work

    https://github.com/Bodmer/TFT_eSPI/discussions/898

     

    Is anyone here working with a new SPI LCD?

     

    How could I see logs specific for the ads7846 kernel driver?

     

    update: this LCD does not have a D1 diode, and it looks like this

     

    IMG_8865.jpeg

    According to this Amazon link, this LCD board should have a flat cable through the "slot hole" near the top right.

    https://www.amazon.com/Display-Module-ILI9488-480x320-Equipped/dp/B0D92DSCMG

     

    IMG_8867.jpeg

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines