Bug 89685 - Cripling Dota 2 freeze with Morphling at hero selection or loadout
Summary: Cripling Dota 2 freeze with Morphling at hero selection or loadout
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: 10.5
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
: 89059 89659 89954 90421 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-03-19 23:21 UTC by Kevin McCormack
Modified: 2018-04-03 06:27 UTC (History)
6 users (show)

See Also:
i915 platform:
i915 features:


Attachments
journalctl output (289.63 KB, text/plain)
2015-03-25 21:08 UTC, Kevin McCormack
Details
dmesg output (69.08 KB, text/plain)
2015-03-25 21:08 UTC, Kevin McCormack
Details
Xorg.0.log (56.00 KB, text/plain)
2015-04-04 01:16 UTC, Ivan Fomin
Details
glxinfo (59.95 KB, text/plain)
2015-04-04 01:17 UTC, Ivan Fomin
Details
kernel messages (276.12 KB, text/plain)
2015-04-04 01:18 UTC, Ivan Fomin
Details
dmesg output with R600_DEBUG (78.79 KB, text/plain)
2015-04-04 22:31 UTC, Kevin McCormack
Details
journalctl output with R600_DEBUG (15.09 KB, text/plain)
2015-04-04 22:31 UTC, Kevin McCormack
Details
All output when running Dota (1.29 MB, text/plain)
2015-04-29 00:31 UTC, Kevin McCormack
Details
Possible fix (2.85 KB, patch)
2015-04-29 01:53 UTC, Tom Stellard
Details | Splinter Review

Description Kevin McCormack 2015-03-19 23:21:07 UTC
So I am having a very bizare issue as recently. I noticed yesterday that I cannot play Morphling! If I select him during the hero selection or even try to view him in the loadout screen, my system completely freezes with no option but to do a hard reset. I cannot alt-tab, minimize to desktop, switch to any TTY and REISUB does not work. This ONLY happens with the hero morphling and seems to be an issue with graphics because it seems to happen when I am about to see his model loaded. I even deleted the one item I had for him. 

I verified the game files; no good. I deleted all local content and downloaded the game again...no good. This is either an issue with my graphics drivers and morphling or a Dota 2 and Linux issue. My wife is using Windows 8.1 and does not have this problem.


I am running an AMD R9 270X with linux 3.19.2 and mesa 10.5.1 where everything else works wonderfully!
Comment 1 Kevin McCormack 2015-03-25 21:08:07 UTC
Created attachment 114624 [details]
journalctl output
Comment 2 Kevin McCormack 2015-03-25 21:08:52 UTC
Created attachment 114625 [details]
dmesg output
Comment 3 Tom Stellard 2015-03-25 21:10:13 UTC
Can you run the game with R600_DEBUG=ps,vs,gs and post the output?
Comment 4 Ivan Fomin 2015-04-04 01:14:04 UTC
I got same issue when using llvm-3.6.0. With llvm-3.5.0 works perfect.

