Page 1 of 2

[Solved] AMD RX570 crashes in idling, amdgpu vs Kernel

Posted: Wed Aug 12, 2020 9:14 am
by matthysjaroos
I wonder whom can help me,

Lets start with my PC Specs:
CPU: Intel i5-4690 @ 3.9Ghz
RAM: 16Gig DDR3 @ 1600mhz
SSD: 256GB sata interface
MBoard: Asus H81M-C mini-ATX
GPU: AMD RX570 4Gig VRAM (amdgpu mesa 20.3.0 dev oilaf-ppa)
OS: Linux Mint 20 (kernel 5.8.0)

I have a problem that my system keeps crashing on me if in idling mode. It crashes about 5min after boot.
I found that this only occurs after updating the system to latest kernel and mesa, even on live sessions it crashes.
The only time it stays stable in idling mode was when tested with live session on LinuxFX 10.4 with kernel 5.8.0 and 20.0.8 mesa, but started to crash after update.
The only way I can keep it operational is to open browser directly after boot and start YouTube videos, but can't pause video, nor switch off screen or minimize browser or switch tabs for too long 15-30min max unless its a streaming or video playing site. (So have to play long videos if want to go to sleep, to avoid YouTube's auto-pause.)
On older Linux build it stays stable , but crashes after updates.
Can work on it as long as YouTube video is playing, can play games without YouTube running even Heaven Benchmark.

Sometimes when quick enough and see system busy freezing I can get it back with pressing "alt+crtl+F1" to get it on tty1 and then "alt+crlt+F7" to get it back on login screen, or a messed up screen that resembles corrupt VRAM. but know all is well with GPU. It works great under Windows, but there are other hardware that does not play nice with Windows that work 100% in Linux.

I tried everything seen in other post with no success, please LM you are my only hope???? :lol: :lol: :lol:

Re: AMD RX570 crashes in idling, amdgpu vs Kernel

Posted: Wed Aug 12, 2020 3:00 pm
by SMG
I see you've been doing some kernel experimentation as LM20 LTS is 5.4. One thing to check as you experiment is what AMD and graphics drivers have installed and loaded. A mismatch between your hardware and the drivers can be a source of instability.

Can you please give us information about your install by entering this command in a terminal:

Code: Select all

inxi -Fxxxrz
Enclose the results between [ⅽode] and [/ⅽode] code markers by selecting </> from the mini toolbar above the textbox where you type your reply.

Re: AMD RX570 crashes in idling, amdgpu vs Kernel

Posted: Wed Aug 12, 2020 9:31 pm
by matthysjaroos
You can say that, but did it to see if it would fix the issue. Can downgrade the kernel again, but would not fix the problem. Struggle to downgrade Mesa though, but that would only be a temporary solution, because after a upgrade problem will return.

Re: AMD RX570 crashes in idling, amdgpu vs Kernel

Posted: Wed Aug 12, 2020 9:35 pm
by matthysjaroos

Code: Select all

System:
  Kernel: 5.8.0-050800-generic x86_64 bits: 64 compiler: N/A 
  Desktop: Xfce 4.14.2 tk: Gtk 3.24.13 info: xfce4-panel wm: xfwm4 
  dm: LightDM 1.30.0 Distro: Linux Mint 20 Ulyana base: Ubuntu 20.04 focal 
Machine:
  Type: Desktop System: ASUS product: All Series v: N/A serial: <filter> 
  Mobo: ASUSTeK model: H81M-C v: Rev X.0x serial: <filter> 
  UEFI: American Megatrends v: 3602 date: 03/26/2018 
CPU:
  Topology: Quad Core model: Intel Core i5-4690 bits: 64 type: MCP 
  arch: Haswell rev: 3 L2 cache: 6144 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
  bogomips: 27997 
  Speed: 2443 MHz min/max: 800/3900 MHz Core speeds (MHz): 1: 2443 2: 1902 
  3: 1620 4: 1881 
Graphics:
  Device-1: AMD Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] 
  vendor: Tul driver: amdgpu v: kernel bus ID: 01:00.0 chip ID: 1002:67df 
  Display: x11 server: X.Org 1.20.8 driver: amdgpu 
  unloaded: fbdev,modesetting,vesa alternate: ati resolution: 1920x1080~60Hz 
  OpenGL: renderer: Radeon RX 570 Series (POLARIS10 DRM 3.38.0 
  5.8.0-050800-generic LLVM 10.0.1) 
  v: 4.6 Mesa 20.3.0-devel (git-96cfc68 2020-08-12 focal-oibaf-ppa) 
  direct render: Yes 
Audio:
  Device-1: Intel 8 Series/C220 Series High Definition Audio vendor: ASUSTeK 
  driver: snd_hda_intel v: kernel bus ID: 00:1b.0 chip ID: 8086:8c20 
  Device-2: AMD Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] 
  vendor: Tul driver: snd_hda_intel v: kernel bus ID: 01:00.1 
  chip ID: 1002:aaf0 
  Sound Server: ALSA v: k5.8.0-050800-generic 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: ASUSTeK driver: r8169 v: kernel port: c000 bus ID: 04:00.0 
  chip ID: 10ec:8168 
  IF: enp4s0 state: up speed: 100 Mbps duplex: full mac: <filter> 
  Device-2: Ralink RT2800 802.11n PCI driver: rt2800pci v: 2.3.0 port: c000 
  bus ID: 06:00.0 chip ID: 1814:0601 
  IF: wlp6s0 state: down mac: <filter> 
  IF-ID-1: lxcbr0 state: down mac: <filter> 
Drives:
  Local Storage: total: 238.47 GiB used: 52.09 GiB (21.8%) 
  ID-1: /dev/sda vendor: LITE-ON IT model: LCT-256M3S size: 238.47 GiB 
  speed: 6.0 Gb/s serial: <filter> rev: VRDA scheme: GPT 
Partition:
  ID-1: / size: 233.24 GiB used: 52.08 GiB (22.3%) fs: ext4 dev: /dev/sda2 
Sensors:
  System Temperatures: cpu: 33.0 C mobo: N/A gpu: amdgpu temp: 48 C 
  Fan Speeds (RPM): N/A gpu: amdgpu fan: 242 
Repos:
  No active apt repos in: /etc/apt/sources.list 
  Active apt repos in: /etc/apt/sources.list.d/additional-repositories.list 
  1: deb https://dl.winehq.org/wine-builds/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/agornostal-ulauncher-focal.list 
  1: deb http://ppa.launchpad.net/agornostal/ulauncher/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list 
  1: deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main
  Active apt repos in: /etc/apt/sources.list.d/hamishmb-myppa-focal.list 
  1: deb http://ppa.launchpad.net/hamishmb/myppa/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/lutris-team-lutris-focal.list 
  1: deb http://ppa.launchpad.net/lutris-team/lutris/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/megasync.list 
  1: deb https://mega.nz/linux/MEGAsync/xUbuntu_20.04/ ./
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
  1: deb http://packages.linuxmint.com ulyana main upstream import backport
  2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
  3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
  4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
  5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
  6: deb http://archive.canonical.com/ubuntu/ focal partner
  Active apt repos in: /etc/apt/sources.list.d/oibaf-graphics-drivers-focal.list 
  1: deb http://ppa.launchpad.net/oibaf/graphics-drivers/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/teejee2008-ppa-focal.list 
  1: deb http://ppa.launchpad.net/teejee2008/ppa/ubuntu focal main
Info:
  Processes: 248 Uptime: 8h 15m Memory: 15.57 GiB used: 1.89 GiB (12.1%) 
  Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 9 Shell: bash 
  v: 5.0.17 running in: xfce4-terminal inxi: 3.0.38 
  

Re: AMD RX570 crashes in idling, amdgpu vs Kernel

Posted: Wed Aug 12, 2020 9:41 pm
by matthysjaroos
After doing "$ inxi -Fxxxrz" it crashed again luckly post stayed.

Re: AMD RX570 crashes in idling, amdgpu vs Kernel

Posted: Wed Aug 12, 2020 10:06 pm
by SMG
matthysjaroos wrote:
Wed Aug 12, 2020 9:31 pm
You can say that, but did it to see if it would fix the issue. Can downgrade the kernel again, but would not fix the problem. Struggle to downgrade Mesa though, but that would only be a temporary solution, because after a upgrade problem will return.
I didn't mean to imply that you should not have changed the kernel. Just make sure to check what video drivers are and are not loading when you use each of the kernels. Some options may work better with your hardware than others. Create a little grid so you can keep track of what is happening. That way when Mint makes changes you'll have an idea of what you might need to do for your system.

Re: AMD RX570 crashes in idling, amdgpu vs Kernel

Posted: Wed Aug 12, 2020 10:39 pm
by SMG
matthysjaroos wrote:
Wed Aug 12, 2020 9:14 am
I have a problem that my system keeps crashing on me if in idling mode. It crashes about 5min after boot.
This is what happened with the standard install (the one with the 5.4 kernel)? And has been happening with each of the subsequent kernel changes?

Sometimes the newest hardware needs to go to newer (non-LTS) kernels which is the route you've been trying. However, I did see posters on the last page of this thread with the same (or nearly the same) gpu and video card as your machine. The thread is a tutorial/discussion on the best drivers to use and the best way to install them (on the LTS kernel). Usually I hear of people experimenting with driver changes before doing anything with kernel changes. Maybe you'll find something helpful there.

I've also seen people posting who were running into video issues with LM20 Xfce, but I'm not sure it was the same hardware combo you have. Your initial post indicates crashing rather than screen issues so I'm not linking to that as it may not apply.

Re: AMD RX570 crashes in idling, amdgpu vs Kernel

Posted: Thu Aug 13, 2020 3:50 am
by matthysjaroos
SMG wrote:
Wed Aug 12, 2020 10:39 pm
matthysjaroos wrote:
Wed Aug 12, 2020 9:14 am
I have a problem that my system keeps crashing on me if in idling mode. It crashes about 5min after boot.
This is what happened with the standard install (the one with the 5.4 kernel)? And has been happening with each of the subsequent kernel changes?

Sometimes the newest hardware needs to go to newer (non-LTS) kernels which is the route you've been trying. However, I did see posters on the last page of this thread with the same (or nearly the same) gpu and video card as your machine. The thread is a tutorial/discussion on the best drivers to use and the best way to install them (on the LTS kernel). Usually I hear of people experimenting with driver changes before doing anything with kernel changes. Maybe you'll find something helpful there.

I've also seen people posting who were running into video issues with LM20 Xfce, but I'm not sure it was the same hardware combo you have. Your initial post indicates crashing rather than screen issues so I'm not linking to that as it may not apply.

Other desktop environment also give the same results, have tried older kernels, with little success, the update manager keeps nagging for kernel updates, even when blocking them, but found some "live" environments work beautifully until they update (peppermint OS 10/ LinuxFX 10.4/ there are others as well but these were the 2 most resent).

Re: AMD RX570 crashes in idling, amdgpu vs Kernel

Posted: Thu Aug 13, 2020 8:42 am
by SMG
Based on what I've read, Solved graphics crash while idle leading to system lock, it is possible it is a power/power management issue. That is outside of my current skillset, so I am unable to offer any advice on that issue.

I'm also not that familiar with other distributions, so hopefully someone else here will be able to offer some help.

Re: AMD RX570 crashes in idling, amdgpu vs Kernel

Posted: Thu Aug 13, 2020 9:46 am
by roblm
Try changing the processor C-states setting, which are idle power saving states that shutdown parts of the processor when the cores are unused.

Use this command to open the grub file: xed admin:///etc/default/grub

Change this line:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
To this:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_idle.max_cstate=0"
Then update grub and reboot: sudo update-grub

Start with intel_idle.max_cstate=0 which completely disables intel_idle (also dramatically increases power consumption). If you're able to run with that for a while with no freezes then continue to increase the max cstate by 1 until you find the highest number at which your PC freezes. Goes up to 9.

Re: AMD RX570 crashes in idling, amdgpu vs Kernel

Posted: Fri Aug 14, 2020 4:49 am
by matthysjaroos
Is there a way to disable GPU idling in grub?

Re: AMD RX570 crashes in idling, amdgpu vs Kernel

Posted: Fri Aug 14, 2020 5:14 am
by matthysjaroos
roblm wrote:
Thu Aug 13, 2020 9:46 am
Try changing the processor C-states setting, which are idle power saving states that shutdown parts of the processor when the cores are unused.

Use this command to open the grub file: xed admin:///etc/default/grub

Change this line:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
To this:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_idle.max_cstate=0"
Then update grub and reboot: sudo update-grub

Start with intel_idle.max_cstate=0 which completely disables intel_idle (also dramatically increases power consumption). If you're able to run with that for a while with no freezes then continue to increase the max cstate by 1 until you find the highest number at which your PC freezes. Goes up to 9.
Tried this not working, Is there a way for GPU idling?

Re: AMD RX570 crashes in idling, amdgpu vs Kernel

Posted: Fri Aug 14, 2020 4:04 pm
by roblm
matthysjaroos wrote: The only time it stays stable in idling mode was when tested with live session on LinuxFX 10.4 with kernel 5.8.0 and 20.0.8 mesa, but started to crash after update.
Did you mean after the initial installation? You can’t test a newer kernel while running a live session. I think you should not need such a new kernel or newest mesa package update for the age of your CPU and GPU.

This info comes from here:
https://wiki.gentoo.org/wiki/AMDGPU#Power_management

Use this command to check if DPM (dynamic power management) is set to performance mode for the GPU:

Code: Select all

cat /sys/class/drm/card0/device/power_dpm_state
If it is, then use this command to keep the GPU running with the highest clock speed:

Code: Select all

echo high | sudo tee /sys/class/drm/card0/device/power_dpm_force_performance_level
Test for system stability.

To reverse:

Code: Select all

echo auto | sudo tee /sys/class/drm/card0/device/power_dpm_force_performance_level

Re: AMD RX570 crashes in idling, amdgpu vs Kernel

Posted: Fri Aug 14, 2020 4:38 pm
by matthysjaroos
Just now screwed up my hole system, Tried to purge ppa: oibaf graphics drivers but it would not purge everything. I then did a "inxi -G" and saw the mesa still 20.3 oibaf, so used synaptic package manager and marked all oibaf associated packages with dependencies for total removal, after removal wanted to reinstall every package again except oibaf packages but were asking for restart first. Now when restarting it throws me to tty1 login screen. Can tty from 1-6 but not 7.

Re: AMD RX570 crashes in idling, amdgpu vs Kernel

Posted: Sat Aug 15, 2020 2:36 am
by matthysjaroos
matthysjaroos wrote:
Fri Aug 14, 2020 4:38 pm
Just now screwed up my hole system, Tried to purge ppa: oibaf graphics drivers but it would not purge everything. I then did a "inxi -G" and saw the mesa still 20.3 oibaf, so used synaptic package manager and marked all oibaf associated packages with dependencies for total removal, after removal wanted to reinstall every package again except oibaf packages but were asking for restart first. Now when restarting it throws me to tty1 login screen. Can tty from 1-6 but not 7.
startx on tty4 also not working "/etc/X11/xinit/xserverrc: 3: exec: /usr/bin/x: not found"

Re: AMD RX570 crashes in idling, amdgpu vs Kernel

Posted: Sat Aug 15, 2020 9:52 am
by roblm
matthysjaroos wrote: Just now screwed up my hole system, Tried to purge ppa: oibaf graphics drivers but it would not purge everything. I then did a "inxi -G" and saw the mesa still 20.3 oibaf, so used synaptic package manager and marked all oibaf associated packages with dependencies for total removal...
I wish you would have asked or did some research before doing that. Manually removing packages without checking how this affects other packages is a good way to mess up your system. From my experience, it’s very difficult, if not impossible, to reverse all the packages in a mesa update.

Here is an example of what installed packages are affected by a mesa update:
libegl-mesa0
libegl1-mesa
libgbm1
libgl1-mesa-dri
libgl1-mesa-glx
libglapi-mesa
libgles2-mesa
libglx-mesa0
libwayland-egl1-mesa
libxatracker2
mesa-va-drivers

That’s why you need to create a Timeshift restore point before installing any updates through Oibaf PPA.

Re: AMD RX570 crashes in idling, amdgpu vs Kernel

Posted: Sun Aug 16, 2020 2:52 am
by matthysjaroos
Did do a timeshift update "Rsync" method, but live could not detect the backup, so had to reinstall, but did not solve the problem. Luckly learned to copy user files also to backup drive so busy to restore all manually but takes longer with problem hanging around.

Re: AMD RX570 crashes in idling, amdgpu vs Kernel

Posted: Sun Aug 16, 2020 5:23 am
by matthysjaroos
roblm wrote:
Fri Aug 14, 2020 4:04 pm
matthysjaroos wrote: The only time it stays stable in idling mode was when tested with live session on LinuxFX 10.4 with kernel 5.8.0 and 20.0.8 mesa, but started to crash after update.
Did you mean after the initial installation? You can’t test a newer kernel while running a live session. I think you should not need such a new kernel or newest mesa package update for the age of your CPU and GPU.

This info comes from here:
https://wiki.gentoo.org/wiki/AMDGPU#Power_management

Use this command to check if DPM (dynamic power management) is set to performance mode for the GPU:

Code: Select all

cat /sys/class/drm/card0/device/power_dpm_state
If it is, then use this command to keep the GPU running with the highest clock speed:

Code: Select all

echo high | sudo tee /sys/class/drm/card0/device/power_dpm_force_performance_level
Test for system stability.

To reverse:

Code: Select all

echo auto | sudo tee /sys/class/drm/card0/device/power_dpm_force_performance_level
I don't know If it was this advice, but it now for 30min on desktop idle without crash (no YouTube) with oibaf PPA installed with 4.6 Vesa 20.3 mesa and kernel 5.8.1. will test it fully, then give feedback.

Re: AMD RX570 crashes in idling, amdgpu vs Kernel

Posted: Mon Aug 17, 2020 2:55 am
by matthysjaroos
Great news no more crashes, also running CoreCntl with high settings to insure that setting don't revert to auto. So this one is solved.

Re: AMD RX570 crashes in idling, amdgpu vs Kernel

Posted: Mon Aug 17, 2020 2:56 am
by matthysjaroos
It seems like My GPU hates it to be idle!!! :lol: :lol: :lol: