Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing Gentoo on my AMD Ryzen system
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
nvaert1986
n00b
n00b


Joined: 05 May 2019
Posts: 56

PostPosted: Tue Oct 01, 2019 9:28 pm    Post subject: Installing Gentoo on my AMD Ryzen system Reply with quote

Hello all,

I'm in the process of migrating my last Microsoft Windows 10 Pro system to Gentoo Linux, as I've finally been able to found good alternatives for all of the required software. I've done my research, but have a couple of questions, as I've done my research and read lots of articles about stability issues with AMD Ryzen based systems regarding CPU power management under Linux and people had a variety of degrees of success getting it to work.

Specifications
- Platinum 750W Power Supply (it's a 2018 model, but forgot the brand, but well known and reliable brand)
- AMD Ryzen 2700X
- MSI X470 Gaming Pro Carbon (BIOS up-to-date)
- 2x Kingston 16GB RAM
- Samsung 970 512GB NVME SSD
- MSI / NVIDIA Geforce GTX 1070

All of the hardware components / parts above (except for the SSD) are on the MSI HCL.

The system has been running Microsoft Windows 10 Pro for a bit less than a year now, done various pretty intense compilation tasks on Microsoft Windows using Microsoft Visual Studio and ran plenty of intense games and can definitely declare it a rock solid system running Microsoft Windows

Research / Questions
From reading through plenty of lengthy conversations, the kernel mailing list and the Gentoo forums and Wiki of course, I've read that you should enable the following options (as they were applied the most often)

- Set the Power Supply Idle Control in the BIOS to Typical Current Idle in the BIOS / UEFI firmware.
- Is this necessary if you have a 2018 good quality PSU?
- Disable C(6) states in the BIOS / UEFI Firmware
- Isn't this going to be very energy inefficient?
- Enable "Offload RCU callback processing from boot-selected CPUs"in the kernel in the RCU Subsystem
- Set kernel parameter: rcu_nocbs=0-15
- Set kernel parameter idle=nomwait
- Isn't this more of a workaround as software can actually execute the instruction?
- Set kernel parameter processor.max_cstate=1
- Use zenstates.py to disable the C6 state

Questions
Does anybody have any good experience with AMD Ryzen on Gentoo and can it be deemd mature / stable?
Which of BIOS tweaks the options above are applicable in 2019 when using the 5.2 or 5.3 kernel?
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 828

PostPosted: Wed Oct 02, 2019 10:55 am    Post subject: Reply with quote

i have an ~amd64 ryzen-system running since ~201803 and i'm quite satisfied.
part of /proc/cpuinfo:
Code:
processor       : 14
vendor_id       : AuthenticAMD
cpu family      : 23
model           : 1
model name      : AMD Ryzen 7 1700 Eight-Core Processor
stepping        : 1
microcode       : 0x8001137


but since i'm kinda oldfashioned in the way i use the box (i completely turn it off while it has nothing sensible to compute) i did not configure much regarding power management. i have not configured an special rcu-stuff in the kernel and do not pass any of the options you mention on boot.

since the processor is so fast i use it for a couple of other machines to compile their stuff in chroots which is very convenient.
the only thing that disappointed me (a little) was the CPU-encoding-performance with ffmpeg X264 preset veryslow
Code:
-c:v libx264 -crf 18 -preset veryslow -tune film

i haven't done it in a long time but i think it was ~20-30 FPS with HD-material (BLURAY) and ~40-60FPS with SD-material (DVD). I've been doing it with X265 and nvenc ever since and this is about 5-10 times faster.

except some gentoo-installations i also run three other distros (debian&mint) for family-members on it and they are also stable, mature and useable (within their limitations :wink: )

(just as POC i also installed windoze seven on it and when i start it once or twice a year it basically runs (within its limitations) except microsoft does not allow the installation of "updates" (neither online nor pre-downloaded and offline) and when i'm on the desktop about every ten minutes a window pops up claiming the system cannot run bc the processor is not supported.)

on gentoo the only (very few) stability-issues i've had resulted from the nouveau-driver (but hell, i'm on ~amd64)
GOOD LUCK!
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
stahlsau
Guru
Guru


Joined: 09 Jan 2004
Posts: 582
Location: WildWestwoods

PostPosted: Wed Oct 02, 2019 3:27 pm    Post subject: Reply with quote

running on a 2600X here, no problems anymore (nouveau didn't like my RTX2060 and produced freezes, but your graca should run fine).
None of the options you wrote about enabled here....maybe this isn't needed anymore? Dunno.
Got a gaming pro carbon, too. NVME running fine, too.
Just do it ;-)
Back to top
View user's profile Send private message
saboya
Guru
Guru


Joined: 28 Nov 2006
Posts: 516
Location: Brazil

PostPosted: Wed Oct 02, 2019 4:05 pm    Post subject: Reply with quote

Those settngs were most likely recommended to avoid bad power-management / scheduler on the kernel. However, Ryzen has been out for a while now and if you use a recent kernel they're most likely solved by now.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3782
Location: Illinois, USA

PostPosted: Wed Oct 02, 2019 4:28 pm    Post subject: Reply with quote

I've had C6 off for the previous two AMD generations.

DawgG: I run Win 7 and Win XP under virtualbox with no problems. I do have a Radeon videocard but virtualbox has it's own video driver.

2700X here with Crucial SSD. 16Gig memory
A variety of kernels.
4.14.98
4.17.19
4.19.71
5.0.21
5.2.17

Latest BIOS on MSI Tomahawk Arctic (NO overclock!)

I think the problems were mostly with first generation Ryzens.
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 510
Location: Hawaii

PostPosted: Thu Oct 03, 2019 7:00 am    Post subject: Re: Installing Gentoo on my AMD Ryzen system Reply with quote

nvaert1986 wrote:
Hello all,

I'm in the process of migrating my last Microsoft Windows 10 Pro system to Gentoo Linux, as I've finally been able to found good alternatives for all of the required software. I've done my research, but have a couple of questions, as I've done my research and read lots of articles about stability issues with AMD Ryzen based systems regarding CPU power management under Linux and people had a variety of degrees of success getting it to work.

Specifications
- Platinum 750W Power Supply (it's a 2018 model, but forgot the brand, but well known and reliable brand)
- AMD Ryzen 2700X
- MSI X470 Gaming Pro Carbon (BIOS up-to-date)
- 2x Kingston 16GB RAM
- Samsung 970 512GB NVME SSD
- MSI / NVIDIA Geforce GTX 1070

All of the hardware components / parts above (except for the SSD) are on the MSI HCL.

The system has been running Microsoft Windows 10 Pro for a bit less than a year now, done various pretty intense compilation tasks on Microsoft Windows using Microsoft Visual Studio and ran plenty of intense games and can definitely declare it a rock solid system running Microsoft Windows

Research / Questions
From reading through plenty of lengthy conversations, the kernel mailing list and the Gentoo forums and Wiki of course, I've read that you should enable the following options (as they were applied the most often)

- Set the Power Supply Idle Control in the BIOS to Typical Current Idle in the BIOS / UEFI firmware.
- Is this necessary if you have a 2018 good quality PSU?
- Disable C(6) states in the BIOS / UEFI Firmware
- Isn't this going to be very energy inefficient?
- Enable "Offload RCU callback processing from boot-selected CPUs"in the kernel in the RCU Subsystem
- Set kernel parameter: rcu_nocbs=0-15
- Set kernel parameter idle=nomwait
- Isn't this more of a workaround as software can actually execute the instruction?
- Set kernel parameter processor.max_cstate=1
- Use zenstates.py to disable the C6 state

Questions
Does anybody have any good experience with AMD Ryzen on Gentoo and can it be deemd mature / stable?
Which of BIOS tweaks the options above are applicable in 2019 when using the 5.2 or 5.3 kernel?


I have Power Supply Idle set to Typical and have C States disabled. I have done none of the following and have no issues with the system in Windows 10 or Gentoo, even when emerging for the better part of an hour:
- Enable "Offload RCU callback processing from boot-selected CPUs"in the kernel in the RCU Subsystem
- Set kernel parameter: rcu_nocbs=0-15
- Set kernel parameter idle=nomwait
- Isn't this more of a workaround as software can actually execute the instruction?
- Set kernel parameter processor.max_cstate=1
- Use zenstates.py to disable the C6 state

The above is true with PBO enabled by itself, and with PBO and XFR. I usually don't run XFR because it's quite hot where I live and the difference in performance is much more imaginary that the difference in thermals. Not to say that I've had any instability with XFR, the CPU just gets rather hot during emerges. This has all been true with gentoo-sources 4.19 and currently, 5.2.11. -march is znver1. As far as energy efficiency, your mileage may vary. Try the Cstate options on and see what you get. FWIW, my cores clock down to 2.6GHz when doing light tasks, and my core voltage goes down to .8v. That's something, right?
_________________
Asrock X470 Taichi
Ryzen 2700x
32Gb Samsung B-die (16GB dual rank x2) DDR4
Geforce GTX 1060 6GB
Samsung Evo 840 500Gb +Seagate 1TB HDD
Etc....
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3782
Location: Illinois, USA

PostPosted: Thu Oct 03, 2019 10:22 am    Post subject: Reply with quote

bammbamm808, my cores clock down to 2.0Mhz, but I have a B350 board, maybe that's why.
Max temp 140 F while emerging a large package. Stock cooler. Can't check the PS right now, but believe it's 450W. Radeon card is cheapest lowest power I could find. I don't game. Cheap video card is fine for web surfing and GUI desktop.
No Windows other than Virtualbox. Never has been.

kernel config at http://dpaste.com/2SWH3HS


No systemd. No kits.
Back to top
View user's profile Send private message
nvaert1986
n00b
n00b


Joined: 05 May 2019
Posts: 56

PostPosted: Thu Oct 03, 2019 9:59 pm    Post subject: Reply with quote

I'd like to thank everyone for the advice, I'll be performing the installation in the weekend and let you guys know if I encountered any issues, but it would be pretty smooth sailing from what I'm reading aside from some minor tweaks :)
Back to top
View user's profile Send private message
saellaven
Guru
Guru


Joined: 23 Jul 2006
Posts: 561

PostPosted: Thu Oct 03, 2019 10:03 pm    Post subject: Reply with quote

Ryzen 3700X (overclocked to 3800 MHz with stock cooler) on an Asus PrimeX570 Pro mobo with 32 GB DDR4 3200 from Crucial.

No thermal issues even with 16 threads going (I max out around 122F with an ambient temp of around 70F).

I do need "acpi_enforce_resources=lax" added to my kernel options to get the mobo sensors to load and I'm patching linux-5.3 to include the CPU sensors until 5.4 comes out. Otherwise, no fancy BIOS settings or options needed in the kernel.
_________________
Ryzen 3700X, Asus Prime X570-Pro, 32 GB DDR4 3200, GeForce 1050 Ti
openrc-0.17, ~vanilla-sources, ~nvidia-drivers, gcc-9.2.0
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 510
Location: Hawaii

PostPosted: Fri Oct 04, 2019 2:09 am    Post subject: Reply with quote

nvaert1986 wrote:
I'd like to thank everyone for the advice, I'll be performing the installation in the weekend and let you guys know if I encountered any issues, but it would be pretty smooth sailing from what I'm reading aside from some minor tweaks :)


For x470 and Ryzen+, you might need to set SOC voltage to 1.0 - 1.1, and DRAM voltage to 1.35, to get your RAM at its highest possible speed. These are not default settings for most boards, but often necessary. This is common and is easily managed in UEFI firmware.
_________________
Asrock X470 Taichi
Ryzen 2700x
32Gb Samsung B-die (16GB dual rank x2) DDR4
Geforce GTX 1060 6GB
Samsung Evo 840 500Gb +Seagate 1TB HDD
Etc....
Back to top
View user's profile Send private message
nvaert1986
n00b
n00b


Joined: 05 May 2019
Posts: 56

PostPosted: Fri Oct 11, 2019 8:26 pm    Post subject: Reply with quote

It took a week longer than expected, but I'm installing! :D Haven't seen any of the described messages found on Google on my AMD Ryzen system so far using the Gentoo Linux Minimal ISO.

Question though, I'd like to enable Secure Boot and saw MSI offers an option to sign the EFI binary in the BIOS / UEFI setup on the ESP partition, so I'm wondering what I'd need to sign:

- Just the grubx64.efi or grubx64.efi the vmlinuz-* kernel and all of the kernel modules?

As signing all the modules (by moving them back and forth to the UEFI partition would be a real PITA) each time I'd compile a kernel, but if it's just grub / the kernel it would be doable.
Back to top
View user's profile Send private message
nvaert1986
n00b
n00b


Joined: 05 May 2019
Posts: 56

PostPosted: Sun Oct 20, 2019 11:52 am    Post subject: Reply with quote

My system has been up and running for a week, with no problems or whatsoever so far, but I'm wondering whether I've compiled all the required kernel components, as quite a few items are missing from "lspci -k". With Intel systems I am always aware that 1 or 2 items are missing, as they just don't need a driver, but I'm wondering whether my kernel is missing something here, as there's a lot of Data Fabric entries with no kernel driver?

Code:

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Root Complex
        Subsystem: Micro-Star International Co., Ltd. [MSI] Family 17h (Models 00h-0fh) Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) I/O Memory Management Unit
        Subsystem: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) I/O Memory Management Unit
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:01.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe GPP Bridge
        Kernel driver in use: pcieport