AMD R9 280X with linux 3.19.3
Comment 5 Ivan Fomin 2015-04-04 01:16:57 UTC
Created attachment 114857 [details]
Xorg.0.log
Comment 6 Ivan Fomin 2015-04-04 01:17:44 UTC
Created attachment 114858 [details]
glxinfo
Comment 7 Ivan Fomin 2015-04-04 01:18:40 UTC
Created attachment 114859 [details]
kernel messages
Comment 9 Kevin McCormack 2015-04-04 22:01:04 UTC
(In reply to Tom Stellard from comment #3)
> Can you run the game with R600_DEBUG=ps,vs,gs and post the output?

OK, sorry, I just saw this. So I know some of what I'm doing by not a lot. I do `export R600_DEBUG=ps,vs,gs` and then run the game? Where and how do I get output? dmesg? jounralctl? Something else?
Comment 10 Kevin McCormack 2015-04-04 22:28:45 UTC
I think this may be the problem and solution. I see there is a patch but I'm not sure how to test it. Is this patch currently part of mesa git? Will this patch be coming to mesa 10.5.3?

https://bugs.freedesktop.org/show_bug.cgi?id=89746
Comment 11 Kevin McCormack 2015-04-04 22:30:00 UTC
(In reply to Kevin from comment #9)
> (In reply to Tom Stellard from comment #3)
> > Can you run the game with R600_DEBUG=ps,vs,gs and post the output?
> 
> OK, sorry, I just saw this. So I know some of what I'm doing by not a lot. I
> do `export R600_DEBUG=ps,vs,gs` and then run the game? Where and how do I
> get output? dmesg? jounralctl? Something else?

I'm not sure if this is what you are looking for, but I am attaching new journalctl and dmesg outputs after enabling R600_DEBUG=ps,vs,gs
Comment 12 Kevin McCormack 2015-04-04 22:31:11 UTC
Created attachment 114868 [details]
dmesg output with R600_DEBUG
Comment 13 Kevin McCormack 2015-04-04 22:31:39 UTC
Created attachment 114869 [details]
journalctl output with R600_DEBUG
Comment 14 Michel Dänzer 2015-04-16 07:48:55 UTC
(In reply to Kevin from comment #9)
> I do `export R600_DEBUG=ps,vs,gs` and then run the game? Where and how do I
> get output? dmesg? jounralctl? Something else?

It should be in the stderr output of the game. Make sure you launch steam / the game from a terminal so you can see it, or maybe just capture it to a file with 2>/path/to/file.txt.
Comment 15 Kevin McCormack 2015-04-29 00:15:57 UTC
I'm assuming that this patch http://cgit.freedesktop.org/mesa/mesa/commit/?id=d64adc3a79e419062432cfa8d1cbc437676a3fbd has been incorporated to mesa by 10.5.4 and I can report that I still have the same issue. I also built mesa from git in Arch Linux using the AUR mesa-git and lib32-mesa-git tarballs, installed, and tried Dota with no success.
Comment 16 Kevin McCormack 2015-04-29 00:31:44 UTC
Created attachment 115420 [details]
All output when running Dota

Arch Linux 64-bit with kernel 4.0.0-rc7-gf22e6e8 and mesa 10.5.4
I ran these commands
export R600_DEBUG=ps,vs,gs
steam steam://rungameid/570 >~/Desktop/steamlog--2015-04-28.txt
Comment 17 Tom Stellard 2015-04-29 01:53:06 UTC
Created attachment 115421 [details] [review]
Possible fix

Does this patch help?
Comment 18 Kevin McCormack 2015-04-30 00:02:13 UTC
Tom, thank you for your help! I'm new to testing patches so this is what I did. I am using Arch and used the mesa-git in the AUR to build mesa from git. I did the following and got this message so I did not attempt to compile. 

cd ~/builds/mesa-git/src/mesa
$ patch -pl < ~/Downloads/0001-R600-SI-Add-VCC-as-an-implict-def-of-SI_KILL.patch 
patch: **** strip count l is not a number
Comment 19 Kevin McCormack 2015-04-30 00:24:47 UTC
OK, I now see that I am dumb and I typed -pl instead of p1. I downloaded mesa-10.5.4.tar.gz from ftp://ftp.freedesktop.org/pub/mesa/10.5.4/ and unpacked it. I then tried to patch but it seems the file needed is missing. Sorry for my noobness, I am trying to learn. 

$ patch -p1 < ~/Downloads/0001-R600-SI-Add-VCC-as-an-implict-def-of-SI_KILL.patch 
can't find file to patch at input line 16
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 36d89bfaa834151adbc56315c771e1ba7fa12c7f Mon Sep 17 00:00:00 2001
|From: Tom Stellard <thomas.stellard@amd.com>
|Date: Tue, 31 Mar 2015 17:52:24 +0000
|Subject: [PATCH] R600/SI: Add VCC as an implict def of SI_KILL
|
|When SI_KILL has a register operand, its lowered form writes to vcc.
|---
| lib/Target/R600/SIInstructions.td     |  9 ++++++---
| test/CodeGen/R600/llvm.AMDGPU.kill.ll | 16 ++++++++++++++++
| 2 files changed, 22 insertions(+), 3 deletions(-)
|
|diff --git a/lib/Target/R600/SIInstructions.td b/lib/Target/R600/SIInstructions.td
|index 95b2470..d1db4ab 100644
|--- a/lib/Target/R600/SIInstructions.td
|+++ b/lib/Target/R600/SIInstructions.td
--------------------------
File to patch: ^C
Comment 20 Kevin McCormack 2015-04-30 00:54:23 UTC
OK, so I just realized this patch needs to be applied against llvm...so I have downloaded 3.6.0 from http://llvm.org/releases/download.html#3.6.0 and applied your patch. I am now attempting to compile.

$ patch -p1 < ~/Downloads/0001-R600-SI-Add-VCC-as-an-implict-def-of-SI_KILL.patch 
patching file lib/Target/R600/SIInstructions.td
Hunk #1 succeeded at 1809 (offset -86 lines).
Hunk #2 succeeded at 1867 (offset -86 lines).
patching file test/CodeGen/R600/llvm.AMDGPU.kill.ll
Hunk #1 succeeded at 15 (offset -1 lines).
Comment 21 Kevin McCormack 2015-04-30 03:22:23 UTC
Alright, so I think I did this correctly, but it did not help. This is what I did...

cd ~/Downloads/llvm-3.6.0.src/
patch -p1 < ~/Downloads/0001-R600-SI-Add-VCC-as-an-implict-def-of-SI_KILL.patch 
cd ~/Downloads/llvm-cmake/
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=prefix=/usr/local ~/Downloads/llvm-3.6.0.src/
make
sudo make install

Then I rebooted and ran Dota 2 and tried to view Morphling in the loadout screen and my system froze the same as before. 

So I am thinking since Steam runs everything in 32-bit, that perhaps I need to apply this patch somehow to lib32-llvm?

Sorry again for not knowing how to do this properly.
Comment 22 Kevin McCormack 2015-05-02 19:24:26 UTC
Today I tried building and installing llvm from git but I still have the issue.
Could anyone tell me if it looks like I did this correctly? Do I need to do anything special for 32-bit vs 64-bit support? Should I remove llvm installed from Arch Linux repo before this?

mkdir llvm-git
cd llvm-git/
git clone http://llvm.org/git/llvm.git
cmake ~/builds/llvm-git/llvm/
cmake --build .
sudo cmake --build . --target install
Comment 23 Kevin McCormack 2015-05-03 20:21:38 UTC
Tom, thank you for your patch. I can confirm that this does indeed fix my issue. I was able to build and test it with ABS.
https://bbs.archlinux.org/viewtopic.php?pid=1525699#p1525699
Comment 24 Michel Dänzer 2015-05-13 02:00:21 UTC
*** Bug 90421 has been marked as a duplicate of this bug. ***
Comment 25 Timothy Arceri 2018-04-03 03:43:39 UTC
*** Bug 89059 has been marked as a duplicate of this bug. ***
Comment 26 Timothy Arceri 2018-04-03 03:45:10 UTC
*** Bug 89659 has been marked as a duplicate of this bug. ***
Comment 27 Timothy Arceri 2018-04-03 06:27:56 UTC
*** Bug 89954 has been marked as a duplicate of this bug. ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.