# Rock 5B switch to mainline kernel

**URL:** https://dietpi.com/forum/t/rock-5b-switch-to-mainline-kernel/25215
**Category:** General Discussion
**Created:** [15 May 2026 02:35 UTC](https://dietpi.com/forum/t/rock-5b-switch-to-mainline-kernel/25215 "2026-05-15T02:35:17Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![dietnoob11](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/e5b9ba/32.png) [@dietnoob11](https://dietpi.com/forum/u/dietnoob11)
#### Post date: [15 May 2026 02:35 UTC](https://dietpi.com/forum/t/rock-5b-switch-to-mainline-kernel/25215/1 "2026-05-15T02:35:17Z")

</div>

Is it recomended/safe to switch to the mainline kernel? I’m currently running 6.1.115-vendor-rk35xx on my Rock 5B.

If so, can you provide the steps needed in order to switch?

Also, will this automatically be done in some future version of Dietpi? Thanks.

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [22 May 2026 22:52 UTC](https://dietpi.com/forum/t/rock-5b-switch-to-mainline-kernel/25215/2 "2026-05-22T22:52:10Z")

</div>

Sorry for the late reply: Safe and recommended, unless you use Jellyfin (which does not support the mainline Linux VPU driver).

```sh
packages=('linux-image-current-rockchip64' 'linux-u-boot-rock-5b-current')
dpkg-query -l | grep -q '^ii[[:blank:]]*linux-headers-vendor-rk35xx[[:blank:]:]' && packages+=('linux-headers-current-rockchip64')
dpkg-query -l | grep -q '^ii[[:blank:]]*linux-libc-dev-vendor-rk35xx[[:blank:]:]' && packages+=('linux-libc-dev-current-rockchip64')
G_AGI "${packages[@]}"
G_AGP linux-{image,dtb,headers,libc-dev}-vendor-rk35xx
[[-d '/boot/dtb']] || sudo dpkg-reconfigure linux-image-current-rockchip64
/boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc
sudo sed --follow-symlinks -i 's/ttyFIQ0/ttyS2/' /boot/dietpiEnv.txt
if systemctl -q is-enabled serial-getty@ttyFIQ0
then
	/boot/dietpi/func/dietpi-set_hardware serialconsole 0 ttyFIQ0
	/boot/dietpi/func/dietpi-set_hardware serialconsole 1 ttyS2
fi

```

---

<div class="post-metadata">

### Author: ![dietnoob11](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/e5b9ba/32.png) [@dietnoob11](https://dietpi.com/forum/u/dietnoob11)
#### Post date: [23 May 2026 02:12 UTC](https://dietpi.com/forum/t/rock-5b-switch-to-mainline-kernel/25215/3 "2026-05-23T02:12:53Z")

</div>

Thank you so much for responding 😃 .

I switched to the kernel using your instructions. I have a couple questions:

1. Since I run dietpi on an nvme ssd, do I need to flash u-boot to SPI before I reboot the system?
2. I use xfce as a desktop and since the switch, I notice that everything I open is so sluggish now (file browser, terminal, chromium, etc). For context, my monitor is connected via HDMI. I’m guessing that it has something to do with the GPU. On the about page in XFCE, GPU in vendor kernel says llvmpipe and in mainline kernel it says Mali-G610.
3. How do I go back to the vendor kernel if I’m unhappy with the performance of mainline kernel (related to question #2)?
4. Am I safe from those CVE problems that the dietpi team posted about several weeks ago? I’m currently on 6.18.29-current-rockchip64

Thank you so much for your help. I love Dietpi!

Edit: I noticed something strange related to question #2. Whenever my mouse is moving, the screen is frozen (except for the mouse cursor). For example, if i’m in a text editor and hold down the letter ‘d’ while the mouse is moving, I don’t see a list of d’s, but when I let go of the mouse they all appear. If I don’t move the mouse and hold down the letter ‘d’, I see them populate like normal. Something similar happens when watching youtube videos: video is choppy when the mouse is moving but smooth when not moving. Maybe this can help you guys diagnose the problem?

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [23 May 2026 11:53 UTC](https://dietpi.com/forum/t/rock-5b-switch-to-mainline-kernel/25215/4 "2026-05-23T11:53:09Z")

</div>

> [@dietnoob11](#):
>
> 1. Since I run dietpi on an nvme ssd, do I need to flash u-boot to SPI before I reboot the system?

It wouldn’t hurt, but actually it is still the same vendor U-Boot sources.

> [@dietnoob11](#):
>
> 1. I use xfce as a desktop and since the switch, I notice that everything I open is so sluggish now (file browser, terminal, chromium, etc). For context, my monitor is connected via HDMI. I’m guessing that it has something to do with the GPU. On the about page in XFCE, GPU in vendor kernel says llvmpipe and in mainline kernel it says Mali-G610.

Do you did reboot already? The GPU driver is of course a very different one. Check whether the `panthor` driver is loaded:

```sh
lsmod

```

It does probably not perform as good as the vendor driver yet, but it shouldn’t be “sluggish” for GUI elements.

> [@dietnoob11](#):
>
> 1. How do I go back to the vendor kernel if I’m unhappy with the performance of mainline kernel (related to question #2)?

Invert above steps:

```sh
packages=('linux-image-vendor-rk35xx' 'linux-u-boot-rock-5b-vendor')
dpkg-query -l | grep -q '^ii[[:blank:]]*linux-headers-current-rockchip64[[:blank:]:]' && packages+=('linux-headers-vendor-rk35xx')
dpkg-query -l | grep -q '^ii[[:blank:]]*linux-libc-dev-current-rockchip64[[:blank:]:]' && packages+=('linux-libc-dev-vendor-rk35xx')
G_AGI "${packages[@]}"
G_AGP linux-{image,headers,libc-dev}-current-rockchip64
/boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc
sudo sed --follow-symlinks -i 's/ttyS2/ttyFIQ0/' /boot/dietpiEnv.txt
if systemctl -q is-enabled serial-getty@ttyS2
then
	/boot/dietpi/func/dietpi-set_hardware serialconsole 0 ttyS2
	/boot/dietpi/func/dietpi-set_hardware serialconsole 1 ttyFIQ0
fi

```

> [@dietnoob11](#):
>
> 1. Am I safe from those CVE problems that the dietpi team posted about several weeks ago? I’m currently on 6.18.29-current-rockchip64

Both are branches are safe in regards of Copy Fail and Dirty Frag vulnerabilities.

> [@dietnoob11](#):
>
> video is choppy when the mouse is moving but smooth when not moving. Maybe this can help you guys diagnose the problem?

Hmm, I’ll try to replicate on another RK3588 board (I do not own any from Radxa). But if it is related to the driver, there is not much we can do, aside of verifying X11 loads with modesetting and glamor.

EDIT: Actually, the vendor kernel ships with Panthor as well. Could be checked as well via `lsmod` if loaded by default, IIRC it is.

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [23 May 2026 13:15 UTC](https://dietpi.com/forum/t/rock-5b-switch-to-mainline-kernel/25215/5 "2026-05-23T13:15:27Z")

</div>

I can replicate the general issue on the Orange Pi 5 Plus, that the GUI visually freezes, while the cursor is moving, with mainline + Panthor + X11 modesetting + glamor stack. This happens on all desktop environments and LightDM, regardless how it is started (service, console, root).

Is has been mentioned in the Radxa forum [here](https://forum.radxa.com/t/rk3588-and-mainline-kernel-video-problems/30762/10), but indeed affects all RK3588 boards.

@usual-user  
As you commented on that issue, and have more knowledge than me in this context: You did not comment the freezing GUI in particular, but verified that hardware acceleration and VPU are functional, which is true, and this on Wayland. The freeze is on a different level, probably specific to X11, like cursor plane updates prevent primary framebuffer syncs 🤔. Did you ever face/test this on X11?

Worth to play with X11 settings, accelerator, page flipping, …

---

<div class="post-metadata">

### Author: ![dietnoob11](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/e5b9ba/32.png) [@dietnoob11](https://dietpi.com/forum/u/dietnoob11)
#### Post date: [23 May 2026 13:59 UTC](https://dietpi.com/forum/t/rock-5b-switch-to-mainline-kernel/25215/6 "2026-05-23T13:59:56Z")

</div>

> [@MichaIng](#):
>
> I can replicate the general issue on the Orange Pi 5 Plus, that the GUI visually freezes, while the cursor is moving, with mainline + Panthor + X11 modesetting + glamor stack. This happens on all desktop environments and LightDM, regardless how it is started (service, console, root).

> [@MichaIng](#):
>
> Worth to play with X11 settings, accelerator, page flipping, …

I’m glad to hear that I’m not the only one facing this problem. I’m not really good with linux/x11 and so I don’t really know how to change the settings to experiment. If you have time, could you do me a huge favor and tinker with them and let me know what works for you? Thank you SO much.

EDIT: I decided to switch back to vendor because the issue was unbearable for me since I use my Rock 5B as my daily driver. But I would like to switch back to mainline if the isssue gets fixed.

> [@MichaIng](#):
>
> EDIT: Actually, the vendor kernel ships with Panthor as well. Could be checked as well via `lsmod` if loaded by default, IIRC it is.

With mainline, I saw panthor loaded. With vendor, it isn’t and shows the following output. How do I load it?

Module Size Used by  
wireguard 81920 0  
libchacha20poly1305 16384 1 wireguard  
chacha\_neon 24576 1 libchacha20poly1305  
libchacha 16384 1 chacha\_neon  
poly1305\_neon 20480 1 libchacha20poly1305  
ip6\_udp\_tunnel 16384 1 wireguard  
udp\_tunnel 20480 1 wireguard  
libcurve25519\_generic 36864 1 wireguard  
binfmt\_misc 20480 1  
pwm\_fan 20480 0  
rk805\_pwrkey 16384 0  
hci\_uart 110592 0  
btqca 20480 1 hci\_uart  
btrtl 24576 1 hci\_uart  
btbcm 24576 1 hci\_uart  
btintel 36864 1 hci\_uart  
panfrost 61440 0  
drm\_shmem\_helper 20480 1 panfrost  
gpu\_sched 40960 1 panfrost  
input\_leds 16384 0  
joydev 24576 0  
fuse 118784 1  
nfnetlink 20480 1  
ip\_tables 28672 0  
x\_tables 28672 1 ip\_tables  
ipv6 462848 99 wireguard  
r8169 77824 0  
rockchip\_cpuinfo 16384 0  
uio\_pdrv\_genirq 16384 0  
uio 20480 1 uio\_pdrv\_genirq

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [24 May 2026 20:47 UTC](https://dietpi.com/forum/t/rock-5b-switch-to-mainline-kernel/25215/7 "2026-05-24T20:47:19Z")

</div>

I see now: there are two nodes: `gpu` and `gpu_panthor`. The first defines itself as bifrost, hence loads the panfrost driver, and that one is enabled by default. The second defines itself (correctly) as valhall and hence loads the panthor driver, which is patched/backported from mainline Linux.

However, the “panfrost” driver from vendor kernel is surely a very different one than the same-named driver from mainline kernel. Would be actually interesting to get impressions whether panthor performs better, and whether it introduces the same cursor blocks with vendor kernel.

There is an overlay to switch to panthor on vendor kernel: add `panthor-gpu` to the `overlays=` line in `/boot/dietpiEnv.txt`, in case separated by space if it contains another overlay already. Note that these settings much not use any quotation, as the way these are loaded would take them literally. Verify with `lsmod` that the panthor module is loaded instead of panfrost.

---

<div class="post-metadata">

### Author: ![dietnoob11](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/e5b9ba/32.png) [@dietnoob11](https://dietpi.com/forum/u/dietnoob11)
#### Post date: [25 May 2026 01:25 UTC](https://dietpi.com/forum/t/rock-5b-switch-to-mainline-kernel/25215/8 "2026-05-25T01:25:51Z")

</div>

> [@MichaIng](#):
>
> Would be actually interesting to get impressions whether panthor performs better, and whether it introduces the same cursor blocks with vendor kernel

I added panthor-gpu to overlays using vendor kernel. It’s loaded properly and works fine. No cursor blocks. Can’t speak to if it performs better… I don’t play any games on my Rock 5B.

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [26 May 2026 12:46 UTC](https://dietpi.com/forum/t/rock-5b-switch-to-mainline-kernel/25215/9 "2026-05-26T12:46:25Z")

</div>

Good to know that Panthor is not the issue in general with X11. But of course, the driver version is also a different one 1.8 in mainline vs 1.5 in vendor kernel sources … ah wait, on Linux 6.18 it is v1.5 as well. It got quite a bunch of commits since then.

If someone finds the time: the edge kernel could be tested, which would be only one commit behind master. But possible that the issue is at a different layer.

---

<div class="post-metadata">

### Author: ![dietnoob11](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/e5b9ba/32.png) [@dietnoob11](https://dietpi.com/forum/u/dietnoob11)
#### Post date: [26 May 2026 15:10 UTC](https://dietpi.com/forum/t/rock-5b-switch-to-mainline-kernel/25215/10 "2026-05-26T15:10:27Z")

</div>

Gotcha. Is it safe for me to be using vendor kernel? I use my Rock 5B for daily computing tasks and don’t want to be hacked or have my passwords stolen.

I asked google ai about it. Will this work?:

**1. Force a Software Cursor (Most Common Fix)**  
Your GPU or display server is struggling to render the hardware cursor in real-time, causing a hard freeze when the mouse moves.

- Open your X11 configuration file (e.g., `/etc/X11/xorg.conf` or a drop-in file in `/etc/X11/xorg.conf.d/`).

- In the `Section "Device"` block, add the following line:  
`Option "SWCursor" "True"`

- Save the file and restart your X session or reboot.

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [26 May 2026 18:59 UTC](https://dietpi.com/forum/t/rock-5b-switch-to-mainline-kernel/25215/11 "2026-05-26T18:59:11Z")

</div>

If there were known major security issues with the kernel, we wouldn’t ship it. Copy Fail, Dirty Frag, and Fragnesia were mitigated by removing the respective kernel modules from our builds.

Using a software cursor is one of the things I wanted to test as well. Also disabling glamor can be tested:

```auto
Option "AccelMethod" "none"

```

and disabling page flipping:

```auto
Option "PageFlip" "0"

```

---

<div class="post-metadata">

### Author: ![dietnoob11](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/e5b9ba/32.png) [@dietnoob11](https://dietpi.com/forum/u/dietnoob11)
#### Post date: [28 May 2026 03:34 UTC](https://dietpi.com/forum/t/rock-5b-switch-to-mainline-kernel/25215/12 "2026-05-28T03:34:52Z")

</div>

Thanks for the info. I’ll try it some time.

---

<div class="post-metadata">

### Author: ![dietnoob11](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/e5b9ba/32.png) [@dietnoob11](https://dietpi.com/forum/u/dietnoob11)
#### Post date: [21 September 2026 02:03 UTC](https://dietpi.com/forum/t/rock-5b-switch-to-mainline-kernel/25215/13 "2026-09-21T02:03:25Z")

</div>

> [@MichaIng](#):
>
> Using a software cursor is one of the things I wanted to test as well. Also disabling glamor can be tested:
> 
> ```auto
> Option "AccelMethod" "none"
> 
> ```
> 
> and disabling page flipping:
> 
> ```auto
> Option "PageFlip" "0"
> 
> ```

Did you end up trying these to see if it fixes the problem? I would do it on my system, but I use it as my daily driver and don’t want to screw something up.
