TL;DR: Upgrading Kernel to 4.16.1 and changing settings in the BIOS fixed it for me.
Recently I upgraded my Workstation from an old Athlon 5370 on MSI AM1I to a Ryzen 5 2400G on a Gigabyte AB350M-DS3H.
Sadly I had no idea of the trouble I was getting into with Linux. My Ubuntu 16.04.3 was running the stock 4.4.0 Kernel, for some strange reason the kernel would not boot completely once in a while. It was stuck during kernel load without any message whatsoever. Pressing reset and giving it another try worked most of the time. Rarely I had to switch everything off and try again.
Using 4.4.0 everything seemed to be running stable, but alas, no APU hardware acceleration! Compiz sucked a lot of CPU power and Youtube videos even more. Lucky enough, 4.16 was being released soon after I bought the new hardware. Strangely I encountered the same kernel boot lockups almost every time I booted. But what was even worse was the constant freeze/lockup after the system booted. Using the desktop worked for some time, but as soon as APU power was required (Youtube, gaming, …) the system just locked up with no kernel message whatsoever being locked. Hard to debug! So first I was suspicious about a hardware defect. Reboot and into Memtest86+. Running for hours my 16GB DDR4 @ 3200MHz with no errors logged. Guess that was not it. Then I installed Windows 10 with newest chipset and graphic drivers on a spare SSD and started playing some games. Aha! Once in a while a game dropped back to the desktop. Something MUST be wrong. I turned down the memory frequency to around 3000MHz and the problems stopped. Could play for hours. So hardware should be fine. Back to linux.
Again, lockups after the the first few minutes. Google spat alot of hints on older (the first without APU) Ryzens out, disable C6 state, rebuild Kernel with „Offload RCU callback processing from boot-selected CPUs“ and set cores as kernel switch, integrate bleeding edge PPA with the hottest, newest, whatever LLVM/Mesa/whatever packages. Nothing worked. Still lockups.
So I started to think about the mainboard. Locked into dmesg and opened tickets with Gigabyte Support to have them fix the ACPI and IOMMU errors I encountered during bootup:
[ 0.000000] ACPI BIOS Error (bug): Failure creating [\_SB.SMIC], AE_ALREADY_EXISTS (20180105/dswload-380)
[ 0.000000] ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20180105/psobject-252)
[ 0.000000] ACPI Error: AE_ALREADY_EXISTS, (SSDT: AMD PT) while loading table (20180105/tbxfload-228)
[ 0.000000] ACPI Error: 1 table load failures, 7 successful (20180105/tbxfload-246)
[ 0.061188] ACPI BIOS Error (bug): Failure looking up [\PTOS], AE_NOT_FOUND (20180105/psargs-364)
[ 0.061188] No Local Variables are initialized for Method [„\“ ]
[ 0.061188] No Arguments are initialized for method [„\“ ]
[ 0.061188] ACPI Error: Method parse/execution failed \, AE_NOT_FOUND (20180105/psparse-550)
The answer was a quick and short „in Windows 7/10 this error does not show up. Linux is not supported.“, which I interpreted as „GO FUCK YOURSELF, ASSHOLE! HAHAHAHAHA!“
Curse you, Gigabyte! Last product I ever buy from you. Blacklisted for life!
My assumption was, that something was messed up in the BIOS, out of standards or whatever. So I disabled everything suspicious. Global C-State, IOMMU, dynamic overclocking, etc. Then I added iommu=soft to the kernel boot parameters.
For the time being the time being the freezes disappeared and everything works. Give it a try, maybe you suffer from crappy Gigabyte products as well!
Edit:
Contrairy to the first picture above, enabling SVM mode on the Gigabyte still produces some lockups. So disable it.
Additionally, use the recent 4.16.1 Kernel (install with ukuu or manually). The 4.16.2 in the repos produces freezes again (for me).
With this setup the only „nasty“ thing that remains is the frequent boot-up lock. If the system is up, it seems to be working.
Edit 27.04.18:
With recent 4.17 RC2 things improved further. So far only one or two lockups during first kernel load.
Kommentare