I have these two gpus in my laptop: 00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Wimbledon XT [Radeon HD 7970M] With xrandr --setprovideroffloadsink radeon Intel and then DRI_PRIME=1 glxgears it works fine on 3.13. On 3.14-rc1 it works for a short time, but then hangs occur. When trying with kwin it is kwin who is hanging, when trying with compton it is actually X. Hanging means they are unkillable, use 100% CPU (all red in htop detailed view) and the graphical output in X is completely blocked. It seems to be luck whether switching to a tty works. I filed this with intel because sysprof showed the cpu usage to originate from libdrm_intel.so when kwin hang. In the other sysprof log I did not see anything from intel, so maybe it's not actually intel's problem.
Created attachment 124311 [details] sysprof output: X hanging after rendering with PRIME
Created attachment 124321 [details] sysprof output: kwin hanging after rendering with PRIME
It looks to be memory corruption striking the shmemfs used to back swappable GEM objects (in both drivers). In both profiles, it is a deferred file cleanup hitting an infinite loop (my guess is that the cleanup itself is started by an OOPS and SIGKILL). So, it looks like the stuck CPU is another symptom. Please enable all the mm/vm and lockdep kernel debugging options and see if that generates clue.
I first did a bisect and I think (!) this is the result: 58aa6622d32af7d2c08d45085f44c54554a16ed7 is the first bad commit
This is probably TTM clearing page::mapping and page::index members of the Intel pages. I don't have time to put together a patch tonight, but probably tomorrow. /Thomas
Created attachment 124621 [details] Patch that may fix the problem Could you try the attached patch out to see if it fixes the problem?
Yes it fixes it, no lock ups anymore.
Great. I'll include the patch in my next pull request.
Thanks, fixed in rc2.