56
submitted 11 months ago by donut4ever@lemm.ee to c/linux@lemmy.ml

So, recently, I bought an nvme ssd to replace the very old ssd I have on my laptop. I don't know what the non-nvme is called. It shows as "sda" on the system. Anyway, doubled the storage. The new drive is an nvme WD black SN770. I have the same one running just fine on an optiplex dell mini running endeavourOS. Zero issues. I like to separate home and root partitions and have btrfs on root for snapshots. So, thinking it would behave the same on the laptop, I put the new drive in the laptop and did the same partitioning. Installed Fedora this time, since I like gnome on the laptop and plasma on desktop. Everything went fine. Laptop was responsive and all until I was done and closed the lid. Came back a while later to use it again, black screen and nothing revives it. No key combo or anything works except holding down the power button to shut it off. This kept happening every single time I closed and opened the lid after a while. Thought it might be the distro/DE. Removed fedora and slapped endeavourOS with plasma on it. Same shit happens now. Black screen every time I open the lid after a suspend. So, I decided fuck it, let me juse use ext4 since it happens on every distro. Removed btrfs and used ext4 on all partions, and now this issue never happens. Not even once. Is this a known issue with btrfs and nvmes? Do they not like each other? Just wanted to share this little dilemma I had to deal with the last couple of days.

top 40 comments
sorted by: hot top controversial new old
[-] saiarcot895@programming.dev 8 points 11 months ago

