VisionFive 2 Debian 202405 Released

VisionFive 2 Debian Image 202405 has been released. Here are the simple release notes.
Please check the wiki page for more details:
https://rvspace.org/en/project/VisionFive2_Debian_Wiki_202405_Release
Tips :

  1. Although 4K@30fps is supported and we have improved the desktop performance, there is still frame drop issue during video playback . Thus, it is recommended to switch to 1080p60 resolution for a smooth video playback experience.
  2. Advised to update u-boot binary if booting from QSPI in order to support multi-kernel switching at bootmenu.
  3. Please avoid running apt upgrade as it will override the existing customized mesa and linux-libc-dev versions provided.
  4. This debian image contains FFmpeg, Firefox and VLC by default.
  5. Please update the SPI flash to the latest SPL/U-Boot binaries if you would like to try nvme booting (set boot mode as QSPI boot).

Image Download link :https://debian.starfivetech.com/

What’s New

  • Change default dtb to jh7110-starfive-visionfive-2-v1.3b.dtb;
  • Support multi-kernel version select at bootmenu(5.15 and 6.6 as default);
  • Fix audio device with same name on quick-settings;
  • Fix desktop setting display with blank wave issue on kernel 6.6;
  • Libcamera/apps:
    • Fix start camera session failure issue on kernel 6.6;

Known Issues

  • Chromium FFmpeg is not working;
  • NVME image occasionally has a slow boot time;
  • Qt modules qtwebengine failed to build;
  • NWjs Filesystem access APIs failed;
  • NWjs mp3 encoder failed to be detected;
  • Libcamera-raw and libcamera-vid saving 480P raw and mjpeg files will appear random stripes;
  • Libcamera has obvious noises on the full screen of the desktop;
  • Desktop UI is not very suitable for portrait screen;
  • Vulkan CTS;

What’s Next

  • Upgrade Debian snapshot to 20230612;
  • Update FireFox version;
  • Debian-Installer support - Could support both SD + eMMC boot in single image;
  • Vulkan support;
6 Likes

I installed SD card image and it’s working fine.
I installed nvme ssd image but it’s not working.
I saw the ssd image size is half oh SD card image size.
Will we have a new ssd image ?

1 Like

I downloaded the sdcard image:

  • sha256sum starfive-jh7110-202405-SD-minimal-desktop-wayland.img.bz2

  • bunzip2 starfive-jh7110-202405-SD-minimal-desktop-wayland.img.bz2

  • dd bs=4M if=./starfive-jh7110-202405-SD-minimal-desktop-wayland.img of=/dev/sda status=progress conv=fdatasync

  • sdcard booted into the gnome desktop correctly

  • scp ./install_package_and_dependencies.sh user@192.168.2.53:/home/user/Downloads/

  • ssh user@192.168.2.53

  • sudo bash

  • did passwd user to change the password

  • cd /home/user/Downloads; chmod u+x ./install_package_and_dependencies.sh;././install_package_and_dependencies.sh

  • apt-get install btop neofetch

  • rebooted

Ok after all that, I went into system monitor and checked out the memory at my disposal.
BUG REPORT it was indicating 4GB instead of 8GB.

I recall others resolving this issue long ago.
Here’s the link indicating there was a way to fix this:

Here’s the actual recipe:

I pasted the steps in case you can’t reach github.

Hi,
If anyone still experience this type of bug even with updated softwares, this is what I was adviced to do when fixed mine:

1. Decompile your source dtb:
`cd /tmp; dtc -I dtb -O dts /sys/firmware/fdt -o vf2.dts` # on system booted up, or place path to your dtb in place of `/sys/firmware/fdt`. Ignore any warnings it produces. If `dtc` tool is not installed, try installing it: `apt install device-tree-compiler` or how dtc is named in your distro. Alternatively, `dtc` from Linux kernel tree also can be used (you have to run `make menuconfig` first to produce executable).
2. Edit vf2.dts: Find section which starts with `memory@4`. Your line of interest is `reg = <0x00 0x40000000 0x01 0x00>;` or `reg = <0x00 0x40000000 0x1 0x00>;`. You shall replace it with `reg = <0x00 0x40000000 0x02 0x00>;`. Notice `0x02` and not `0x01`.
3. Compile file back: `dtc -I dts -O dtb -o /boot/dtbs/starfive/vf2.dtb vf2.dts`. Again, if no errors and only warnings, you're good to go.
4. Boot with modified `vf2.dtb`: in U-Boot prompt you might want to `setenv fdtfile starfive/vf2.dtb` followed by `saveenv`. YMMV.

It worked fine for me this way.
1 Like

A release with xwayland on GPU for x11/GLES should suit.

Neither of the ethernet ports work for me.
I have the 8GB VF2 V1.2 (100MB and 1GB ethernet) and used the micro SD image.
Went back to the March image, and ethernet works.

1 Like

OpenGL ES still not working?

I can second that. Memory is not correctly detected/used.

And in addition to that, there are only 5 assets…e.g. firmware files are missing.

Can someone try glxinfo or glxgears and report back?

There is no point to install this if the GPU is not working?

glxinfo is too big. I hit forum message max.
It put it in github gists: Starfive VisionFive 2 glxinfo and glxgears output · GitHub

apt-get install mesa-utils mesa-utils-bin

root@saratoga-vf2:/home/user/Downloads# glxgears
142 frames in 5.0 seconds = 28.351 FPS
144 frames in 5.0 seconds = 28.646 FPS
145 frames in 5.0 seconds = 28.806 FPS
144 frames in 5.0 seconds = 28.772 FPS
145 frames in 5.0 seconds = 28.806 FPS
144 frames in 5.0 seconds = 28.795 FPS
X connection to :0 broken (explicit kill or server shutdown).

