Librem 15v3 i/o issues on Gentoo

Has anyone had i/o controller issues with the Librem15v3? It’s some years since I’ve owned the laptop and I’ve been using Gentoo for a couple months. I’ve started suffering issues where i/o just stops during system upgrades. I’ve had my RAM and my SSDs tested and I’ve tried several different things but the hardware seems to be okay, though I can’t say anything about the motherboard (which doesn’t look like anything is wrong with it to my untrained eye).

I just get "zsh: Input/otput error: " for any command I type into the terminal (if I’m on a terminal at all). When it happens. I/O just stops and I have to do a long press to reboot. Obviously it’s not all i/o since typing works just fine. But everything other than typing does fail.

I compile programs in tmpfs. Could it be an issue where the laptop is trying to suspend to RAM but it’s too busy and i/o stops? Could it still be a hardware issue?

I took it to a repair shop and a man there said he doesn’t see anything wrong with it.

I’ve left my laptop compiling for 8+ hours before and it’s been completely fine. This is an absolutely new issue. I’m wondering if something on the board is broken or if it’s an OS thing.

Any help is appreciated.Especially if any fellow Gentoo users have seen something like this before.

Run badblocks /dev/$yoursystemdisk
i/o freezes usually happen when disk is going to die
also review smartctl -a /dev/yourharddrive

That’s what I was trying to explain that other than the forced shutdowns incurred by the i/o failure (which have added up to 13 now). The smartctl log looks good. I don’t have any bad blocks. And the disk I have the OS on is a new Samsung NVMe. The i/o failure occurs regularly during system upgrades though.

Does it only happen on Gentoo?
Maybe you can try a different kernel?

It’s started happening a month after I started using /var/tmp/portage as a tmpfs. I’ve used Gentoo before that without issues.

The trouble is in diagnosing the issue. Is it that increased i/o load has caused a silent hardware failure? Is it an OS issue?

One thing I know for certain is that it’s not the SSD itself. Without any kernel logs I’m stumped on what to do. I’ve had the RAM and the SSD tested and they look completely fine.

The main point is that i/o failure seems to be occurring when there’s not much i/o going on on the disk. The failure occurs mainly after the laptop wakes up from suspend to RAM, or when compiling on tmpfs.