# Anyone using a Ryzen CPU?

## swirling_vortex

I've been putting together a possible new build since my current machine is starting to get old. I've been eyeing a Ryzen 7, but some of the info I've been seeing with using them on Linux seems a bit troublesome. For instance, I've seen posts about Ryzen CPUs hanging when idle or when under full load (such as doing a make -j16 on a Ryzen 7). I've also seen posts about AMD systems not booting correctly and mixed results when doing BIOS updates.

Here's a recent example I found on a mailing list: https://www.mail-archive.com/kernel-packages@lists.launchpad.net/msg319337.html

For those who have a Ryzen CPU, how has your experience been? Am I being overly paranoid or are there Ryzen systems that don't work well on Linux? I'm just trying to avoid building a doorstop.

----------

## Ant P.

There were lots of reports of hangs with the first release of the chips, supposedly it's fixed now; I haven't heard any complaints for a few months. Getting RAM that runs stable at full speed is supposedly wildly hit-and-miss even on current models. Most of the issues are hardware, not software: Gentoo will run at least as well as Windows on them.

----------

## xdarma

Hi,

I own two ryzen based cpu: the older runs gentoo and the newer runs opensuse. Both works well.

Only issue was with older cpu that freezes at idle. Solved after some months with a bios update.

Ryzen is on market by almost two years, bugs and improvements was carried via bios update o via RMA for one hardware bug in older production batch.

Some information:

Ryzen - Gentoo Wiki

AMD Zen/Ryzen thread and AMD Zen/Ryzen thread (part 2)

AM4 Mobos used for ryzen

Ryzen 1600 hang issue [its back!]

I think isn't worse than other cpu.

----------

## bammbamm808

Some early ryzens had a hardware flaw. AMD provided RMA for affected processors. M9y 2700x system is great.; stable and responsive. There are a.few.bios settings you need to get right, but it's mostly correct ram timings, cpu and dram voltaves, and  setting idle power to 'typical' not ' low'. You could do yourself a favor by getting a motherboard with more available settings so yiu csn tune more easily.

No need to worry about ryzen. A minimal amount of fiddling and you'll be set.

----------

## swirling_vortex

Thanks for the feedback! Sounds like to be on the safe side the best thing to do is stick with the 2xxx processors.

 *Quote:*   

> You could do yourself a favor by getting a motherboard with more available settings so yiu csn tune more easily.

 

Good point. I don't plan on overclocking, but having those features might come in handy. I think if I keep the RAM speeds at or below 2667Mhz and get a decently sized power supply, that should hopefully avoid weird hardware glitches.

----------

## bammbamm808

 *swirling_vortex wrote:*   

> Thanks for the feedback! Sounds like to be on the safe side the best thing to do is stick with the 2xxx processors.
> 
>  *Quote:*   You could do yourself a favor by getting a motherboard with more available settings so yiu csn tune more easily. 
> 
> Good point. I don't plan on overclocking, but having those features might come in handy. I think if I keep the RAM speeds at or below 2667Mhz and get a decently sized power supply, that should hopefully avoid weird hardware glitches.

 

I dont know about asrock or msi, but gigabyte bios implemenattions often arent that good. I prefer asus myself. Running very stable on gentoo-sources-4.20.0. I run my 32 GB of 14cl b-die at 3000 with docp.timings. A very slight undervolt.offset and I let the cpu speeds and voltages do.their own thing on the fly. From 1.6-2 all core, to 3 cores at 4.3, to all 16 threads at 3.8 - 3.9 under full load. Do yourself a favor and get good ram. B- die is best and there's lots of it on the QVL. I think that because of the ainfinity fabric, Ryzen benefits quite a bit from faster ram speeds.

----------

## Elleni

My box on ryzen5 runs very well, even overclocked @3.8 Ghz with slightly overclocked 2666 RAMS the system never exceeds 80 degrees even on high load while compiling stuff with makeopts="-13" and is rockstable. MB is asus b350 plus.

----------

## tomtom69

I have 3 ryzen machines running gentoo (one Ryzen 1700 and two Ryzen 1600).

