Arch Linux Image for VisionFive 2

@cwt mentioned this to me today.

If you are rust-lang fan, create this file:

cat .cargo/config.toml 
[net]
git-fetch-with-cli = true

[profile.release]
opt-level = 3
debug = false
lto = 'thin'
strip = true

[target.riscv64gc-unknown-linux-gnu]
rustflags = ["-C", "target-cpu=sifive-u74", "-C", "target-feature=+m,+a,+f,+d,+c,+zba,+zbb"]

It will help squeeze every last piece of performance generating VF2-specific binaries from your rust-lang compiler and cargo. If you haven’t tried rust, please do. It’s well worth it the investment in effort.

and

are great reference points on how to build great apps with rust.

czkawka supports many different gui sdks, and among them slint. Worth the read.

3 Likes

hello, I use the same configuration for mpv on sway, my mpv cannot play videos however.It is core dumped.What is yout environment variable, I found that the default value of WLR_RENDER_DRM_DEVICE is /dev/dri/card1, which is not a drm node.

hi,
Are you asking /etc/environment ?
Cwt_20 system default value, I haven’t changed。
I only modify the MPV configuration。
~/.config/mpv/mpv.conf

vo=gpu
gpu-api=opengl
gpu-context=wayland
spirv-compiler=shaderc
vulkan-swap-mode=fifo
vulkan-async-transfer=yes
vulkan-async-compute=yes

thanks.i forgot to correct my variable in /etc/environment changed a few mouth ago, but here is an other problem.


Did i use gpu correctlly?
@lzzhzh

我看见你的截图上有中文,所以我用中文回答你,我英文不好。我只是个普通用户,我的mpv配置是试错多,试出来的。而且我的显示器是1k屏,不如你的4k屏。如果你播放流畅就应该是GPU使用正确了吧 :grinning:
http://forum.rvspace.org/t/vf2-mpv-mkv-vlc/4101/2?u=lzzhzh

Hi,
cwt20 is bugged there is a conflict between mkinitcpio and systems when trying to upgrade the system.

The repo (not cwt) just needs to catch up the new mkinitcpio which requires systemd 255.4.

Alright thank you

The patched mesa is based on mesa 22.1.7, which is already 19 months old. Shouldn’t most of the patches applied in the pkgbuild be mostly obsolete by now, as the things they fix/add have already been fixed/added upstream?
If one were to use upstream, what would he miss out on?

cc: @sajattack

1 Like

The new kernel packages are ready, the new image should be done on Monday.

You can also use this script to update the kernel.

4 Likes

Sorry for the delay, the new image cwt21 is here Release cwt21 · cwt-vf2/archlinux-image-vf2 · GitHub.

I didn’t have time to update the post yet, will do it tonight or tomorrow.

2 Likes

I wanted to share some important updates regarding the cwt21 kernel. Previously, I had been using clang as the default compiler for the kernel since the very beginning. However, the latest version of clang (clang-17) on Arch Linux introduced some unexpected regressions. Notably, the kernel build time increased significantly—from less than 3 hours to over 4 hours.

But what concerned me the most was the impact on the performance of xxhash. When built with clang, the xxhash checksum for our btrfs slowed down to just one-third of the speed compared to the version built with gcc. Given that xxhash plays a crucial role in our system’s performance, this was a critical issue.

To address these challenges, I made the decision to rebuild the kernel using gcc instead. The result is our new image, cwt21.1, which you can find here: Release cwt21.1 · cwt-vf2/archlinux-image-vf2 · GitHub

3 Likes

talk to starfive/imagination, not my problem

1 Like
sam@ArchVF2 ~/doc$ telegram-desktop
QPainter::begin: Paint device returned engine == 0, type: 2
QWidget::render: Cannot render with an inactive painter
qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 0, colorSpace QColorSpace(), profile  QSurfaceFormat::NoProfile)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 0, colorSpace QColorSpace(), profile  QSurfaceFormat::NoProfile)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 0, colorSpace QColorSpace(), profile  QSurfaceFormat::NoProfile)
Could not initialize GLX
Aborted (core dumped)

I seem to be encountering an OPENGL error when running telegram-desktops (AUR). Is it because of my misconfiguration? Or is it that this image does not support the OPENGL driver?

1 Like

Never tried the telegram desktop client on the VF2. But the opengl stuff on VF2 is far from a working state and completness currently. So that is most probably an issue with that horrible state of opengl on the device.

hi, cwt ,look


Dual boot with a single TF card:VisionFive 2 Debian 202403 Released + Archlinux-cwt21.2,Video >>[VF2 202403工程版 + ArchLinux_cwt21.2_哔哩哔哩_bilibili]

