Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi v9.9.0 breaks PCIE / NVMe on Pine SOQUARTZ compute modules (perhaps more), fixed in kernel 6.13 #7370

Closed
1 task done
m00dawg opened this issue Jan 22, 2025 · 6 comments
Labels
Enhancement 💨 External bug 🐞 For bugs which are not caused by DietPi. Package update 💿 Quartz64 Solution available 🥂 Definite solution has been done
Milestone

Comments

@m00dawg
Copy link

m00dawg commented Jan 22, 2025

Creating a bug report/issue

Required Information

  • DietPi version | 9.9.0, master, MichaIng
  • Distro version | bookworm
  • Kernel version | 6.12.8
  • SBC model | Quartz64 (aarch64)
  • Power supply used | SOQUARTZ Blade / PoE (D-Link 8-port PoE+ switch)
  • SD card used | None, using MMC

Steps to reproduce

  1. Ran dietpi-update which appeared to swap out the kernel and/or may have misconfigured the CM
  2. After the upgrade, my NVMe would not be recognized and lspci didn't show any devices.
  3. dmesg contained some potential PCIe errors (https://termbin.com/sv4p)
  4. Fix: Upgrading the kernel to 6.13 seems to have the patch, but 6.13 isn't available within the repos and I have trouble rolling to a previous kernel (see below).

Expected behaviour

  1. NVMe should be recognized with LVM volumes mounting per my fstab

Actual behaviour

  1. Initially system didn't boot since I didn't have noerrors setup on the fstab for the volume. This was due to the NVMe not being there so LVM had nothing to do.

Extra details

  1. I talked about this on the Quartz64 Matrix and it seems to be related to this bug which has been fixed in Kernel 6.13
  2. I tried down-grading the kernel to 6.12.9+bpo though installing it and changing /boot/extlinux/extlinux.conf caused it not to boot.
  3. Additionally though, extlinux.conf had the wrong board type. It was /boot/rk3566-soquartz-cm4.dtb but I updated it to /boot/rk3566-soquartz-blade.dtb as that is what I am using. As I recall before the front USB didn't work but now it does so that's something to note.
  4. Finally, I tried building and installing an updated u-boot via these instructions and placing it on the boot sector (via dd) and in /boot. This did work but didn't fix the issue since it appears as though it's related to 6.12 specifically.
@m00dawg
Copy link
Author

m00dawg commented Jan 22, 2025

I was able to get PCIe working again by manually adding the line noted in this patch to my /boot/rk3566-soquartz-blade.dtb file by doing:

dtc -I dts -O dtb ~/out > rk3566-soquartz-blade.dtb
vi out (add patch)
dtc -I dts -O dtb ~/out > rk3566-soquartz-blade.dtb

Credit to dsimic on the PINE64 Matrix channel for finding the issue, kernel bug, and the fix noted above.

@m00dawg m00dawg changed the title DietPi v9.9.0 breaks PCIE / NVMe on Pine SOQUARTZ compute modules (perhaps more), fixed in kernel 6.13. DietPi v9.9.0 breaks PCIE / NVMe on Pine SOQUARTZ compute modules (perhaps more), fixed in kernel 6.13 Jan 22, 2025
@MichaIng MichaIng added External bug 🐞 For bugs which are not caused by DietPi. Package update 💿 Quartz64 labels Jan 23, 2025
@MichaIng MichaIng added this to the v9.10 milestone Jan 23, 2025
@MichaIng
Copy link
Owner

Many thanks for the report. I'll do a Linux 6.13 package build once the LTS tag as been rolled over. Should not take long.

And right, we include the CM4 device tree for the SOQuartz only, I remember it was most compatible. But makes sense that we add as well others: there is as well a SOQuartz Model A device tree, the one I actually have.

We could try to auto-detect the carrier board on first boot, and adjust the device tree automatically. Do you have an idea how to identify the Blade? I'll try to find one for the Model A carrier board.

@AnonymousMonkeyNo12
Copy link

@MichaIng

I am running a soquartz cm4 on a blade.

Also having an issue with the NVME not working.

If it helps somehow, I can get into a call and we can try to see how to detect it.

@yukijoou
Copy link

yukijoou commented Feb 8, 2025

hii,

i just ran into the same issue with my PINE64 QUARTZ64 A, and applying the DTB patch fixed it for me too!

here are detailed instructions of the steps i followed, in case somebody else has the same issue

  1. make a copy of the currently used dtb cp /boot/rk3566-quartz64-a.dtb .
  2. convert it to an editable dts file dtc -I dtb -O dts rk3566-quartz64-a.dtb > rk3566-quartz64-a.dts (you may need to install the device-tree-compiler package first!)
  3. patch the dts file: i opened rk3566-quartz64-a.dts in vim and searched for compatible = "rockchip,rk3568-naneng. then, in the 2 sections with matching text, i inserted reset-names = "phy"; under the resets =… instruction.
  4. compile the patched dts into a dtb file that can be loaded by the kernel: dtc -I dts -O dtb rk3566-quartz64-a.dts > rk3566-quartz64-a-patched.dts
  5. put it in the right place: sudo cp rk3566-quartz64-a-patched.dts /boot/
  6. edit /boot/extlinux/extlinux.conf to use this file: on the fdt /boot/… line, replace the filepath by /boot/rk3566-quartz64-a-patched.dts
  7. reboot your system :)

i hope this gets fixed soon!

@yukijoou
Copy link

yukijoou commented Feb 8, 2025

also, for SEO reasons and to make this fix more findable:

i would like to point out this applies to all arm linux distros running older kernels on rockchip-based devices!

i had the same issue on plebian linux before trying out diet pi..! quite bothersome such a major issue got into a production kernel.

@MichaIng MichaIng modified the milestones: v9.10, v9.11 Feb 9, 2025
@MichaIng
Copy link
Owner

I pushed a new kernel based on Linux 6.13.3 to our APT repository. Could you test whether it fixes NVMe support?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement 💨 External bug 🐞 For bugs which are not caused by DietPi. Package update 💿 Quartz64 Solution available 🥂 Definite solution has been done
Projects
None yet
Development

No branches or pull requests

4 participants