Arch Linux Image for VisionFive 2

I’m waiting for the full llvm 16 packages (llvm + clang + etc.) available on the upstream https://archriscv.felixc.at/ and then I will rebuild the mesa-pvr-vf2 with the llvm 16.

Please use this command pacman -Syu --ignore gcc,gcc-*,libgccjit,llvm,llvm-libs for now.

2 Likes

Regarding mpv under the latest Starfive Debian.

I was able to get mpv to play 4K hevc files smoothly without having to use any special switches or options. The colours aren’t 100% correct and it can only decode and play 4K hevc videos @ 1080p. It got upset when I tried playing 4k or UHD videos on a 4K display.

I did not have to rebuild mpv for the hardware decoding to work under starfive Debian, I just installed the regular Debian mpv package.

@danboid I think it’s beter ignore all gcc and llvm, so the command should be:

pacman -Syu --ignore gcc,gcc-*,libgccjit,llvm,compiler-rt,llvm-*
2 Likes

Thanks cwt!

I ran that command to update all the other packages, rebooted and yet I still cannot run startx (no screens found error) or get lightdm to start as root or user ie systemctl start lightdm

It works for me. My 10-fb.conf is identical to you.
I have these 3 packages installed:

# pacman -Qs lightdm
local/lightdm 1:1.32.0-4
    A lightweight display manager
local/lightdm-gtk-greeter 1:2.0.8-3
    GTK+ greeter for LightDM
local/lightdm-gtk-greeter-settings 1.2.2-8
    Settings editor for the LightDM GTK+ Greete
1 Like

What make and model display are you using @cwt? What res are you running at? Are you booting off nvme? I doubt the boot disk type would make any difference to video.

How do you start lightdm, what command do you run as which user?

Both my 1080p and 4K displays work fine with GNOME under Starfive Debian.

I’m booting on nvme. I didn’t use a display but I have my HDMI video capture plugged in, which simulated a 1080p display then I view it on another PC using OBS. BTW, that should be fine for any 1080p HDMI display too.

My another xorg config is the keyboard setting:

# cat X11/xorg.conf.d/00-keyboard.conf 
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us,th"
        Option "XkbVariant" ",tis"
        Option "XkbOptions" "grp:win_space_toggle"
EndSection
2 Likes

use /usr/local/etc/X11/xorg.conf from the Debian image?

I haven’t had much luck with x11 yet. Only wayland and kms with gst-play on the vdec kmod stack. I only aim for working gstreamer encoding, not much more. check mpv -hwdec=auto -v to see what it is using under Debian.

What is your lightdm status after it was failed?

# systemctl status lightdm
● lightdm.service - Light Display Manager
     Loaded: loaded (/usr/lib/systemd/system/lightdm.service; disabled; preset: disabled)
     Active: active (running) since Tue 2023-09-05 12:08:04 +07; 28s ago
       Docs: man:lightdm(1)
   Main PID: 1737 (lightdm)
      Tasks: 7 (limit: 7606)
     Memory: 27.5M
        CPU: 2.180s                                                                                                                                                                   
     CGroup: /system.slice/lightdm.service                                                                                                                                            
             ├─1737 /usr/bin/lightdm                                                                                                                                                  
             ├─1745 /usr/lib/Xorg :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch                                                                             
             └─1812 lightdm --session-child 15 22                                                                                                                                     
                                                                                                                                                                                      
Sep 05 12:08:04 VF2-B systemd[1]: Starting Light Display Manager...                                                                                                                   
Sep 05 12:08:04 VF2-B systemd[1]: Started Light Display Manager.                                                                                                                      
Sep 05 12:08:04 VF2-B lightdm[1737]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts >
Sep 05 12:08:06 VF2-B lightdm[1766]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts >
Sep 05 12:08:06 VF2-B lightdm[1766]: pam_unix(lightdm-greeter:session): session opened for user lightdm(uid=967) by (uid=0)

You’re right, I hadn’t installed lightdm-gtk-greeter
and lightdm-gtk-greeter-settings. I have installed them now and rebooted but still get no picture when starting lightdm on my 1080 and on my 4K displays.

The xorg keyboard config shouldn’t stop X or wayland working.

What other GUI related packages did you install apart from lightdm?

What kernel modules should be running, if any?

I had follow the @stronnag Wayfire config Wayfire on VisionFive 2, Arch Linux, July 2023 · GitHub and also installed most (if not all) xfce4 packages.

I can even start xfce4 from the text console with startxfce4 command.

Maybe I can ssh in to get that?

I can see the Arch console and login fine on both my 1080 and 4K displays. As soon as I run systemctl start lightdm the screen goes black and then… nothing. I have to power cycle the VF2 at that point.

I had already installed xfce4, gnome, hyprland, xorg etc before I ran my first systemctl start lightdm

Yes, ssh in from another PC is always a good idea. You can check your /var/log/Xorg.*.log.

Another useful thing is USB-TTL, I always use it when I soft-brick my board from a wrong kernel config.

I’ve just noticed there was a new firmware release 4 days ago. I’m not running the latest firmware. I’m still on 3.0.4 so maybe thats why I’m having no luck.

May be, please note that my latest kernel patch now follow the MTD partition number as Starfive described in its document. So use flashcp to the same mtd0 and mtd1 as same as StarFive official Debian.

$ cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00080000 00001000 "spl"
mtd1: 00400000 00001000 "uboot"
mtd2: 00010000 00001000 "uboot-env"
mtd3: 00a00000 00001000 "reserved-data

The release notes for 3.4.5 say:

" Note:
Please do not upgrade u-boot/spl for 8GB DDR VisionFive2 since CMA will not allocated successfully under Debian image 202306;
"

Did that only apply to 3.4.5? Should I not bother updating to the latest u-boot/spi and just flash the latest main firmware?

It was effected only on the Debian-202306. If you can boot Arch, you can flash the 3.6.1 firmware and then you can boot the board with both Debian-202308 and this Arch image too.

3 Likes

leuc:

My comments about mpv were for firmware 3.0.4 and using Debian 202306. I need to update my VF2 to the latest firmware and I see there is a 202308 Debian image now so I need to try mpv again under that.

I presume we are still not able to run apt upgrade with the Debian 202308 image?

Yes,
I do the following after my Debian 202308 is initially installed to help stop me from doing anything stupid:

$ dpkg --get-selections '*' | wc -l
$ sudo apt-mark hold `dpkg --get-selections '*' | awk '{print $1}' | xargs`
1 Like