00:01.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe GPP Bridge
        Kernel driver in use: pcieport
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:03.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:03.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe GPP Bridge
        Kernel driver in use: pcieport
00:04.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:07.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:07.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B
        Kernel driver in use: pcieport
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B
        Kernel driver in use: pcieport
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 59)
        Subsystem: Micro-Star International Co., Ltd. [MSI] FCH SMBus Controller
        Kernel driver in use: piix4_smbus
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
        Subsystem: Micro-Star International Co., Ltd. [MSI] FCH LPC Bridge
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 3
        Kernel driver in use: k10temp
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 7
01:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981
        Subsystem: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981
        Kernel driver in use: nvme
03:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] Device 43d0 (rev 01)
        Subsystem: ASMedia Technology Inc. Device 1142
        Kernel driver in use: xhci_hcd
03:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset SATA Controller (rev 01)
        Subsystem: ASMedia Technology Inc. 400 Series Chipset SATA Controller
        Kernel driver in use: ahci
03:00.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Bridge (rev 01)
        Kernel driver in use: pcieport
20:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01)
        Kernel driver in use: pcieport
20:01.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01)
        Kernel driver in use: pcieport
20:02.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01)
        Kernel driver in use: pcieport
20:03.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01)
        Kernel driver in use: pcieport
20:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01)
        Kernel driver in use: pcieport