Motherboards are Asrock AB350M-HDV and Asus Prime B350M-A.

All systems are running without stability problems.

Be sure to update BIOS to the newest version before installing gentoo. My motherboards were delivered with a rather old BIOS version. However update can easily be done with the image on an USB stick (no Windows required).

I also had to set the "typical current idle" option on both board's BIOS settings, without I had sporadic hard freezes.

----------

## Naib

Ryzen5 here from the moment it was available. I have experienced no issues directly related to the CPU (early compiler sure, bios teething problems)

I'm going to upgrade to a zen2 later this year

----------

## DaggyStyle

no issues with my 2700x here (no cpu OC, memory is OCed att 3200MHz), the mb is ga aorus B450 M, using latest bios.

----------

## mbar

I have 2700X with GSkill 3000 MHz memory and Asrock AB350 ITX board (latest 5.30 BIOS) and I have segfaults in perl and libc during emerge -e @world:

```
[ 1094.450338] Adding 14017856k swap on /dev/nvme0n1p4.  Priority:-2 extents:1 across:14017856k SSFS

[12101.411816] audit: type=1006 audit(1549871363.514:38): pid=2384 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=5 res=1

[12853.818627] audit: type=1006 audit(1549872115.920:39): pid=2955 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=6 res=1

[15136.254923] audit: type=1701 audit(1549874398.357:40): auid=0 uid=250 gid=250 ses=5 pid=15261 comm="conftest" exe="/var/tmp/portage/sys-apps/coreutils-8.30/work/coreutils-8.30/conftest" sig=6 res=1

[15136.269980] audit: type=1130 audit(1549874398.374:41): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0-15262-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

[15136.562899] audit: type=1131 audit(1549874398.667:42): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0-15262-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

[22132.641895] conftest[25393]: segfault at 268d5280 ip 00007f838e3bfaf6 sp 00007ffed4feb748 error 4 in libc-2.27.so[7f838e276000+1c3000]

[22132.641898] Code: e8 0f 2a fd ff 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 89 f1 89 f8 48 83 e1 3f 48 83 e0 3f 83 f9 30 77 3f 83 f8 30 77 3a <66> 0f 12 0f 66 0f 12 16 66 0f 16 4f 08 66 0f 16 56 08 66 0f ef c0

[22132.641922] audit: type=1701 audit(1549881394.747:43): auid=0 uid=250 gid=250 ses=5 pid=25393 comm="conftest" exe="/var/tmp/portage/app-misc/screen-4.6.2-r1/work/screen-4.6.2/conftest" sig=11 res=1

[22132.649690] audit: type=1130 audit(1549881394.753:44): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@1-25394-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

[22132.908793] audit: type=1131 audit(1549881395.013:45): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@1-25394-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

[22229.814514] perl[9811]: segfault at 7ffe4e834fa8 ip 00007f6bda1a589a sp 00007ffe4e834fb0 error 6 in Storable.so[7f6bda18c000+1e000]

[22229.814522] Code: 41 57 41 56 49 89 d7 41 55 41 54 49 89 fc 55 53 48 89 f3 48 89 d6 48 83 ec 78 64 48 8b 04 25 28 00 00 00 48 89 44 24 68 31 c0 <e8> f1 8d fe ff 48 ff c0 48 89 44 24 50 48 3d ff ff ff 7f 0f 86 cd

[22229.814562] audit: type=1701 audit(1549881491.917:46): auid=0 uid=250 gid=250 ses=5 pid=9811 comm="perl" exe="/var/tmp/portage/dev-lang/perl-5.28.0/work/perl-5.28.0/perl" sig=11 res=1

[22229.824040] audit: type=1130 audit(1549881491.927:47): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@2-9817-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

[22230.202191] audit: type=1131 audit(1549881492.307:48): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@2-9817-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

[22230.205215] perl[9852]: segfault at 7ffd15d61ff8 ip 00007f12ece6c893 sp 00007ffd15d61f90 error 6 in Storable.so[7f12ece53000+1e000]

[22230.205226] Code: fe ff 0f 1f 44 00 00 41 57 41 56 49 89 d7 41 55 41 54 49 89 fc 55 53 48 89 f3 48 89 d6 48 83 ec 78 64 48 8b 04 25 28 00 00 00 <48> 89 44 24 68 31 c0 e8 f1 8d fe ff 48 ff c0 48 89 44 24 50 48 3d

[22230.205276] audit: type=1701 audit(1549881492.310:49): auid=0 uid=250 gid=250 ses=5 pid=9852 comm="perl" exe="/var/tmp/portage/dev-lang/perl-5.28.0/work/perl-5.28.0/perl" sig=11 res=1

[22230.213530] audit: type=1130 audit(1549881492.317:50): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@3-9856-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

[22230.508899] audit: type=1131 audit(1549881492.613:51): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@3-9856-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

[22230.524423] perl[9881]: segfault at 7ffde2094ff8 ip 00007f94a3a8487f sp 00007ffde2095000 error 6 in Storable.so[7f94a3a6b000+1e000]

[22230.524430] Code: 24 20 41 c7 47 78 01 00 00 00 48 8d 3d 6a 19 00 00 e8 c5 90 fe ff 0f 1f 44 00 00 41 57 41 56 49 89 d7 41 55 41 54 49 89 fc 55 <53> 48 89 f3 48 89 d6 48 83 ec 78 64 48 8b 04 25 28 00 00 00 48 89

[22230.524460] audit: type=1701 audit(1549881492.627:52): auid=0 uid=250 gid=250 ses=5 pid=9881 comm="perl" exe="/var/tmp/portage/dev-lang/perl-5.28.0/work/perl-5.28.0/perl" sig=11 res=1

[22234.988629] kauditd_printk_skb: 49 callbacks suppressed

[22234.988630] audit: type=1131 audit(1549881497.093:90): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@16-10105-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

[23153.088159] conftest[7097]: segfault at d8510280 ip 00007f6edd6f9af6 sp 00007ffca02ba068 error 4 in libc-2.27.so[7f6edd5b0000+1c3000]

[23153.088166] Code: e8 0f 2a fd ff 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 89 f1 89 f8 48 83 e1 3f 48 83 e0 3f 83 f9 30 77 3f 83 f8 30 77 3a <66> 0f 12 0f 66 0f 12 16 66 0f 16 4f 08 66 0f 16 56 08 66 0f ef c0
```

