this post was submitted on 24 Mar 2024
49 points (62.8% liked)

Linux

48129 readers
425 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
 

I have a Ryzen 3 1300X at the moment and it's always had this soft lock freezing bug on Linux. I used to dual-boot Windows on this machine and Windows never had the same problem, so I think it is an issue with the Linux kernel (I've also replaced nearly every bit of hardware that I originally built the PC with, except for the CPU and motherboard, so it probably is an issue the kernel has with my CPU, or possibly the motherboard firmware).

I've changed the kernel parameters as suggested by the Arch Wiki. The bug is pretty inconsistent about happening so only time will tell if this solves the issue. But if it doesn't solve the issue, I'd honestly consider just getting a new CPU that doesn't have this issue, as completely freezing up, unable to get to a tty or anything, and only being able to power off by physically holding down the power button, is a pretty major issue, even if it only happens sometimes.

So if I do get a new CPU, or maybe just for when I'm next buying a CPU for reasons unrelated to this bug (been considering an upgrade to something that's better for compiling anyway), are there any good options out there? Intel is investing $25 billion into Israel and the BNC has called for "divestment and exclusion" from it (it's not officially on the BDS consumer boycott list, but I'm still very much not comfortable buying from Intel). But the Arch Wiki article seems to suggest this bug is applicable to Ryzen CPUs in general, or at least it never specifies a particular model or range of models. So maybe I'm limited to non-Ryzen AMD CPUs?

I'm guessing this is one of the situations where two companies have a complete duopoly over the market and there isn't an all-round good solution, but thought I'd ask in case anyone had some useful input.

(page 2) 49 comments
sorted by: hot top controversial new old
[–] [email protected] 7 points 7 months ago (1 children)

Print your own

...in 10 years

load more comments (1 replies)
[–] [email protected] 6 points 7 months ago (1 children)

Here I was hoping we would get a breakdown on the companies making ARM processors ... Still an informative comments section.

[–] [email protected] -5 points 7 months ago (2 children)

Please keep politics out of here

[–] [email protected] 3 points 7 months ago (1 children)

For what its worth I agree with you. From my experience the idea of not being political is unpopular with lemmings

load more comments (1 replies)
[–] [email protected] 17 points 7 months ago (2 children)

Yeah, there’s nothing political about free software! Why should we have to read about people’s liberatory ideas in the linux community?

It’s absurd I tell you!

[–] [email protected] -3 points 7 months ago (3 children)

I know you are joking but I actually agree with your statement

load more comments (3 replies)
load more comments (1 replies)
[–] [email protected] 26 points 7 months ago (13 children)

This is pointless. Your tax dollars are doing MUCH more for Israel than what products you buy. Boycotts are a capitalist distraction from the real systemic issues.

load more comments (13 replies)
[–] [email protected] 100 points 7 months ago

I think if you start with political positions of bigtech companies...

Just buy used

[–] [email protected] 1 points 7 months ago (1 children)

What motherboard do you have? Also what happens exactly when the lock-ups happen? Have you ever been playing audio when the lock-ups happen and does it loop or stop or keep playing?

I recently had to "fix" (workaround) a similar issue in the OpenBSD kernel with a specific hardware peripheral on my PC (running a 2nd-gen Ryzen), the High Definition Audio controller. For whatever reason (and only when I was running OpenBSD) interrupts from the HDA controller (to let the CPU know to refill audio buffers) would just randomly stop making it to the CPU and audio would loop for a few seconds and then shut off. I spent a long time trying to figure out what causes it and reading Linux driver code but I couldn't find a cause or why only OpenBSD would trigger it. I ended up having to write kind of a hacky polling mode into the HDA driver. My only guess is some of these AMD-chipset-having motherboards have faulty interrupt controllers.

Maybe there is a similar issue with your system and timer interrupts aren't making it to your CPU or something. But I'm not really an expert on PC architecture and idek if it even works like that on PCs lol

Sorry for so many questions but do you also have any kernel logs available from when this happens?

[–] [email protected] 2 points 7 months ago (1 children)

This is my mobo

Also what happens exactly when the lock-ups happen?

Screen is frozen, doesn't respond to keyboard or mouse input, including unable to switch to a tty or kill the graphical session (I have a keybind to exit my Wayland compositor, which I launch from the tty, so when I use the keybind it sends me to the tty—that is, if my computer isn't locked up lol).

I don't remember if this has ever happened with audio playing, idk what happens to audio if it happens with audio playing.

I think I did post kernel logs to a forum way back in the day when I first got this PC and started having this issue, to no avail—at this point I'd rather just get a new CPU and save the headache and stress, especially since this is a known issue with Ryzens

[–] [email protected] 2 points 7 months ago* (last edited 7 months ago) (1 children)

I see. Our motherboards have different chipsets (I have an X570 in mine). It probably has nothing to do with my issue...

Hoping those kernel parameters fix it. I wish I could help further. PCs are just a bottomless, mostly undocumented rabbithole :(

[–] [email protected] 4 points 7 months ago

Afraid the kernel params didn't fix it. Have invested in a newer Ryzen cpu as people are saying that the first gen ones were particularly buggy so I'm hoping it's fixed in the newer ones.

[–] [email protected] 7 points 7 months ago (1 children)

I never managed to fix this bug with my first gen Ryzens. Worth upgrading to something newer for sure.

[–] [email protected] 5 points 7 months ago (1 children)

Ah. I'm getting this answer a lot actually. I might try a newer Ryzen then if a lot of people are saying the newer Ryzens work

[–] [email protected] 9 points 7 months ago

Newer ryzens are better, especially because they get frequent updates to their microcode that fixes a lot of the issues you're experiencing.

[–] [email protected] 6 points 7 months ago

I have this same bug on the same platform! It was infuriating to track down. I was able to get around this by disabling c-states in the bios. I've heard that updating your aesga firmware also helps, but I can not confirm that.

[–] [email protected] 33 points 7 months ago (3 children)

I've heard that newer Ryzens play nicer with Linux.

[–] [email protected] 2 points 7 months ago (2 children)

I have a 3600X and haven't had any problems under Linux.

load more comments (2 replies)
[–] [email protected] 7 points 7 months ago (2 children)

Yeah First Gen Ryzens definitely had a Linux lock up bug. My x1700 had it all the time and could never fix it.

[–] [email protected] 3 points 7 months ago

I experienced that issue, AMD replaced it for free for me. Still rocking that R7 1700 to this day, still going to strong!

[–] [email protected] 1 points 7 months ago (7 children)

Do you know if it's limited to first gen Ryzens? I'm looking into getting a Ryzen 5 5600X and I want to be sure I'm not gonna have the same issue

[–] [email protected] 5 points 7 months ago

My Ryzen 9 5900X has none of these issues.

[–] [email protected] 1 points 7 months ago

Never experienced or even heard of Steam Deck having that bug and that's a somewhat recent Ryzen.

[–] [email protected] 10 points 7 months ago (2 children)

Yes, AMD was replacing Ryzens that had that bug. I'm not sure if they are anymore though. But it's 100% a confirmed thing. I have not heard anything Zen 2 and newer having this problem and have no experienced any Linux issues with my 3000, 5000 and 7000 series CPUs.

load more comments (2 replies)
load more comments (4 replies)
[–] [email protected] 10 points 7 months ago* (last edited 7 months ago)

Yeah, my 5800X3D works perfectly; absolutely zero issues. I'm guessing it's making use of the 3DvCache too since I don't notice any performance degredations compared to Windows.

[–] [email protected] 5 points 7 months ago* (last edited 7 months ago)

I had a similar problem with a Ryzen 5 1600, at first it worked flawlessly when I did a manual OC, then when I made a reset, I didn't care to OC again, and it began to occasionally freeze, usually when idle. When I made my manual OC again including upping voltages a bit for CPU and RAM it worked flawlessly again???

Weird since motherboard defaults aught to be stable IMO, but apparently they aren't always.

I've been using this CPU for 7 years now, and it still runs like a champ, as long as I don't use the motherboard defaults. I can't remember last time it crashed or froze.

EDIT:

I just found out the package "disable-c6-systemd" mentioned in your link, is exactly to prevent voltage drop below 1v at idle, which sounds exactly like the bug I had. which is funny to learn 7 years later. ;)

[–] [email protected] 1 points 7 months ago

I appreciate you raising this question, thank you.

[–] [email protected] 16 points 7 months ago* (last edited 7 months ago) (2 children)

I have a system with a Ryzen 1700 with the same issue and have found the only reliable way to run it is by installing and enabling the disable-c6-systemd package from the AUR. The other fixes provided in the wiki article you linked are correct but aren't sufficient on my system, the CPU keeps reenabling the C6 state on its own and the disable-c6-systemd package works to counter that. The reason it works on Windows is they've disabled the C6 state by default for the CPU.

[–] [email protected] 5 points 7 months ago* (last edited 7 months ago) (1 children)

