Live data from Hacker News

Optimizing Linux for an AMD Xiaomi/Framework Laptop

jdecourval.com

11–20 of 36 posts

Re: Optimizing Linux for an AMD Xiaomi/Framework Laptop

#12

> There are a couple of good file system options, but I chose btrfs for a couple of reasons. Subvolumes work in practice, like more convenient partitions, snapshots are incredibly useful for backups (more on that later) and compression can save quite a bit of space on the not-so-big included SSD, which also reduces wear. I am also running btrfs (as the default disk partitioning on Fedora 40). I used to do regular sna…

Yes, something similar with snapshots happened to me at a previous job. That led to the filesystem getting 100% full, and with btrfs, you can not even delete files anymore if you reach that point. This specific bug has been fixed since then, but still feel that although btrfs works much better than most are saying, it's still too easy to shoot yourself in the foot.

> These days, I do snapshots only on my homeserver (which is running syncthing) but not on my laptop.

You should try btrbk one day. I had a much better experience with it than with snapper.

Re: Optimizing Linux for an AMD Xiaomi/Framework Laptop

#13
post #3

This is a pretty in-depth list of steps! I’m amazed! Yet, it makes me feel like the situation is not changing that much on Linux for laptops: most of this should be more automated IMO. An apple silicon MacBook Pro is quite a bit more expensive, but all of that has mostly been done for you and mostly “just work”, and there is value in that.

>Yet, it makes me feel like the situation is not changing that much on Linux for laptops: most of this should be more automated IMO. This is an archlinux user. You cannot automate and generalize personal opinions and settings. For 1 user that wants his screen to go down to 60Hz on battery you might have 5 who will say they can't use a computer with such a low refresh rate. A user who wants something that "just work"…

Exactly. This guide makes the computer my own. I'm always astonished when I see ArchLinux users openly praising the distro. It's great... but for people like me. I especially wouldn't recommend using it on a laptop, since skipping a few steps could mean an awful battery life, while other distro would be decent by default.

Having said that, my guide does use some advanced or very recent tricks that are not done by most distros. To which extent all of that help? Hard to say, but we are clearly in the premature, but fun, optimizations territory.

Re: Optimizing Linux for an AMD Xiaomi/Framework Laptop

#14
post #9

> By default, many modern SSDs, including the one in this laptop, report a smaller sector size than their optimal one. This is done for compatibility with Windows XP and older systems… I had never heard of this. Of course, checking on my new NVME SSD I also get the suboptimal 512 bytes. I won't do a reinstall for this, but I wonder how large the performance impact actually is?

The truth is, I realized this too late, and now I would also need to, maybe not reinstall, but at least reformat. So I have no idea what sort of impact this has, but clearly, this is not huge.

What supposedly really kills performance is if your filesystem's blocks are unaligned with the real physical sector size (4k), but most FS correctly handles this: https://wiki.archlinux.org/title/Advanced_Format#File_system...

Re: Optimizing Linux for an AMD Xiaomi/Framework Laptop

#15
post #8

Earlier quoted context omitted.

It's in-depth because it is someone's instructions for setting up Arch, not Linux. I don't need to do any of these things with Fedora or Suse.

I'm also not sure that lots of the stuff in the optimization part is actually needed or useful. A lot of it seems like micro-optimization. The author probably cares a lot about tweaking his laptop. If you want to do those steps just in case they might gain you a bit of battery life, you can do them. If you don't care about compiling your own kernel for potentially getting a 1% longer battery life, the vast majority o…

I'm not an Arch user, but I have noticed pretty poor battery life and sound volume on my Lenovo Legion laptop with every linux flavor I have tried so far.

Pop! OS, Ubuntu, Fedora, & Mint have each been tested and had similar flaws, although Fedora was the only one that automatically reconnected my bluetooth speakers on wake.

I'm going to use this post to more thoroughly examine what information I can learn about my laptop and see if I can uncover where the weaknesses are and how to resolve them.

Re: Optimizing Linux for an AMD Xiaomi/Framework Laptop

#17

He Is totally missing the GPU stuff there!

Fair point! Anything to suggest?

I only confirmed that the GPU is indeed clocking correctly, and using the appropriate power profiles. The games I tried all ran flawlessly, but I had less success with ROCm or Vulkan acceleration in Lllama.cpp.

Re: Optimizing Linux for an AMD Xiaomi/Framework Laptop

#19

Running hyprland as a systemd unit is very painful to set up and prone to crashes that upstream doesn't accept. If it's just about the logs, there's systemd-cat that can pipes stdout/err into the journal.

What do you mean by “upstream doesn’t accept”?

Re: Optimizing Linux for an AMD Xiaomi/Framework Laptop

#20

Running hyprland as a systemd unit is very painful to set up and prone to crashes that upstream doesn't accept. If it's just about the logs, there's systemd-cat that can pipes stdout/err into the journal.

Not perfect, but `systemd-cat` is indeed a very good idea. Thanks.
Post reply on HN