This is from a new install.

Segfaults start appearing after I recompile the toolchain (stable or ~amd64) with "-march=native" option. Using amd64 glibc/gcc from freshly unpacked stage3 produces no segfaults. 

Not sure if caused by hardware. Both segfaults can be found on the interned in really old fedora / debian / ubuntu threads.

----------

## Ralphred

 *mbar wrote:*   

> I have 2700X with GSkill 3000 MHz memory and Asrock AB350 ITX board (latest 5.30 BIOS) and I have segfaults in perl and libc during emerge -e @world:

 

Is this running baseline CPU and ram speeds for number of sticks you have? Check the ram voltage too, stock Bios may have it too low.

----------

## DaggyStyle

 *mbar wrote:*   

> I have 2700X with GSkill 3000 MHz memory and Asrock AB350 ITX board (latest 5.30 BIOS) and I have segfaults in perl and libc during emerge -e @world:
> 
> ```
> [ 1094.450338] Adding 14017856k swap on /dev/nvme0n1p4.  Priority:-2 extents:1 across:14017856k SSFS
> 
> ...

 

march=native is not good for ryzen, see https://wiki.gentoo.org/wiki/Ryzen#GCC_6.3.2B

here are the relevant part from make.conf I'm using:

```

COMMON_FLAGS="-O2 -pipe -march=znver1"

CFLAGS="${COMMON_FLAGS}"

CXXFLAGS="${COMMON_FLAGS}"

FCFLAGS="${COMMON_FLAGS}"

FFLAGS="${COMMON_FLAGS}"

CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3"