Ah, thanks. I'm using runit not systemd (although this was happening on systemd when I was on systemd too) but I saw amd-disable-c6 in the AUR so I've installed that now, fingers crossed it works (the fixes in the Arch Wiki article haven't fixed it for me, it just happened again rip)

Edit: nvm, looks like that package is a systemd service

[–] [email protected] 8 points 7 months ago* (last edited 7 months ago) (1 children)

The package is just a systemd unit to run the command python zenstates --c6-disable so if you install the zenstates-git package and get runit to run that command at startup it would be equivalent.

[–] [email protected] 10 points 7 months ago* (last edited 7 months ago)

Thank you!!

Edit: Tried running that, I'm getting the error that /dev/cpu/0/msr doesn't exist. dev/cpu doesn't seem to exist at all on my machine. Hm

Edit 2: You need to run sudo modprobe msr. All good now :)

[–] [email protected] 8 points 7 months ago

This is amazing to find out now after 7 years:) I actually adjusted voltage manually on my Ryzen R5 1600, and it became 100% reliable, apparently the fix you mention prevent voltage below 1v at idle. I wondered why my CPU wasn't reliable unless I made manual OC with some voltage tweaks?

I never looked it up, because my OC solved the issue, but I always thought it was a bit weird.

[–] [email protected] 39 points 7 months ago* (last edited 7 months ago)

I have a Zen 2, Zen 3+ and a Zen 4 system and they all work well very with various Linux distros (Arch, Fedora) and recent kernels.

It's very likely that your bug is specific to early Ryzen CPUs/chipsets. A couple of folks on those reports mentioned their issues went away after a motherboard/BIOS upgrade. So I think you'll be fine if you went for a more recent AMD CPU+mobo.

[–] [email protected] 7 points 7 months ago (1 children)
load more comments (1 replies)
[–] [email protected] 5 points 7 months ago* (last edited 7 months ago) (1 children)

What kernel version are you seeing that lockup bug on? I have a similar bug on Ryzen 5 2600x with kernel versions >= 6.7. 6.6 is fine.

More directly: Buy used. Lots of reputable sellers on eBay and their returns policy for defective products is unbeatable.

[–] [email protected] 1 points 7 months ago

hardened kernel v6.7.9, but I also had the same problem on the regular Linux kernel a while back. It's been a while since I've used the regular Linux kernel though so it might have gotten fixed on the regular kernel but not the hardened version?

[–] [email protected] 5 points 7 months ago (1 children)

As I understand, early ryzen processors are generally more buggy. I run 5800x on my desktop and a 5600(x?) in my server. You could try a newer ryzen and see if it works. I would recommend shopping around for a decent warranty.

[–] [email protected] 0 points 7 months ago

That's good to hear that you're not having problems on newer Ryzen. Although not sure if I want to risk buying a new Ryzen CPU if there's a chance I could have the same problem

[–] [email protected] 51 points 7 months ago (1 children)

Buy Intel used so that you're not directly contributing?

Other than that or AMD, your only other option is ARM.

[–] [email protected] 8 points 7 months ago (3 children)

Can you go and buy an ARM CPU and build a desktop system with it?

[–] [email protected] 6 points 7 months ago

Yes.

Not many, but they exist. I think most of them come soldered to the board like laptops.

[–] [email protected] 4 points 7 months ago

ltt made a video recently-ish showcasing a multi threaded arm cpu desktop. Not sure how availabe that is to the market though.

[–] [email protected] 5 points 7 months ago

Get another AMD chip, you've just been unlucky. I've had AMD running Linux for 5 years with no issues.

[–] [email protected] 13 points 7 months ago (1 children)

Ah, that sounds a bit unfortunate. I've run AMD CPUs on Linux desktops with Bulldozer / Piledriver / Ryzen 7, my current laptop is a Ryzen 7 as well, never run into that at all. Hopefully the Arch wiki will sort you out. If not that, the third option would be 'install Linux on an M-series Mac' - don't know how feasible it is at the moment, and paying the 'Mac premium for hardware and software integration and then overwriting the software' doesn't make a lot of sense to me.

[–] [email protected] 7 points 7 months ago

I have has zen2 and zen3 systems and haven't run in to that either. So Zen2+ systems should be mostly fine.

If you get an M1 or M2 mac it should mostly work. If you need thunderbolt(WIP) or vulkan(WIP) then you will have to wait. Otherwise accelerated desktops work and audio is working now. Honestly if you compare performance to competing systems, they end up pretty similar in pricing.

load more comments
view more: ‹ prev next ›