I am a new linux user and have limited experience with linux. Before posting here, I have tried the official guide from debian, also the instructions by chatgpt 4o. Nothing seems to get it upgraded to the newer kernel.
My current kernel:
root@NanoPi-R6S-DietPi:~# uname -r
5.10.160-legacy-rk35xx
My goal only goal is to upgrade to version 5.18 or version 6.5 to get the USB WIFI card to work.
What is the best/easiest way to do this?
Additional info: eventhough it looks like the kernel upgrade went through successfully, but when I reboot, it is still using the old kernel:
root@NanoPi-R6S-DietPi:~/linux-6.5# make install
INSTALL /boot
run-parts: executing /etc/kernel/postinst.d/dietpi-initramfs_cleanup 6.5.0 /boot/vmlinuz-6.5.0
Removing obsolete initramfs images
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 6.5.0 /boot/vmlinuz-6.5.0
update-initramfs: Generating /boot/initrd.img-6.5.0
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8125a-3.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8107e-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168fp-3.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168g-3.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168g-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8106e-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8106e-1.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8411-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8411-1.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8402-1.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168f-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168f-1.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8105e-1.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168e-3.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168e-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168e-1.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168d-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168d-1.fw for module r8169
update-initramfs: Converting to U-Boot format
Image Name: uInitrd
Created: Mon May 27 09:02:26 2024
Image Type: AArch64 Linux RAMDisk Image (gzip compressed)
Data Size: 7887132 Bytes = 7702.28 KiB = 7.52 MiB
Load Address: 00000000
Entry Point: 00000000
'/boot/uInitrd' -> 'uInitrd-6.5.0'
Thank you !
1 Like
Which USB WiFi card does not work in particular? This Armbian kernel comes with a lot of additional 3rd party drivers already. Not sure where you got the sources from, but I am quite sure those will break quite a lot of hardware features, and reduce the number of supported WiFi chips, as both: Neither has mainline Linux sane RK3588 support yet, nor has it a lot of 3rd party WiFi drivers.
@MichaIng
My card is AX1800 with Mediatek MT7961 chipset.
The card is detected by the system:
root@DietPi:~# dmesg | grep 'usb 4-1.4'
[ 5.556041] usb 4-1.4: new SuperSpeed Gen 1 USB device number 3 using xhci-hcd
[ 5.588486] usb 4-1.4: New USB device found, idVendor=0e8d, idProduct=7961, bcdDevice= 1.00
[ 5.588494] usb 4-1.4: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[ 5.588498] usb 4-1.4: Product: Wireless_Device
[ 5.588502] usb 4-1.4: Manufacturer: MediaTek Inc.
[ 5.588506] usb 4-1.4: SerialNumber: 000000000
root@DietPi:~# lsusb
Bus 004 Device 003: ID 0e8d:7961 MediaTek Inc. Wireless_Device
root@DietPi:~#
Firmware is present:
root@DietPi:~# ls /lib/firmware/mediatek/ | grep 7961
BT_RAM_CODE_MT7961_1_2_hdr.bin
WIFI_MT7961_patch_mcu_1_2_hdr.bin
WIFI_RAM_CODE_MT7961_1.bin
root@DietPi:~#
However, iw
and ip
command shows nothing:
root@DietPi:~# iw dev
root@DietPi:~#
root@DietPi:~# iw list
root@DietPi:~#
root@DietPi:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 12:88:54:f7:a9:74 brd ff:ff:ff:ff:ff:ff
altname end1
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
link/ether fa:25:0c:a3:22:df brd ff:ff:ff:ff:ff:ff
altname enP3p49s0
altname end0
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
link/ether 36:ca:bc:94:ab:50 brd ff:ff:ff:ff:ff:ff
altname enP4p65s0
root@DietPi:~#
I’m not sure what else I can check other than upgrading to the new kernel. I tried the official Debian image from FriendlyElec and the USB card can be detected and worked like a champ. However I really like the DietPi OS and wanted to run it with DietPi.
Indeed, the related kernel module/driver mt7921
was added with Linux 5.12, and not backported by Armbian (no blame, this isn’t necessarily possible or difficult to do, when it was never written/published for earlier Linux versions).
Try the vendor
branch kernel, which is Linux 6.1. I want to migrate all RK3588 boards to this kernel anyway, just did not find much time for testing it:
apt install linux-{image,dtb}-vendor-rk35xx
At best, remove all Linux 6.5 traces, and check that /boot/uInitrd
points to /boot/uInitrd-6.1.*
.
1 Like
I just tried that, it looks like the upgrade went through successfully, however, the wifi card is still not found:
root@DietPi:~# uname -r
6.1.43-vendor-rk35xx
root@DietPi:~#
root@DietPi:~#
root@DietPi:~# iw dev
root@DietPi:~#
root@DietPi:~# iw list
root@DietPi:~#
ip l
does not list it either? Has the kernel module been loaded?
lsmod
In case:
modprobe mt7921
This should actually happen automatically, but who knows. If it does not help, please show kernel errors:
dmesg -l 0,1,2,3
ip l
does not list it either?
correct, its not there either
Has the kernel module been loaded?
I’m clueless about these outputs tbh. I would appreciate it if you could help:
root@DietPi:~# lsmod
Module Size Used by
wireguard 77824 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
xt_nat 16384 0
veth 28672 0
xt_conntrack 16384 1
nft_chain_nat 16384 3
xt_MASQUERADE 16384 2
nf_nat 36864 3 xt_nat,nft_chain_nat,xt_MASQUERADE
nf_conntrack_netlink 40960 0
nf_conntrack 110592 5 xt_conntrack,nf_nat,xt_nat,nf_conntrack_netlink,xt_MASQUERADE
nf_defrag_ipv6 20480 1 nf_conntrack
nf_defrag_ipv4 16384 1 nf_conntrack
xt_addrtype 16384 2
nft_compat 20480 5
nf_tables 192512 82 nft_compat,nft_chain_nat
nfnetlink 20480 4 nft_compat,nf_conntrack_netlink,nf_tables
br_netfilter 24576 0
bridge 237568 1 br_netfilter
stp 16384 1 bridge
llc 16384 2 bridge,stp
overlay 114688 2
binfmt_misc 20480 1
panfrost 61440 0
drm_shmem_helper 20480 1 panfrost
gpu_sched 32768 1 panfrost
joydev 24576 0
input_leds 16384 0
fuse 110592 1
dm_mod 106496 0
ip_tables 28672 0
ipv6 454656 66 bridge,br_netfilter,wireguard
gpio_keys 20480 0
r8169 73728 0
root@DietPi:~#
root@DietPi:~#
root@DietPi:~#
root@DietPi:~# modprobe mt7921
modprobe: FATAL: Module mt7921 not found in directory /lib/modules/6.1.43-vendor-rk35xx
root@DietPi:~# dmesg -l 0,1,2,3
[ 0.688984] OF: fdt: Reserved memory: failed to reserve memory for node 'drm-logo@00000000': base 0x0000000000000000, size 0 MiB
[ 0.690062] OF: fdt: Reserved memory: failed to reserve memory for node 'drm-cubic-lut@00000000': base 0x0000000000000000, size 0 MiB
[ 1.862002] fiq_debugger fiq_debugger.0: error -ENXIO: IRQ fiq not found
[ 1.862016] fiq_debugger fiq_debugger.0: error -ENXIO: IRQ wakeup not found
[ 1.862026] fiq_debugger_probe: could not install nmi irq handler
[ 2.286651] rockchip-vop2 fdd90000.vop: Failed to get leakage
[ 2.286714] rockchip-vop2 fdd90000.vop: error -ENODEV: _opp_set_regulators: no regulator (vop) found
[ 2.286743] rockchip-vop2 fdd90000.vop: failed to set opp config
[ 2.286754] rockchip-vop2 fdd90000.vop: failed to init opp info
[ 2.286763] rockchip-vop2 fdd90000.vop: failed to init_opp_table
[ 2.423240] rockchip-hdptx-phy-hdmi fed60000.hdmiphy: hdptx phy pll locked!
[ 2.531579] rockchip-hdptx-phy-hdmi fed60000.hdmiphy: hdptx phy lane locked!
[ 2.731472] rockchip-hdptx-phy-hdmi fed60000.hdmiphy: hdptx phy lane locked!
[ 2.818567] rk806 spi2.0: no sleep-setting state
[ 2.818603] rk806 spi2.0: no reset-setting pinctrl state
[ 2.818632] rk806 spi2.0: no dvs-setting pinctrl state
[ 2.822259] rk_gmac-dwmac fe1c0000.ethernet: Can not read property: rx_delay.
[ 2.822295] rk_gmac-dwmac fe1c0000.ethernet: set rx_delay to 0xffffffff
[ 2.822377] rk_gmac-dwmac fe1c0000.ethernet: cannot get clock mac_clk_rx
[ 2.822412] rk_gmac-dwmac fe1c0000.ethernet: cannot get clock mac_clk_tx
[ 2.822454] rk_gmac-dwmac fe1c0000.ethernet: cannot get clock clk_mac_speed
[ 2.979332] .. rk pwm remotectl v2.0 init
[ 3.142180] cpu cpu0: Failed to get specification_serial_number
[ 3.145251] cpu cpu0: Failed to get specification_serial_number
[ 3.148322] cpu cpu0: Failed to get leakage
[ 3.160836] cpu cpu4: Failed to get specification_serial_number
[ 3.163852] cpu cpu4: Failed to get specification_serial_number
[ 3.166862] cpu cpu4: Failed to get leakage
[ 3.187778] cpu cpu6: Failed to get specification_serial_number
[ 3.190718] cpu cpu6: Failed to get specification_serial_number
[ 3.193667] cpu cpu6: Failed to get leakage
[ 3.324748] arm-scmi firmware:scmi: Failed. SCMI protocol 17 not active.
[ 3.340158] rk-crypto fe370000.crypto: invalid resource
[ 3.554681] dw-pcie fe180000.pcie: invalid resource
[ 3.560371] dw-pcie fe180000.pcie: Failed to initialize host
[ 3.572105] dw-pcie fe190000.pcie: invalid resource
[ 3.583337] dw-pcie fe190000.pcie: Failed to initialize host
[ 3.703834] mpp-iep2 fdbb0000.iep: allocate roi buffer failed
[ 3.713665] mpp_rkvdec2 fdc38100.rkvdec-core: shared_niu_a is not found!
[ 3.714949] rkvdec2_init:982: No niu aclk reset resource define
[ 3.716232] mpp_rkvdec2 fdc38100.rkvdec-core: shared_niu_h is not found!
[ 3.717517] rkvdec2_init:985: No niu hclk reset resource define
[ 3.747377] mpp_rkvdec2 fdc48100.rkvdec-core: shared_niu_a is not found!
[ 3.748609] rkvdec2_init:982: No niu aclk reset resource define
[ 3.749832] mpp_rkvdec2 fdc48100.rkvdec-core: shared_niu_h is not found!
[ 3.751059] rkvdec2_init:985: No niu hclk reset resource define
[ 3.785153] mpp_rkvenc2 fdbd0000.rkvenc-core: Failed to get leakage
[ 3.802624] mpp_rkvenc2 fdbe0000.rkvenc-core: Failed to get leakage
[ 3.851087] rockchip-dmc dmc: Failed to get specification_serial_number
[ 3.851408] rockchip-dmc dmc: Failed to get leakage
[ 3.965302] rockchip-dmc dmc: failed to get vop bandwidth to dmc rate
[ 3.965310] rockchip-dmc dmc: failed to get vop pn to msch rl
[ 3.977131] mali fb000000.gpu: Failed to get specification_serial_number
[ 3.977143] mali fb000000.gpu: Failed to get specification_serial_number
[ 3.977203] mali fb000000.gpu: Failed to get leakage
[ 3.977276] debugfs: Directory 'fb000000.gpu-mali' with parent 'vdd_gpu_s0' already present!
[ 3.978624] RKNPU fdab0000.npu: can't request region for resource [mem 0xfdab0000-0xfdabffff]
[ 3.978636] RKNPU fdab0000.npu: can't request region for resource [mem 0xfdac0000-0xfdacffff]
[ 3.978642] RKNPU fdab0000.npu: can't request region for resource [mem 0xfdad0000-0xfdadffff]
[ 3.978839] debugfs: Directory 'fb000000.gpu-mali' with parent 'vdd_gpu_s0' already present!
[ 3.978871] debugfs: File 'uA_load' in directory '/' already present!
[ 3.978876] debugfs: File 'min_uV' in directory '/' already present!
[ 3.978880] debugfs: File 'max_uV' in directory '/' already present!
[ 3.978885] debugfs: File 'constraint_flags' in directory '/' already present!
[ 3.979550] debugfs: File 'uA_load' in directory '/' already present!
[ 3.979552] debugfs: File 'min_uV' in directory '/' already present!
[ 3.979554] debugfs: File 'max_uV' in directory '/' already present!
[ 3.979556] debugfs: File 'constraint_flags' in directory '/' already present!
[ 3.981151] RKNPU fdab0000.npu: RKNPU: Failed to get specification_serial_number
[ 3.981155] RKNPU fdab0000.npu: Failed to get specification_serial_number
[ 3.981192] RKNPU fdab0000.npu: Failed to get leakage
[ 3.981215] debugfs: Directory 'fdab0000.npu-rknpu' with parent 'vdd_npu_s0' already present!
[ 4.031996] debugfs: Directory 'fdab0000.npu-rknpu' with parent 'vdd_npu_s0' already present!
[ 4.058016] debugfs: File 'uA_load' in directory '/' already present!
[ 4.058021] debugfs: File 'min_uV' in directory '/' already present!
[ 4.058024] debugfs: File 'max_uV' in directory '/' already present!
[ 4.058028] debugfs: File 'constraint_flags' in directory '/' already present!
root@DietPi:~#
Oh, it would be mt7921u
, but only the module for PCIe mt7921e
is present .
I just enabled in on our fork and triggered a rebuild: Armbian · MichaIng/DietPi@4f0cc5c · GitHub
Once this build has finished, test it with:
cd /tmp
wget https://dietpi.com/downloads/binaries/testing/linux-{image,dtb}-vendor-rk35xx.deb
dpkg -i linux-{image,dtb}-vendor-rk35xx.deb
reboot
Thanks @MichaIng it is now working!
1 Like
Great, I pushed a kernel upgrade to our APT server.
Hi, just wanted to share that I found this post and it allowed me to use this EDUP AX3000M USB 3.0 WiFi 6E Adapter on a NanoPi r6c. Thanks!
I only needed to run apt install linux-{image,dtb}-vendor-rk35xx
and reboot.
What is the downside of running this vendor
branch kernel? @MichaIng you mentioned that you want to move rockchip boards to this kernel anyway, is that still your plan?
1 Like
This kernel update is now offered to all RK3588 SBCs. If everything works well and we do not get negative reports, we will enforce it on an upcoming DietPi update, to align all systems. A good reason for this is also that the old Linux 5.10 branch is not maintained anymore, hence can bear a security risk.
I’m still running this kernel but recently Bluetooth stopped working. I get this error in dmesg:
Bluetooth: hci0: RTL: firmware file rtl_bt/rtl8761bu_fw.bin not found
Should I go back to the normal non-vendor kernel? If so, what’s the right way to do that?
Thanks!