22:00.0 Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03)
        Subsystem: Micro-Star International Co., Ltd. [MSI] I211 Gigabit Network Connection
        Kernel driver in use: igb
        Kernel modules: igb
23:00.0 Audio device: Creative Labs Sound Core3D [Sound Blaster Recon3D / Z-Series] (rev 01)
        Subsystem: Creative Labs Sound Core3D [Sound Blaster Recon3D / Z-Series]
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
26:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1070] (rev a1)
        Subsystem: Micro-Star International Co., Ltd. [MSI] GP104 [GeForce GTX 1070]
        Kernel driver in use: nvidia
        Kernel modules: nvidia_drm, nvidia
26:00.1 Audio device: NVIDIA Corporation GP104 High Definition Audio Controller (rev a1)
        Subsystem: Micro-Star International Co., Ltd. [MSI] GP104 High Definition Audio Controller
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
27:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Zeppelin/Raven/Raven2 PCIe Dummy Function
        Subsystem: Advanced Micro Devices, Inc. [AMD] Zeppelin/Raven/Raven2 PCIe Dummy Function
27:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Platform Security Processor
        Subsystem: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Platform Security Processor
        Kernel driver in use: ccp
27:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Zeppelin USB 3.0 Host controller
        Subsystem: Micro-Star International Co., Ltd. [MSI] Zeppelin USB 3.0 Host controller
        Kernel driver in use: xhci_hcd
28:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Zeppelin/Renoir PCIe Dummy Function
        Subsystem: Advanced Micro Devices, Inc. [AMD] Zeppelin/Renoir PCIe Dummy Function
28:00.2 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 51)
        Subsystem: Micro-Star International Co., Ltd. [MSI] FCH SATA Controller [AHCI mode]
        Kernel driver in use: ahci
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum