Raspberry PI5 NVME - PCIe gen config

I recently migrated HA OS to raspi 5 with pineberrypi hatdrive (pcie gen 2&3) and nvme ssd (gen3); boot from micro sd and data disk moved to nvme ssd. I definitely notice performance improvement but want to make sure its optimally configured. From what I know raspi 5 runs at pcie 2 but can be forced in boot config to use gen 3. Is this possible with HA OS, how? How can I benchmark disk speed?

I tried to enable debugging on 22222 with no luck. So I pulled the sd card and there is no config.txt in hassos-system0 mnt/boot. Does this get moved with data disk to nvme. Do I have to move data back to sd to edit and then back to nvme?

2 Likes

Same here. Also want to know. Or maybe, am I doing this correctly.

Followed this guide to enable SSH to the Operating system.
How to enable SSH on Home Assistant OS
An then connected to it using SSH to port 22222 and the certificate I created.

Once in the OS I from this guide.
How to Set Up and Benchmark Your NVMe on the Raspberry Pi 5
Figured out that I needed to change a setting in

/boot/firmware/config.txt

And after some searching think the corresponding file in Home Assistant OS is

/mnt/boot/config.txt

So in there I appended the following at the end under the “all” stanza

dtparam=pciex1_gen=3

Then I tested a reboot and throughput using the dd command. And the results were strange.
A full reboot (timed by an automation) went from 532 sec to 525 sec, so that can be written off as no change.
Using this dd command, found here.
Test disk read and write speed?

dd if=/dev/sda of=/mnt/data/supervisor/tmp/temp.img bs=8k count=256k

I observed that throughput went from 32.6MB/s to 32.7MB/s so no change there either. I was expecting number in the tenfolds of this

Is this the wrong approach?
Or does Home Assistant OS not read the config.txt from /mnt/boot

you made it further than me. i wish we could get an official answer for this. yea, pcie gen3 can reach 3500MB/s, so should’ve seen an significant increase

1 Like

How did you get your nvme drive to show up? I cant seem to even get my nvme to show up to move my data disk?

My nvme was detected automatically. Could it be a bad ribbon? I’m assuming you tested the nvme drive. My self (if everything been tested), I would full back up ha, flash micro SD with latest ha for rpi5, restore backup during setup, and then attempt data disk migration.

I’m using Crucial P3 1TB PCIe Gen3 - CT1000P3SSD8 with Argon neo 5, and also used with Pineberry hatdrive. They both worked flawless. I’m still waiting for an easier way to force gen3 on rpi5 in haos

Hi, can you tell what username you use for the login on port 22222? I tried root and it doesn’t like that, or pi.

I have the public key setup, just not sure what credentials you’re supposed to use.

Thanks

ssh [email protected] -p 22222

see

1 Like

Hi francisp, I used the SSH 22222 add-on to place my public key, but when I try to login using the cmd you suggested it says denied.

I tried accessing with putty and it asked for a username, root didn’t work, which is where my original question came from.

I’m trying the method you have pointed towards and I’m stuck at the first hurdle… How to create a partition on a usb called CONFIG. All I can find is how to create a primary partition, using diskpart. I’ve been in disk management as well but when I right click on my usb drive most options are greyed out.

I’ll keep looking but if it’s easy and I’m just being a simpleton, I’d welcome a pointer.

Thanks

You could use this

That’s the one I mentioned, yes :+1:

1 Like

is there now a solution for this question? I would also be interested…

after SSH into HA
try this

# dd if=/dev/zero of=/mnt/data/temp.img bs=8k count=256k

my result
262144+0 records in
262144+0 records out
2147483648 bytes (2.0GB) copied, 2.226857 seconds, 919.7MB/s