Ok I’ve delved and compared the glxinfo with what’s on my laptop.

cissy@cissy-flex5-fc38sb:~/Downloads$ grep -n -H softpipe VF2_glxinfo.txt
VF2_glxinfo.txt:50: Device: softpipe (0xffffffff)
VF2_glxinfo.txt:61:OpenGL renderer string: softpipe

Here’s what it looks like on my laptop:
cissy@cissy-flex5-fc38sb:~/Downloads$ grep -n -H “Device:” AmdRyzen5_glxinfo.txt
AmdRyzen5_glxinfo.txt:53: Device: AMD Radeon Graphics (radeonsi, renoir, LLVM 17.0.6, DRM 3.57, 6.8.9-200.fc39.x86_64) (0x1636)
cissy@cissy-flex5-fc38sb:~/Downloads$ grep -n -H “OpenGL renderer string:” AmdRyzen5_glxinfo.txt
AmdRyzen5_glxinfo.txt:75:OpenGL renderer string: AMD Radeon Graphics (radeonsi, renoir, LLVM 17.0.6, DRM 3.57, 6.8.9-200.fc39.x86_64)

Bottom Line: I don’t see any VF2 hardware rendering happening yet. VF2 seems to still be using software rendering as explicitly stated with softpipe. Please correct me if I’m wrong.

Thx, has anyone tried MESA_LOADER_DRIVER_OVERRIDE with the provided driver?

Have a look at the VF2 power up serial output:

I would like to highlight:
Failed to load ‘/dtbs/starfive/jh7110-starfive-visionfive-2-v1.3b.dtb’
/dtbs/starfive: doesn’t exist (-2)

Actually further down it does load something successfully:
Retrieving file: /extlinux/extlinux.conf
1386 bytes read in 7 ms (193.4 KiB/s)
U-Boot menu
1: Debian GNU/Linux bookworm/sid 6.6.20-starfive
2: Debian GNU/Linux bookworm/sid 6.6.20-starfive (rescue target)
Retrieving file: /initrd.img-6.6.20-starfive
10402331 bytes read in 455 ms (21.8 MiB/s)
Retrieving file: /vmlinuz-6.6.20-starfive
9521399 bytes read in 417 ms (21.8 MiB/s)
Retrieving file: /dtbs/6.6.20/starfive/jh7110-starfive-visionfive-2-v1.3b.dtb
54960 bytes read in 12 ms (4.4 MiB/s)
[ 0.000000] Linux version 6.6.20-starfive (root@leo-virtual-machine) (riscv64-unknown-linux-gnu-gcc (g2ee5e430018) 12.2.0, GNU ld (GNU Binutils) 2.40.0.20230214) #1 SMP Sun May 5 22:39:25 CST 2024

1 Like

Yes, that is why the new firmware has to be flashed…but the assets list doesn’t contain them

Install the flashcp tool:

apt-get install mtd-utils

show the mtd partition table:

root@saratoga-vf2:/home/user/Downloads# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00080000 00001000 "spl"
mtd1: 00010000 00001000 "uboot-env"
mtd2: 00400000 00001000 "uboot"
mtd3: 00a00000 00001000 "reserved-data"

NOTE: mtd0 for spl, and mtd2 for uboot firmware payload.img

Now flash the stuff :slight_smile:

flashcp -v u-boot-spl.bin.normal.out /dev/mtd0
flashcp -v visionfive2_fw_payload.img /dev/mtd2

Done. Rebooting. Let’s see if glxinfo behaves differently. (edited)
Here’s the boot output after the flashcp: Starfive VisionFive2 power up serial output after the necessary flashcp · GitHub

Here’s the glxinfo after the flashcp: Starfive VisionFive2 glxinfo after flashcp · GitHub

BOTTOM LINE: I only see software rendering
Device: softpipe (0xffffffff)
Accelerated: no

Nobody said, flashing the new firmware would do anything with rendering. It fixes the memory detection and perhaps other init problems because the DTB is not correctly found if u-boot is not the current one.

1 Like

Yes after the flashcp, I do have 8GB detected and available now. Thank you for clarifying Nightwulf.

2 Likes

Among the starfive packages installed, I noticed libsdl2.

sudo apt-get install ri-li ceferino

I tried running both of these games

SDL_VIDEODRIVER=wayland ri-li
SDL_VIDEODRIVER=wayland ceferino

and neither work. I got the following error:

SDL init failure, reason is: No available video device

This article is stating that it should work:
Jan Newmarch SDL on Wayland

1 Like

That article is not about the visionfive 2 at all but about general SDL usage. That’s not applicable here because the GPU drivers for the VF2 are not in a really working state and that is the reason for it not to work.
EDIT:
I’m writing a game myself currently and that one is using SDL2 too. Well, compiled it on my VF2 and it works…slow, but it works. So that is this time not related to the GPU drivers in general.

I was also having trouble with the same problem.
By the way, today I was able to resolve the above issue and get it working from NVME.
The solution is to copy the SD’s OS partition to his NVME’s OS partition.

dd if=/dev/mmcblk1p4 of=/dev/nvme0n1p4 bs=4M status=progress

(This is a machine translation)

3 Likes

Is there any news about Vulkan or GPU acceleration? This is the only thing I’m waiting for right now.

1 Like

Not really. Open source drivers are in 6.8+ and the image as 6.6.20 has the newest kernel with the closed source driver in it (unchanged since 5.5 kernel series as far as I know).
Tho, if you look at the webgl sample page you’re getting approx. 7 fps on aquarium with the default settings (1000x1000, 500 fish). But still softpipe rendering.
My guess is, that it only will get better when the new mesa integration and the open source drivers are mature enough which, as far as I understood, is not the case yet.

3 Likes