```

----------

## Naib

thats isn't true for newer compilers. That was associated with Gcc-6.x, which came out before any Zen optimisation

----------

## swirling_vortex

I know nothing about compilers, but the Gentoo wiki notes there's a bug with MWAIT that AMD acknowledged but won't fix. Apparently that MWAIT instruction is tied with SSE3. So it would kind of make sense that if you used -march=native, it would use the zenver2 option which has SSE3 enabled. What doesn't make sense is why some CPUs run into problems and some don't. My personal feeling is that AMD/GloFo isn't binning their CPUs properly to keep up yields.

Of course, this isn't a problem unique to AMD. There's been a growing list of CPU bugs on both sides.

http://danluu.com/cpu-bugs/

The problem though is that AMD seems unwilling to issue microcode updates to fix these problems. The last several updates I checked for AMD chips were for Spectre patches and the last update had no documentation at all.

----------

## DaggyStyle

 *Naib wrote:*   

> thats isn't true for newer compilers. That was associated with Gcc-6.x, which came out before any Zen optimisation

 

the twiki is misleading as it states that GCC 6.3+

----------

## DaggyStyle

I took the plunge too, switched to native, for now only skypeforlinux crashes on libdbus-1.so.3.14.14 and libdbus-1.so.3.19.9

----------

## Desulate

I have a ryzen 1800x, I've been pretty happy with my purchase. 

Apparently during the first 2 weeks of manufacturing there were some hardware bugs that caused segfaults while compiling but they addressed it quickly and allowed rma's for the effected cpus. They also released a serial list so you can check if you have one of those cpus manufactured with the defect.

Most of the bios for the motherboards before December 2018 were pretty buggy though and were pretty rough no matter which brand you picked. This was mainly because AMD had just launched ryzen and the 3rd-party manufactures hadn't really caught up yet. A couple of bios features should be switched off such as "AMD cool'n quiet" but you won't miss them.

Getting good ram is important if you want to OC the cpu's. There are plenty of in-depth guides about ryzen and ram, generally you'll be able to get at least 2800 mhz with minimal effort as long as the ram supports overclocking. People only start hitting issues in the 3000+ mhz range.

I would pick AMD over intel right now for a new system without hesitation. The later CPU's after first gen ryzen haven't had the issues that plagued the first release. 

I'd also point out the fact that people keep finding issues with intel on the hardware level - aka specter, etc. - which sucks because losing 10 to 20% performance for security hurts. Additionally Intel keep's playing these "market segmentation" games instead of rolling up their sleeves and actually competing against AMD where it matters. There isn't really a new compelling reason to pick intel right now unless your chasing that sweet sweet single core performance lol.

----------

## spofforth

Greetings, just adding input.

I have a Ryzen 1800X. From /proc/cpuinfo:

```
microcode   : 0x8001138

bugs      : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass
```

I can't get much information from other tools.

The first weeks i've had it, while running a live Linux Mint Tina (where everything worked, audio included) i've had a couple of hard freezes and once saw MCE errors in dmesg:

```
Nov  9 17:08:38 mint kernel: [    0.070222] mce: [Hardware Error]: Machine check events logged

Nov  9 17:08:38 mint kernel: [    0.070222] mce: [Hardware Error]: CPU 8: Machine Check: 0 Bank 5: bea0000000000108

Nov  9 17:08:38 mint kernel: [    0.070222] mce: [Hardware Error]: TSC 0 ADDR 1ffff9426ae04 MISC d012000100000000 SYND 4d000000 IPID 500b000000000 

Nov  9 17:08:38 mint kernel: [    0.070222] mce: [Hardware Error]: PROCESSOR 2:800f11 TIME 1573319304 SOCKET 0 APIC 1 microcode 8001138

