Sata ports not recognized - armbian 24.04 kernel 6.1

I am experiencing problems with sata drives being recognized.
It works on first boot and next boot no sata ports/ drives are found.
Using armbian-config >update firmware brings ports back after reboot.

I found a github issue related here

FWIW I tested a very early 6.1 kernel on my 5 ITX a while back when it started to appear and found that PCIe was not detected (hence no SATA), so I reverted to 5.10, considering that this kernel was still under active development by then.

It might be possible you’d be facing the same problem. If you can issue “lspci -nn”, it would be useful. Maybe 6.1 doesn’t support the 2x2 split for example, I don’t know.

$ lspci -nn
0001:10:00.0 PCI bridge [0604]: Rockchip Electronics Co., Ltd RK3588 [1d87:3588] (rev 01)
0001:11:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1164 Serial ATA AHCI Controller [1b21:1164] (rev 02)
0003:30:00.0 PCI bridge [0604]: Rockchip Electronics Co., Ltd RK3588 [1d87:3588] (rev 01)
0003:31:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller [10ec:8125] (rev 05)
0004:40:00.0 PCI bridge [0604]: Rockchip Electronics Co., Ltd RK3588 [1d87:3588] (rev 01)
0004:41:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller [10ec:8125] (rev 05)

1 Like

OK thanks, so at least the SATA controller is properly detected, thus the 2x2 bifurcation seems correct in this kernel. However i don’t understand why it doesn’t see your ports if it recognizes the controller :-/ Have you checked for hints in dmesg ? The SATA controller must be detected and will either indicate what it finds, or an error which justifies why it doesn’t go further. Often, “dmesg|grep -i ata” is sufficient to list most of the relevant messages (plus a few that contain “data” but you don’t care).

I had the same issue and am using 5.1 for now.

Running on Armbian.

same. changed used kernel via armbian-config.
works now

Same issue here, in dmesg I see some errors, I think those two are important:
[ 11.384685] ahci 0001:11:00.0: controller reset failed (0xffffffff)
[ 12.951128] rk-pcie fe170000.pcie: PCIe Link Fail, LTSSM is 0x3, hw_retries=0

Everyting except SATA works fine.
On some cold boots everything works fine.

@matrycy Please try again with the most recent Armbian version. This issue should be fixed for a while now

The issue is I want to use OMV and afaik bookworm is a must.

@matrycy Armbian does have many flavours like debian bookworm, ubuntu jammy / noble,…
For Rock5 ITX there is also official endorsed OMV image available at https://www.armbian.com/radxa-rock-5-itx/when you scroll down to the “Dedicated applications” section

But whats the use of OMV without disks? It is still the same armbian, bookworm, vendor provided kernel 6.1.75 under the hood. SATA drives support is random

Seems as problem isn’t fixed. ASM1164 controller can’t start properly on boot. It can be started after by removing it from kernel PCI and then rescanning. Sometimes you need to do it couple of times before it starts.

How firmware for ASM1164 is stored on this board? Seems as this controller has problems even on x86 platforms and people update firmware to the newer one

1 Like

Armbian isn’t using the raw rockchip kernel but has lots of patches on top of it to support more drivers and fix bugs etc. You can see the commit history here including the fixes for SATA https://github.com/armbian/linux-rockchip

1 Like

Does anyone have a reliable recipe for a workaround or is the answer today still “reboot until the disks are recognized”? I have tried various things such as rescanning the bus but haven’t found anything reliable. Something that could be wrapped in a shell script with some error checking and loops and run on startup from systemd would be great.

can you run uname -a and post the result?

$ uname -a
Linux rock5itx 6.1.84-vendor-rk35xx #1 SMP Tue Jan 21 00:26:37 PST 2025 aarch64 GNU/Linux

This is an Armbian system with a kernel I built to add support for a 10gbe NIC I’m using - so it’s the rk35xx vendor kernel along with Armbian’s patches. I see about 1 in 3 odds of the disks being detected each time I boot. If someone has a couple of commands that when run a few times tickle the PCIe bus so the SATA controllers are detected and drives enumerate, I’d be happy to help provide some retry logic and logging around it that runs on boot along with instructions for others.

Might be this bug which has been fixed in mainline that could be present in bsp:
https://lore.kernel.org/all/20240906082511.2963890-6-heiko@sntech.de/

I don’t know enough about clocks to patch the bsp though

New Rockchip kernel drop v6.1.99

Thanks everyone that helped to push this update up. Currently available in beta.armbian.com repository.

armbian-config -> System -> Updates -> Rolling / Stable

apt update
apt upgrade

1 Like