Live data from Hacker News

Optimizing Linux for an AMD Xiaomi/Framework Laptop

jdecourval.com

21–30 of 36 posts

Re: Optimizing Linux for an AMD Xiaomi/Framework Laptop

#21
I used to maintain a list similar to this one when I used Void and later Arch. Now I use NixOS which lets me configure these items once and forget about them. When I swapped the ssd in my laptop for a larger one, the entire post-install configuration was as simple as applying my saved configuration and getting a cup of coffee.

Excellent article though, I've integrated the parts I found interesting into my nixos config.

Re: Optimizing Linux for an AMD Xiaomi/Framework Laptop

#22
post #8

Earlier quoted context omitted.

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 l…

Yeah, there could be some useful tweaks. I started getting much better battery life on light to moderate load on my ThinkPad when I switched the AMD pstate driver to passive mode. I don't know if that has performance implications but responsivity seems fine to me.

If your Legion has a discrete GPU, that might be outside of the tweaks in the post, though.

Re: Optimizing Linux for an AMD Xiaomi/Framework Laptop

#23
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?

Not much actually does 512-byte IOs, at least not in any performance-critical way. Your OS and filesystem are probably doing most stuff in increments of 4kB, and that's the granularity the SSD is tracking allocations with, even when it is presenting the illusion of 512-byte sectors.

The flash itself probably has a page size of at least 16kB, and erase block size of several MB, but trying to align and chunk your IO to those boundaries has marginal benefits.

As long as you don't have partitions that are misaligned relative to 4kB boundaries, you're fine.

Re: Optimizing Linux for an AMD Xiaomi/Framework Laptop

#25
post #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”?

Meant to say "bugreports for which the upstream doesn't accept". But maybe I was just unlucky.

Re: Optimizing Linux for an AMD Xiaomi/Framework Laptop

#26

I used to maintain a list similar to this one when I used Void and later Arch. Now I use NixOS which lets me configure these items once and forget about them. When I swapped the ssd in my laptop for a larger one, the entire post-install configuration was as simple as applying my saved configuration and getting a cup of coffee. Excellent article though, I've integrated the parts I found interesting into my nixos confi…

Can you share your nixos config?

Re: Optimizing Linux for an AMD Xiaomi/Framework Laptop

#28
How is the state in regards to switching from integrated GPU to dedicated GPU? On my old laptop it was impossible to get it to work, it was either integrated or dedicated only, without an easy way to switch between the two. That was several years ago, so hopefully it is easier/better.

Re: Optimizing Linux for an AMD Xiaomi/Framework Laptop

#29
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.

I've found that using Pop tends to be more straight forward... the only things I've had to do is a grub option for proper touchpad support on a Lenovo laptop, and I've had to use a USB wireless or ethernet card to run updates and get the wifi working.

I'm mostly using it on my desktop, but have setup laptops for friends. Of course System76 that makes Pop sells hardware, so I'd expect them to do better than most in that space.

Re: Optimizing Linux for an AMD Xiaomi/Framework Laptop

#30
Really great article

No buyers remorse but also look at Lenovo outlet. Unclear if certified refurbished is as good as Apple's but they have "new" labeled laptops which are way cheaper than the similar ones on main lenovo.com. Don't focus on the percent off label, if I tried to buy a Thinkpad t16 gen 2 "new" from the outlet it says it's 20% off 1k=800, but if I tried to buy it from lenovo.com it starts at 1.4k base

Post reply on HN