```

Once i turned on "Typical Current Idle" in the BIOS i haven't noticed any more problems, but i've just installed gentoo (a week) and haven't tweaked the kernel yet (using 4.19.82). 

The board's an Asus Prime X370-A, with the original BIOS version 5204, which i updated to the latest 5222.

----------

## Juippisi

I have 3700x and 3900x. No problems with either whatsoever. 

I'm using latest firmware (microcode) and kernel.

----------

## kurisu

I've been running 2 Ryzen systems with -march=native for 1 1/2 years. Haven't encountered any CPU related issues so far. UEFI updates always went fine. Go for it.

----------

## Terry_Davis

Does Gentoo have special optimizations for Ryzen CPUs that other distros don't have by default?

----------

## Naib

 *Terry_Davis wrote:*   

> Does Gentoo have special optimizations for Ryzen CPUs that other distros don't have by default?

 as much optimisation as you enable 

 *Quote:*   

> 
> 
> grep CFLAGS  /etc/portage/make.conf
> 
> CFLAGS="-O2 -pipe -fomit-frame-pointer -march=native -fno-lto -mindirect-branch=thunk -ftree-vectorize -ftree-slp-vectorize"# -mstackrealign"
> ...

 

you won't find this on the likes of arch, ubuntu ... because they have to compile for a generic x86_64 and some of the specialist compiler options are not available.

----------

## Ralphred

 *Elleni wrote:*   

> My box on ryzen5 runs very well, even overclocked @3.8 Ghz with slightly overclocked 2666 RAMS the system never exceeds 80 degrees even on high load while compiling stuff with makeopts="-13" and is rockstable. MB is asus b350 plus.

 

Practically identical set-up here, I think I run ram a bit faster, but yeah, it's rock solid.

----------

## Amity88

Could you guys post your gcc compile times? I'm just very curious how the Ryzen holds up.

----------

## Elleni

genlop -t gcc

```
 * sys-devel/gcc

     Sun Jan 14 09:46:14 2018 >>> sys-devel/gcc-6.4.0-r1

       merge time: 27 minutes and 21 seconds.

     Sun Jan 28 13:19:09 2018 >>> sys-devel/gcc-7.3.0

       merge time: 29 minutes and 50 seconds.

     Sun Jan 28 17:04:47 2018 >>> sys-devel/gcc-7.3.0

       merge time: 25 minutes and 59 seconds.

     Tue Jan 30 04:44:29 2018 >>> sys-devel/gcc-7.3.0

       merge time: 25 minutes and 21 seconds.

     Sun Apr  8 20:47:30 2018 >>> sys-devel/gcc-7.3.0-r1

       merge time: 29 minutes and 5 seconds.

     Mon Apr  9 01:51:02 2018 >>> sys-devel/gcc-7.3.0-r1

       merge time: 28 minutes and 23 seconds.

     Sun Jun 24 21:48:18 2018 >>> sys-devel/gcc-7.3.0-r3

       merge time: 29 minutes and 37 seconds.

     Tue Nov  6 12:23:42 2018 >>> sys-devel/gcc-7.3.0-r3

       merge time: 26 minutes and 31 seconds.

     Sun Feb 24 14:45:14 2019 >>> sys-devel/gcc-8.2.0-r6

       merge time: 33 minutes and 49 seconds.

     Tue May  7 16:40:15 2019 >>> sys-devel/gcc-8.3.0-r1

       merge time: 32 minutes and 41 seconds.

     Tue Nov  5 02:08:51 2019 >>> sys-devel/gcc-8.3.0-r1

       merge time: 32 minutes and 27 seconds.

     Sat Nov  9 01:53:48 2019 >>> sys-devel/gcc-9.2.0-r2

       merge time: 39 minutes and 24 seconds.
```

uname -a

```
Linux gentoo1 5.4.3-gentoo #1 SMP PREEMPT Sat Dec 14 14:41:40 CET 2019 x86_64 AMD Ryzen 5 1600 Six-Core Processor AuthenticAMD GNU/Linux
```

----------

## nick_gentoo

 *Naib wrote:*   

>  *Quote:*   
> 
> grep CFLAGS  /etc/portage/make.conf
> 
> CFLAGS="-O2 -pipe -fomit-frame-pointer -march=native -fno-lto -mindirect-branch=thunk -ftree-vectorize -ftree-slp-vectorize"# -mstackrealign"
> ...

 

There is one thing I saw recently in the gcc man page when also looking for the meaning of some CFLAGS: -ftree-slp-vectorize is enabled automatically when -ftree-vectorize is set, so I guess it can be left out.

(but feel free to correct me if there is some special reason to use it, as I know very little about these options)

----------

