Bug 102277 - Intel DRI 2 can't grab the server within Dota 2
Summary: Intel DRI 2 can't grab the server within Dota 2
Status: RESOLVED WORKSFORME
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-18 03:04 UTC by Tod Jackson
Modified: 2017-08-20 22:23 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Xorg.0.log with Intel --enable-debug=full, gzipped (5.86 MB, application/gzip)
2017-08-18 08:29 UTC, Tod Jackson
no flags Details
video of tabbing attempt (8.93 MB, video/ogg)
2017-08-18 08:46 UTC, Tod Jackson
no flags Details
remaining dmesg (253.90 KB, text/plain)
2017-08-18 08:46 UTC, Tod Jackson
no flags Details

Description Tod Jackson 2017-08-18 03:04:06 UTC
"Alt-tabbing" does not work properly within Dota 2. I had previously thought this was a Ratpoison WM specific issue, but then I tested CWM and it exists also.

You basically cannot switch windows when xf86-vide-intel + DRI 2 and Dota 2 are running. Under Ratpoison it seems like there are issues grabbing the server (the "expectant" cursor appears under Ratpoison but then the screen just flickers. If you do manage to tab out, with persistence, once you tab in the screen continues to flicker as if it's waiting to be focused.

Seems to be a non-issue on DRI 3 and modesetting, however those are a non-solution without TearFree. TearFree is seriously mandatory on IvyBridge. :)

Tested xf86-video-intel at commit 2100efa105e8c9615eda867d39471d78e500b1bb and most up-to-date Ratpoison with and without an EWMH hack, as well as CWM 5.6.4.

This is actually about a year long issue so I'm very surprised it never got supported. That goes to myself as well. ;/
Comment 1 Chris Wilson 2017-08-18 07:52:28 UTC
Not aware of anything wrong with window switching since we fixed the last bug in Xorg circa xorg-server-1.18.3. Start with attaching your Xorg, but it sounds like we will need to trawl through --enable-debug=full to see what is actually being requested.
Comment 2 Chris Wilson 2017-08-18 07:59:39 UTC
Also, if you can a short video would be useful. From your description, it sounds like there is a stale tearfree backbuffer (which may be lost damage, i.e. we didn't copy across the changes made before switching), but I am not aware of Ratpoison so I don't know how that operates.
Comment 3 Tod Jackson 2017-08-18 08:29:08 UTC
Created attachment 133594 [details]
Xorg.0.log with Intel --enable-debug=full, gzipped

Xorg.0.log with Intel --enable-debug=full, gzipped
Comment 4 Tod Jackson 2017-08-18 08:45:58 UTC
While I was recording the server crashed so I'll attach what dmesg I have too. Hopefully you can play this ogv format recordmydesktop created, I was able to play it with mpv. The video shows me trying to tab out but I couldn't manage. I didn't spam it since I was afraid of another crash, but sometimes it works.
Comment 5 Tod Jackson 2017-08-18 08:46:40 UTC
Created attachment 133596 [details]
video of tabbing attempt
Comment 6 Tod Jackson 2017-08-18 08:46:58 UTC
Created attachment 133597 [details]
remaining dmesg
Comment 7 Chris Wilson 2017-08-18 08:52:54 UTC
(In reply to Tod Jackson from comment #4)
> While I was recording the server crashed so I'll attach what dmesg I have
> too. Hopefully you can play this ogv format recordmydesktop created, I was
> able to play it with mpv. The video shows me trying to tab out but I
> couldn't manage. I didn't spam it since I was afraid of another crash, but
> sometimes it works.

The crash will be an assertion, useful to know, but it may be one of the dubious sanity checks (there are quite a few consistency checks that forget they are acting on shared buffers for example). I did mean to go back and soften those asserts that are handled anyway (I made them explode to make it easier to debug).
Comment 8 Tod Jackson 2017-08-18 09:12:12 UTC
[  +0.000004] [drm:drm_atomic_set_fb_for_plane] Set [FB:51] for plane state ffff88000cf4d3c0
[  +0.000003] [drm:drm_atomic_check_only] checking ffff88002dbcd000
[  +0.000011] [drm:intel_plane_atomic_calc_changes] [CRTC:26:pipe A] has [PLANE:25:cursor A] with fb 51
[  +0.000004] [drm:intel_plane_atomic_calc_changes] [PLANE:25:cursor A] visible 1 -> 1, off 0, on 0, ms 0
[  +0.000009] [drm:drm_atomic_commit] commiting ffff88002dbcd000
[  +0.000012] [drm:drm_vblank_enable] enabling vblank on crtc 0, ret: 0
[  +0.000007] [drm:drm_calc_vbltimestamp_from_scanoutpos] crtc 0 : v 0x5 p(0,0)@ 138379.223796 -> 138379.223796 [e 0 us, 0 rep]
[  +0.000005] [drm:drm_update_vblank_count] updating vblank count on crtc 0: current=8281713, diff=0, hw=8282350 hw_last=8282350
[  +0.000005] [drm:vblank_disable_fn] disabling vblank on crtc 0
[  +0.000007] [drm:drm_calc_vbltimestamp_from_scanoutpos] crtc 0 : v 0x5 p(0,0)@ 138379.223813 -> 138379.223813 [e 0 us, 0 rep]
[  +0.000004] [drm:drm_update_vblank_count] updating vblank count on crtc 0: current=8281713, diff=0, hw=8282350 hw_last=8282350
[  +0.000010] [drm:drm_atomic_state_default_clear] Clearing atomic state ffff88002dbcd000
[  +0.000004] [drm:drm_mode_object_unreference] OBJ ID: 58 (2)
[  +0.000003] [drm:drm_mode_object_unreference] OBJ ID: 60 (2)
[  +0.000005] [drm:drm_mode_object_unreference] OBJ ID: 51 (4)
[  +0.000003] [drm:drm_atomic_state_free] Freeing atomic state ffff88002dbcd000
[  +0.000004] [drm:drm_mode_object_unreference] OBJ ID: 51 (3)
[  +0.295171] dota2[6076]: segfault at 0 ip 00007f51a9dad2c6 sp 00007ffc566cc430 error 4 in libclient.so[7f51a74be000+4aa8000]
[  +6.303233] [drm:drm_ioctl] pid=6163, dev=0xe200, auth=1, DRM_IOCTL_MODE_SETCRTC
[  +0.000006] [drm:drm_mode_setcrtc] [CRTC:26:pipe A]
[  +0.000004] [drm:drm_mode_setcrtc] [CONNECTOR:36:LVDS-1]
[  +0.000003] [drm:drm_atomic_state_init] Allocated atomic state ffff880084124800

I think libclient.so is from SDL 2. I just hours ago reported an mpv bug with that same library segfaulting. So something's broken on my system. That being said, I had this issue a long time ago on different distros. Still, interesting...
Comment 9 Tod Jackson 2017-08-20 22:23:26 UTC
After spending all day yesterday playing with this, I don't think it's an Intel bug. On other drivers in environments lacking moderm WMs the SDL in Dota has various problems, such as raising the window by itself.


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.