2 Likes

My NVME install is setup exactly like that…just changing the default line prior to a reboot changes the OS.

1 Like

Anyone else tried Release cwt22-5.12.0-1 - cwt22 5.12.0-1 and have it fail to recognise the NVME device?
It boots the kernel off the NVME and then fails to generate /dev/nvme0* or load the root device.
(kernel 6.6)

1 Like

This probably doesn’t help:

[    2.518933] ------------[ cut here ]------------
[    2.518937] WARNING: CPU: 2 PID: 1 at drivers/reset/core.c:766 __reset_control_get_internal+0xd4/0x11c
[    2.518952] Modules linked in:
[    2.518958] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 6.6.20-cwt-5.12.0-1 #1
[    2.518964] Hardware name: StarFive VisionFive 2 v1.3B (DT)
[    2.518967] epc : __reset_control_get_internal+0xd4/0x11c
[    2.518972]  ra : __of_reset_control_get+0x10e/0x172
[    2.518977] epc : ffffffff805f50f0 ra : ffffffff805f5246 sp : ffffffc8000238f0
[    2.518982]  gp : ffffffff819293b0 tp : ffffffd8c0090cc0 t0 : 0000000000000000
[    2.518986]  t1 : 0000000000000000 t2 : 0000000000000002 s0 : ffffffc800023940
[    2.518989]  s1 : ffffffd8c16e0e00 a0 : ffffffd8c0cb9640 a1 : 0000000000000002
[    2.518993]  a2 : 0000000000000001 a3 : 0000000000000000 a4 : 0000000000000001
[    2.518996]  a5 : 0000000000000000 a6 : 000000000000000a a7 : 0000000000003992
[    2.518999]  s2 : 0000000000000002 s3 : ffffffd8c0cb9660 s4 : ffffffd8c0cb9640
[    2.519002]  s5 : 0000000000000000 s6 : 0000000000000001 s7 : 0000000000000000
[    2.519006]  s8 : ffffffd8c0176810 s9 : fffffffffffff000 s10: 0000000000000000
[    2.519009]  s11: 0000000000000000 t3 : ff00ffffffffffff t4 : ffffffffffffffff
[    2.519013]  t5 : ffffffff816015a0 t6 : 0000000000000040
[    2.519015] status: 0000000200000120 badaddr: 0000000000000000 cause: 0000000000000003
[    2.519020] [<ffffffff805f50f0>] __reset_control_get_internal+0xd4/0x11c
[    2.519026] [<ffffffff805f5246>] __of_reset_control_get+0x10e/0x172
[    2.519031] [<ffffffff805f52de>] __reset_control_get+0x34/0x18a
[    2.519036] [<ffffffff805f5b9a>] __reset_control_bulk_get+0x4a/0xdc
[    2.519042] [<ffffffff805f5c86>] __devm_reset_control_bulk_get+0x5a/0x9a
[    2.519047] [<ffffffff80b86e74>] stfcamss_probe+0x296/0xe92
[    2.519056] [<ffffffff8070c196>] platform_probe+0x52/0xb6
[    2.519067] [<ffffffff80709cb4>] really_probe+0x84/0x234
[    2.519073] [<ffffffff80709ec0>] __driver_probe_device+0x5c/0xdc
[    2.519080] [<ffffffff80709f6c>] driver_probe_device+0x2c/0xb2
[    2.519086] [<ffffffff8070a0ec>] __driver_attach+0x6c/0x11a
[    2.519092] [<ffffffff80707e98>] bus_for_each_dev+0x58/0xa6
[    2.519099] [<ffffffff80709706>] driver_attach+0x1a/0x22
[    2.519104] [<ffffffff80709072>] bus_add_driver+0xd0/0x1ba
[    2.519110] [<ffffffff8070ad96>] driver_register+0x40/0xda
[    2.519117] [<ffffffff8070bf3c>] __platform_driver_register+0x1e/0x26
[    2.519124] [<ffffffff80c2e4fc>] stfcamss_init+0x1a/0x22
[    2.519132] [<ffffffff800020ee>] do_one_initcall+0x36/0x1fa
[    2.519138] [<ffffffff80c014ba>] kernel_init_freeable+0x21e/0x286
[    2.519148] [<ffffffff80b8b8be>] kernel_init+0x26/0x11a
[    2.519154] [<ffffffff80b93f96>] ret_from_fork+0xe/0x1c
[    2.519161] ---[ end trace 0000000000000000 ]---
[    2.519184] [st_camss] error: Failed to get reset controls