Can confirm that btrfs on nvme with sleep/suspend has been working fine for me on my Framework laptop (haven't tested hibernate, though).

[-] donut4ever@lemm.ee 2 points 11 months ago

I think it starts acting up when there is nvidia in the mix. I don't think framework has nvidia, does it?

[-] Ashiette@lemmy.one 7 points 11 months ago

Do you have a swapfile >8 Gb ? that might be it.

If not, BTRFS and resume kernel parameter tend to not work well. You might want a non btrfs swapfile. You can create a separate partition or a file.

Arch and arch based distros tend not to handle hibernation without tweaks.

[-] donut4ever@lemm.ee 1 points 11 months ago

I created a 16 GB swap partition and chose "swap" in the file type when partitioning

[-] Ashiette@lemmy.one 1 points 11 months ago

Try to disable your swap. You don't need a 16Gb swap partition. If you really need to hibernate, try switching to a swapfile instead, but that can cause resume errors.

[-] AceSLS@lemmy.sdf.org 7 points 11 months ago

I'm surprised this works at all check out Suspend and Suspend on Nvidia

[-] donut4ever@lemm.ee 3 points 11 months ago

It has been working flawlessly on my desktop. That one has all Intel, though. Also, now on ext4, I have zero issues and this laptop has Nvidia. So crazy.

[-] NikkiAtNight@artemis.camp 5 points 11 months ago

I've been using a btrfs and nvme combo for almost 2 years now without any issues like that, the main difference being that I have a relatively large swap partition and am on arch linux' zen kernel

[-] donut4ever@lemm.ee 1 points 11 months ago

On a laptop? I have, too, but on a desktop. This issue only happens on the laptop

[-] floofloof@lemmy.ca 4 points 11 months ago

I use btrfs and nvme on a Dell XPS 13 and I've had no issues, so it's not a universal problem.

[-] RegalPotoo@lemmy.world 3 points 11 months ago

sda

Check your motherboard docs - depending on how things are set up, your m.2 slot might be running in SATA mode. I didn't think the sn770 supported SATA mode, but worth checking - if it is you are massively capping your performance from the drive

[-] donut4ever@lemm.ee 1 points 11 months ago

Sda was the old drive that I already removed. If has a lot of cycles and it is about to die pretty soon. The new one is nvme and shows as nvme in the system. Not sure where to change those things from sata to whatever works.

[-] RegalPotoo@lemmy.world 2 points 11 months ago

Oh, sorry, I misread your post - I thought you ment that the NVMe device was showing up as /dev/sda

[-] donut4ever@lemm.ee 1 points 11 months ago

No worries.

[-] maiskanzler@feddit.de 3 points 11 months ago

Might this just be an issue of your distro (or version) that does not hibernate well with btrfs? I know my Ubuntu 22.04 LTS fails to wake up from hibernation on btrfs right now. Coincidentally, also on an NVME.

[-] donut4ever@lemm.ee 3 points 11 months ago* (last edited 11 months ago)

I highly doubt it's a distro issue. I've tried both endeavourOS and fedora. Two totally different ~~distro~~ distros with two different DEs. Literally the same exact thing. I honestly suggest that you back up your system and switch from btrfs to ext4 and see if that works. Just to investigate.

[-] signofzeta@lemmygrad.ml 1 points 11 months ago

Interesting. Mine sometimes fails to wake up with ZFS. I wonder if automatic snapshots are the culprit.

[-] MentalEdge@sopuli.xyz 3 points 11 months ago* (last edited 11 months ago)

Hibernate/Suspend on btrfs is dodgy as fuck. Swap file or partition?

My system is currently completely incapable of recovering from suspend. The issue lies in the Nvidia driver, as it broke in a certain version, downgrading allowed it to work, but keeping the Nvidia driver on an old version quickly became a pain.

[-] donut4ever@lemm.ee 1 points 11 months ago

Swap partition. Do I need to make a swap file for it to work? Also, this happens even without Nvidia drivers installed.

[-] MentalEdge@sopuli.xyz 2 points 11 months ago

Good. Suspend with a swap file is a nightmare, and only recently even became possible with btrfs at all.

I don't know what the problem with your system in particular is, but on mine, nvidia has utterly borked suspend, and there is nothing I can do about it.

I too tried multiple distros, re-installs, nothing fixes it. It simply does not work.

[-] donut4ever@lemm.ee 2 points 11 months ago

Running ext4 on both home and root partitions fixed the issue completely for me WITH Nvidia installed and envcontrol to switch between Intel and Nvidia. The issue is gone. Poof. System is solid AF now. Btw, gnome has gotten so sexy lately. Haven't tried it in a long time.

[-] bazsy@lemmy.world 2 points 11 months ago* (last edited 11 months ago)

What did you use to manage snapshots? For e.g. timeshift enables quotas and that can cause freezes when deleting old snapshots.

[-] donut4ever@lemm.ee 2 points 11 months ago

I used timeshift. I don't remember if the freeze happened before or after I used it. The whole point of me using btrfs is to use timeshift and snapshots. I was never able to figure out snapper

[-] bazsy@lemmy.world 2 points 11 months ago

Yeah it's disappointing that such an annoying bug is still present and quotas are enabled without warnings. You could continue using Timeshift, the only feature quotas provide is the individual disk usage of the snapshots.

Anyone looking for the solution: https://www.suse.com/support/kb/doc/?id=000020696

[-] donut4ever@lemm.ee 2 points 11 months ago

Damn, where were you before I nuked the whole system and installed ext4? I mean, I can still try it since I'd only need to reinstall the system onto the root partition after changing it to btrfs. But my system now works flawlessly with no issue. Also, I hate anaconda with a passion. It never works when I manually partition and then reinstall the system on the root partition. It always creates failure. I don't know why fedora uses this ass installer. Just fucking use calameres and call it a day

[-] donut4ever@lemm.ee 1 points 11 months ago

So you really think disabling quotas would fix the freezing issue? Man, I'd love that. Btrfs/timeshift/snapshots JUST saved my ass on the desktop where an update got fucked in the middle of a kernel update and there was nothing to boot into after that. I have snapshots added to grub and I just rolled back and saved my fucking system. Now I REALLY want to try that quotas option if you think it'll fix the issue

[-] bazsy@lemmy.world 1 points 11 months ago

I'm not 100% sure, but for me it caused a similar "freezing" or unresponsive experience when the daily cleanups run in the morning. If there was a freeze after every (even short) sleep and resume that might be a different issue.

[-] donut4ever@lemm.ee 1 points 11 months ago

Man, I really hate these little vague issues. Fuck it. I'll just keep ext4. I'm going to sacrifice snapshots for my sanity. I spent like 4 days troubleshooting this shit until I found out it was btrfs. If I fuck up the system I'll just reinstall since I have the home partition separate

[-] nikoof@feddit.ro 2 points 11 months ago

I use NixOS with single-partition btrfs on both my laptop and my desktop and have never had this happen. Curious...

[-] donut4ever@lemm.ee 1 points 11 months ago

Try installing timeshift and take some snapshots

[-] RockyC@lemm.ee 2 points 11 months ago

This sounds suspiciously like a hardware issue to me. What model of computer is it and what model is the old SSD? You may need a firmware update on either the laptop or the SSD.

[-] donut4ever@lemm.ee 2 points 11 months ago

I have a dell Inspiron 7573 2 in 1. 4k screen with hybrid graphics Intel/Nvidia mx130 My laptop doesn't support LVFM on Linux. So, for the SSD I had to get into Windows and update, but it doesn't matter since I've replaced it with this one. Bios is latest since I'm able to update through a thumb drive. It's the new nvme drive that doesn't like btrfs. It's working flawlessly now on ext4. Nvidia installed and all. Zero issue. I'll be missing out on snapshots, but oh well

[-] RogerWilco@lemmy.world 2 points 11 months ago

I've not seen this particular issue, but BTRFS is a turd on NVME. It does about 2/3 to 1/2 the IOPS of EXT4 or XFS on several PCIe 3.0 and 4.0 drives I've tested on several modern AMD and Intel systems. XFS actually has the upper-hand on NVME performance over EXT4, but not by much.

[-] donut4ever@lemm.ee 1 points 10 months ago

Just wanted to report back. I've nuked the whole install, didn't partition this time. Set it up on xfs and I have zero wake after suspend issues now. It's been two days since I did that and still haven't had a single issue. Thank you for suggesting xfs. Might sound dumb, but never knew about it until you mentioned it. Lol

[-] donut4ever@lemm.ee 1 points 11 months ago

Well, thank you. That's reassuring. Is xfs available on all Linux distros? Also, does it support snapshots like btrfs? Also

BTRFS is a turd on NVME

😂

[-] RogerWilco@lemmy.world 1 points 11 months ago

Yep, XFS is pretty much universally supported and in fact even the default filesystem for Fedora Server and RHEL. No snapshots, unfortunately. XFS's "claim to fame" is scalability, performance, and stability.

[-] donut4ever@lemm.ee 1 points 11 months ago

Thank you for that. Then what would one use to back up in xfs

[-] RogerWilco@lemmy.world 1 points 11 months ago

Well, first of all, snapshots are not backups and should not be relied upon as such. They don't protect you from a gamut of risks such as filesystem corruption, hardware failures, etc.

As far as backups, basically you can take your pick. Personally I use Duplicacy to back up my workstations to my file/media server, then from there my most critical data is backed up off site to secured cloud storage.

Timeshift is another popular tool.

There are many options out there.

[-] donut4ever@lemm.ee 1 points 11 months ago

You're right, snapshots don't save you all the time like an actual back up. Yesterday I backed up the whole system to an external drive via Pika. I feel so much better about it. I do have a nas, so I might throw a copy of the back there, too. Thank you for explaining things, I really appreciate it.

[-] stikonas@lemmy.kde.social 1 points 11 months ago

While snapshots are not backups, they are very helpful when making backup because they are atomic and can also be transferred to another drive with btrfs send/receive.

this post was submitted on 08 Aug 2023
56 points (96.7% liked)

Linux

45595 readers
661 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS