Bug 178281 - wine-staging apps freezes the machine with RX460
Summary: wine-staging apps freezes the machine with RX460
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(DRI - non Intel) (show other bugs)
Hardware: x86-64 Linux
: P1 blocking
Assignee: drivers_video-dri
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-18 11:17 UTC by fin4478
Modified: 2018-12-05 02:31 UTC (History)
3 users (show)

See Also:
Kernel Version: 4.9-rc1, 4.8.2, amd-staging-4.7
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description fin4478 2016-10-18 11:17:11 UTC
When running Unigine Heaven windows version benchmark my computer always freezes at scene 8. Freezing happens when using Tomb Raider 2013 windows version benchmark too. Ssh connection works but I can not kill the hanging app and virtual terminal and keyboard does not work. Rebooting via shh does not work either. No dmesg or other log events can be seen when this happens. Running native Linux Heaven benchmark or other native games runs ok.

glxinfo | grep OpenGL
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD POLARIS11 (DRM 3.3.0 / 4.7.0-g1ed6b7d-dirty, LLVM 4.0.0)
OpenGL core profile version string: 4.3 (Core Profile) Mesa 12.1.0-devel - padoka PPA
OpenGL core profile shading language version string: 4.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 12.1.0-devel - padoka PPA
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 12.1.0-devel - padoka PPA
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

I will not use amdgpu-pro driver, because wine-staging csmt feature does not work with it and amdgpu-pro does not support latest kernels.
Comment 1 Alex Deucher 2016-10-18 14:16:45 UTC
This is more likely a mesa issue than a kernel issue.
Comment 2 fin4478 2016-10-18 16:42:25 UTC
So tell your driver page for non ubuntu users what mesa and kernel works so that rx460 has best performance, works with wine-staging and gallium nine and Rosegarden  plays midi and sw synth tracks. I have now 2 days searching and testing and not found. After 4.7.8 Rosegarden does not work and before that rx460 performance is bad. My current amd-staging-4.7 have sudden panics boot and next I try drm-next-4.10 where Rosegarden do not work but I will see how are the graphics and system stability.
Comment 3 Alex Deucher 2016-10-18 17:12:54 UTC
What version of mesa are you using?
Comment 4 fin4478 2016-10-18 18:35:36 UTC
I have tested Mesa 12.1.0-devel - padoka and Oibaf ppa and Debian testing 12.0.3-1. Same problem with kernel that have latest powerplay code. Now I am using kernel 4.7.8 that has a poor graphics performance but seems to stable and Rosegarden works. My RX460 is as fast my A8-7600 that I had before. Amd linux drivers have been going down hill since I bought the A8-7600 two years ago, Then it was a surprise how well it worked with Catalyst. Only solution I found now is to install win10 to my test partition If I want to enjoy rx460. At the same time my kid plays fine with Nvidia 750ti and Debian testing while I am searching drivers.
Comment 5 fin4478 2016-10-19 07:12:59 UTC
I did not have KVM support enabled in the kernel when using Kaveri. Enabling it seems to stabilize amd-stagin-4.7 kernel so that sudden reboots do not happen, I  hope. TR 2013 I could tune so that the benchmark works but Heaven still hangs my machine, now in the end of the benchmark. Padoka ppa mesa and wine-staging used.
Comment 6 Nicolai Hähnle 2016-10-19 11:24:17 UTC
Can you post a dmesg log of when the hang happens?
Comment 7 fin4478 2016-10-19 12:56:18 UTC
There is just boot traces in dmesg, journalctl and Xorg.0.log when my computer desktop hangs and checking with ssh.
Comment 8 fin4478 2016-10-19 14:19:40 UTC
I made my kernel slower by enabling debug and setting cpu timer from 300Hz to 250Hz. Now my desktop does not hang with TR 2013 and Heaven benchmarks although Heaven hangs when using 8x antialising but I can kill that.

Amd should put their .config to public and highlight the following kernel settings:
IRQ Quirks, Amdgpu PowerPlay, KVM, use a debug kernel and 250MHz timer.
Comment 9 fin4478 2016-10-21 15:40:54 UTC
Now when I am playing TR 2013 with wine-1.9.21 (Staging) csmt enabled, gaming will will hang my machine when having fast actions. 10-20 minutes gaming is possible without rebooting.
Using 64-bit ubuntu server kernel from here:
http://www.yourownlinux.com/2016/10/how-to-install-linux-kernel-4-9-rc1-in-linux.html
Playing the game at 1920x1200 normal settings.

I have played the game many times  with A8-7600 and amdgpu kernel driver without hanging. The hardware and software has been the same except now I have carrizo cpu and polaris gpu.

My hardware:
XFX RX460 2GB DDR5
Amd X4 845 Carrizo cpu
Asus A88XM-E motherboard
8GB 2133MHz ddr3
SanDisk SDSSDA240G

OS: Debian testing Xfce with Padoka ppa Mesa 12.1.0-devel. 

No events in logs, because hanging happens so fast.
Comment 10 fin4478 2016-10-22 10:05:28 UTC
Inspired by  internet discussions of the amdgpu driver, I played Team Fortress 2 native version from Steam and the game hangs my machine in the practice mode in couple of minutes. I need to reboot like I need to with TR2013 windows game. Amd should increase the stability of this driver.
Comment 11 fin4478 2016-10-26 00:22:54 UTC
I made TF2 gaming stable by  disabling kernel debugging and setting cpu timer to 300Hz.
Comment 12 fin4478 2016-10-28 04:41:44 UTC
With Tomb Raider Legend the game hangs Xserver in one minute when playing at fullhd.Dropping resolution to 720p allows to play stable. drm-next-4.10-wip and Oipaf ppa mesa from yesterday used. There is no matter if csmt in wine-staging is enabled or not.

OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD POLARIS11 (DRM 3.9.0 / 4.9.0-rc2+, LLVM 3.9.0)
OpenGL core profile version string: 4.3 (Core Profile) Mesa 13.1.0-devel
OpenGL core profile shading language version string: 4.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 13.1.0-devel
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 13.1.0-devel
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

I needed to configure 4.9 kernel like a stock laptop kernel to make it more stable when gaming.
Comment 13 fin4478 2016-10-28 06:22:07 UTC
I tested  latest drm-next-4.10-wip  today that have couple of more patches that yesterday. Still Xserver hangs when playing Tomb Raider Legend at full hd.

With dmesg, I have these errors at boot:
[    3.466266] amdgpu 0000:01:00.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0xffff
[    3.466706] ATOM BIOS: C99401


[    3.479722] [drm] amdgpu: irq initialized.
[    3.479730] Can't find requested voltage id in vdd_dep_on_sclk table!
Comment 14 fin4478 2016-10-28 06:58:28 UTC
One hour ago published Oibaf Mesa fixed Xserver hanging when playing TR Legend at fullhd.
https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers/+packages
Comment 15 fin4478 2016-10-28 11:10:31 UTC
New Mesa did not fix this. Playing at fullhd TR Legend still hangs xserver in 3 minutes. Tried 2 times, same effect. Works as good as with an 300Hz overclocked non debug 4.9-rc2 kernel from kernel.org, where Unigine Heaven windows benchmark runs ok. 

I do not know why my first gameplay after updating mesa was long and did not hang xserver.
Comment 16 fin4478 2016-11-02 09:10:27 UTC
Recent drm-next-4.10-wip and Mesa changes have made wine-staging gaming more stable. TR 2013,  Legend and Underworld works now at my monitor native 1920x1200 resolution. To play TR 2013 without desktop hanging, I needed to disable Post Processing, Anti-Aliasing, SSAO and set Texture Filter to Bilinear. Other settings can be ultra and high.

I thank driver developers for fast fixes.

Note You need to log in before you can comment on or make changes to this bug.