[snb] quakespasm triggers a reproducible GPU hang on Sandy Bridge
Submitted by bug..@..va.net
Assigned to Intel 3D Bugs Mailing List
Link to original bug (#108510)
Description
Bug description:
On my machine, playing quakespasm for long enough always results in a GPU hang. If using a current stable kernel (4.18.16), the game always appears to crash and exit within approximately 30 seconds of the hang, during which time the system is completely unresponsive and the rendered frame visibly changes only two or three times, with the audio buffer repeating itself. If using drm-tip, the kernel always seems to be able to recover from the hang within approximately 10 seconds, after which the game continues as normal but with some rendering artifacts. The artifacts manifest as:
- certain triangles consistently being filled with a shade of grey instead of a texture
- certain triangles being effectively transparent, rendering the scenery behind them visible
Once it has happened, the exact triangles that are affected remain the same, and the artifacts can thus be demonstrated by moving the player to a particular position and/or using the mouse to carefully orient the player's view. In other words, the artifacts are only visible from specific vantage points.
Sometimes, the hang is preceded by a precipitous frame rate drop - my eyes tell me from ~60 to under 30 - which can go on for minutes before the hang occurs. I have found this to be more often the case while using 4.18.16, as opposed to drm-tip. Sometimes, albeit very rarely, the hang occurs almost immediately after beginning a game.
After drm-tip recovers from the hang, it is possible that another one occurs before I choose to exit the game.
System environment:
-- chipset: Intel 6 Series / Sandy Bridge -- system architecture: 64-bit -- xf86-video-intel: 1:2.99.917+847+g25c9a2fc-1 -- xserver: 1.20.2-1 -- mesa: 18.2.2-1 -- libdrm: 2.4.96-1 -- kernel: 4.18.16.a-1-hardened -- Linux distribution: Arch -- Machine or mobo model: Lenovo Thinkpad X220 (i7-2640M) -- Display connector: DisplayPort (via UltraBase)
Reproducing steps:
- Launch quakespasm-0.93.1
- Play until hang occurs
Additional info:
I am using Gnome 3.30 without Wayland.
I have attached the captured error along with dmesg and journalctl output for an incident that occurred while running 4.18.16 and another while running drm-tip. The journalctl dump includes "quake.desktop" messages in addition to "kernel", so as to provide a little more context. In this particular case, it took a relatively long time for the (one) hang to occur with drm-tip, but this is atypical; normally it happens quickly.
I have also attached some screenshots that show some some of the rendering artifacts in the event that the game is able to continue running after the hang.
I mentioned that the observable effects of the hang can last up to 30 seconds or so while running a stable kernel. Interestingly, the few visible changes that occur during this time alway seem to follow a common pattern:
- a new frame is rendered normally
- a new frame is rendered abnormally, with numerous triangles unfilled or only filled with a grey colour
- a new frame is rendered, with the quakespasm (tilde) console being inexplicably visible
- the game crashes to desktop
The laptop was connected to an UltraBase docking station, with a DisplayPort link to a 1920x1200 panel. However, the bug manifests while undocked and running at the native resolution of 1366x768.
Sometimes, the laptop is subject to CPU throttling. As concerns the frame rate drops that sometiems precede the hang, I am not convinced that this is a significant factor. My reasoning is that quakespasm is a relatively undemanding engine, with almost no bells or whistles above and beyond the original (ancient) GLQuake engine. The machine can run somewhat more demanding games without comparable performance problems.