Pinebook pro: nvme overheating fix

I have manjaro installed on my pinebook pro, and its great. But one major issue I am having is with the nvme drive I installed, which freezes after a few minutes. Manjaro on the rock64 seems to have the same (or similar) problem. It was suggested on the pin64 forum [1] that this is due to the kernel trying to run the drive at too high a speed. That link includes a suggested fix, but this seems to require re-compiling the kernel. So I thought I would ask here if it would be possible to include this fix in the manjaro build?

[1] NVMe-related crashes and instability, plus a solution

No, this is in the dtb, and changing this,
max-link-speed = <2>; to max-link-speed = <1>;
or commenting it out, is quite a simple change to dtb
memory timing, gpio mapping, pwm values are bloody hard,
this is not
You do have to get dtc (device tree compiler) and learn how to use it,
it’s not that hard. Getting the dts right is the hard part

Thanks. I admit I have never used the dtb.

I guess I should re-phrase my question. Wouldn’t it be helpful to all users of manjaro on the Pinebook Pro to have this set appropriately so that each user doesn’t have to do it? Maybe there are reasons not to?

We no longer patch the Pinebook Pro dts. We use what’s in mainline kernel, so best would be for someone to submit this change upstream for it to be in everyones system.

But on a more technical note. Wouldn’t that change slow down the performance of the nvme significantly?
I mean, going from 2 to 1, seems like a 50% decrease in speed.

Creating a patch to remedy this in Manjaro ARM is trivial, but I am concerned about the performance hit of this.

1 Like

It’s still a bit faster than emmc, 250MB/s for speed 1
If it stops the pcie crashing, which at a guess affects 10%,
then it seems like an adequate stop-gap,
perhaps until pcie driver is improved
And, isn’t the main reason for nvme to have more storage?
128 MB emmc seem to be in short supply

I agree. Performance isn’t really an issue when the drive hangs after 3 minutes from overheating. I (would like to) use nvme for the increased storage space. I don’t think anyone using a PBP is expecting blazing performance.

I always thought the main advantage to have nvme storage was for speed. Not size. If you want storage a USB3 external drive can be pretty large. :stuck_out_tongue:

I’ll make a patch and include it in a test kernel for people to test.

Thanks! I will be very happy to test it.

1 Like

Okay. Download this package and install it with sudo pacman -U <packagename>. Press yes to replace current kernel with this linux-rc one if asked.

Then reboot.

1 Like

what NVMe you use ? I use SABRENT Rocket NVMe m.2 2280 (512GB) i no heat problem . on pine wiki (i think) is page about tested NVMe’s

another item to carry around plus it draw more power

Hmm. Thanks for the package. While reading from the drive seems fine (I am able to copy many gigs at a time), writing gives the same result as before: the power led flashes red/green which I am pretty sure indicates kernel panic, and the system freezes. I should note that I have tried 3 or 4 different drives, several from intel, and a sabrent, all on the pine64 wiki list of drives known to work. All drives are 2tb. I have also tried another pine64 nvme adapter (I bought another of the same to make sure it wasnt the adapter), and also manjaro on a rock64 using a usb-c nvme external case, same result. And for completeness, the external case with the pinebook pro gives the same result as well.

I am all ears if anyone has any suggestions.

smartctl/gsmartcontrol, to see if it lists any errors
That the external box give same results suggests that it is not a pcie problem
Do you have a usb3 case? I mean a A plug

The nvme case has a usb-c female connector on it, and I use the usb3-A to usb-c cable that came with it.

when I reboot after a freeze during sustained writes to the nvme drive, I run

sudo smartctl -all /dev/nvme0n1p1

which returns `No Errors Logged’

Okay. So simply removing the line does not help. Will try with a reduce to 1 patch then.

Okay. I made a new package containing the suggested fix, where we change the speed from 2 to 1.

Please test and report back. :slight_smile:

1 Like

So would this patch affect internal PCIe SSDs, or just those connected via USB enclosures?

Only internal I think.

So… wouldn’t this affect the I/O speeds of people who have no current drive issues?

That was also my inquery further up the the thread. But yes, it probably would.