Failed to open starfive: /usr/lib/dri/starfive_dri.so

I created a clean debootstraped Debian image. When starting an X session, I get a strange error about a missing starfive_dri.so. The session still starts. But I’m wondering where such custom/vendor library could be declared. Is there a source or package provided by StarFive which provides this library? While there are some GPU related libraries provided here, I couldn’t find starfive_dri.so within.

root@host:~# startx

X.Org X Server 1.21.1.7
X Protocol Version 11, Revision 0
Current Operating System: Linux DietPi 5.15.102 #1 SMP Tue Mar 14 15:28:55 UTC 2023 riscv64
Kernel command line: root=PARTUUID=c3534437-01 rootfstype=ext4 rootwait earlycon console=ttyS0,115200 console=tty0 consoleblank=0 net.ifnames=0
xorg-server 2:21.1.7-1 (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: Tue Mar 14 22:40:39 2023
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
MESA-LOADER: failed to open starfive: /usr/lib/dri/starfive_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/riscv64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: starfive
^Cxinit: connection to X server lost

waiting for X server to shut down .(II) Server terminated successfully (0). Closing log file.

xinit: unexpected signal 2
root@host:~#

I interrupted the X session, as can be seen at ^C, after it was running for some minutes. Since the system is remote, I couldn’t test whether the desktop actually shows up on an attached screen. Remote team member will do that later :wink:. The /var/log/Xorg.0.log does not provide more related details.

ditto trying to run wayland

I think I got a little further copying /usr/lib/dri/pvr_dri.so from the buildroot img

2 Likes

Btw, I found the library in this archive from the StarFive Debian userspace repo: https://github.com/starfive-tech/Debian/blob/20221225T084846Z/gpu/DDK1.19-binary-xorg/IMG_GPU-xorg.tar.gz

But now I get another error:

did not find extension DRI_Mesa version 1
failed to bind extensions

Probably it tries to load an outdated Mesa version. Probably it works copying all/some of the other libraries from this archive in place as well, but I am not keen for this.

However, X11 desktops show up despite this error, even using the modesetting DDX. But some other application which uses SDL2 as graphics backend fails to start.