Bug 100648

Summary: [SKL] GPU hang while using KiCAD
Product: Mesa Reporter: Andreas Galauner <andreas>
Component: Drivers/DRI/i965Assignee: Intel 3D Bugs Mailing List <intel-3d-bugs>
Status: RESOLVED DUPLICATE QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium CC: intel-gfx-bugs
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: dmesg logfile
proper dmesg log (ignore the first version, it is incomplete)
/sys/class/drm/card1/error log
A representative schematic

Description Andreas Galauner 2017-04-11 01:11:04 UTC
Created attachment 130791 [details]
dmesg logfile

I'm experiencing gpu hangs followed by a crash of the complete display server when using the KiCAD schematic editor. It always takes a while to happen. I draw some stuff and every now and then the complete graphics output freezes until I'm thrown back out at GDM because everything crashed after the GPU reset.

Kernel: Current drm-intel-nightly (git rev e461ecfd413fb930d00f44f3de0019e528b4731f)
CPU: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
GPU: Intel Corporation HD Graphics 530 (rev 06)
Comment 1 Andreas Galauner 2017-04-11 01:14:44 UTC
Created attachment 130792 [details]
proper dmesg log (ignore the first version, it is incomplete)
Comment 2 Andreas Galauner 2017-04-11 01:15:12 UTC
Created attachment 130793 [details]
/sys/class/drm/card1/error log
Comment 3 Mark Janes 2017-04-21 00:44:48 UTC
I have looked at KiCAD on your graphics part and was unable to reproduce any gpu hangs with latest kernel/mesa and modesetting.

please take a look at https://bugs.freedesktop.org/show_bug.cgi?id=99582 and see if updating your mesa resolves your issue.
Comment 4 Andreas Galauner 2017-04-25 01:00:01 UTC
I performed some more work using KiCAD. No freezes occurred anymore. I think the bug can be safely closed.

Thank you for looking into it.
Comment 5 Andreas Galauner 2017-04-29 19:18:22 UTC
Okay, sorry to bug you again, but it just occurred again.

It always happens when I'm moving groups of selected things in the schematic editor around. It's pretty random when exactly it causes a hang or not.

Steps to reproduce:
1. Draw some stuff
2. Pull a selection box around it with the mouse
3. Move it around with either the mouse or arrow keys
4. Put it down, pick it back up, move around

Sooner or later this will cause hangs.

All packages on current Arch Linux:
KiCAD kicad-git r8038.bc8668b03-1
Mesa 17.0.4-2
Kernel drm-intel-nightly 9f955adc7ed1bbf9ada7dab63f39336a56ff1985
Comment 6 Ben Gamari 2017-11-06 14:10:04 UTC
What can I do to help here? I submitted #103398 which indeed looks like a duplicate of this. Unfortunately this bug affects me quite heavily as I see this at least once per hour when composing a Kicad schematic.

It has been several years since I have worked on i965, but I would be happy to try to take some time to debug this if someone could offer guidance.
Comment 7 Ben Gamari 2017-11-06 14:47:15 UTC
Also, note that this issue is triggered by Kicad's eeschema component; the bug cited earlier in this ticket, #99582, was triggered by pcbnew, which is a completely different program which (at least in newer versions) uses OpenGL for acceleration. In contrast, I believe eeschema only uses WX for drawing, which I believe in turn uses native X11 drawing primitives.
Comment 8 Matt Turner 2017-11-10 23:36:45 UTC

*** This bug has been marked as a duplicate of bug 103555 ***
Comment 9 Ben Gamari 2017-11-11 02:48:23 UTC
Created attachment 135390 [details]
A representative schematic

This is a schematic which reproduces the issue pretty easily on my machine with mesa 13.0.6 (I'll try a newer version shortly) and xf86-video-intel  2:2.99.917+git20161206-1 (i.e. whatever Debian Jessie ships with).

Open this file in eeschema, select all of the components by dragging, and furiously shake them around. Within a minute or so the GPU will hang, usually followed by a reset.
Comment 10 Ben Gamari 2017-11-11 02:49:54 UTC
(In reply to Ben Gamari from comment #9)
> Created attachment 135390 [details]
> A representative schematic
> 
> This is a schematic which reproduces the issue pretty easily on my machine
> with mesa 13.0.6 (I'll try a newer version shortly) and xf86-video-intel 
> 2:2.99.917+git20161206-1 (i.e. whatever Debian Jessie ships with).
> 
Whoops, by "Jessie" here I meant "Stretch". My apologies.
Comment 11 Elizabeth 2017-11-13 18:29:10 UTC
(In reply to Ben Gamari from comment #10)
> (In reply to Ben Gamari from comment #9)
> > Created attachment 135390 [details]
> > A representative schematic
> > 
> > This is a schematic which reproduces the issue pretty easily on my machine
> > with mesa 13.0.6 (I'll try a newer version shortly) and xf86-video-intel 
> > 2:2.99.917+git20161206-1 (i.e. whatever Debian Jessie ships with).
> > 
> Whoops, by "Jessie" here I meant "Stretch". My apologies.
Hello Ben, could you please attach schematic to bug 103555 and add your testing results to that bug. It will be really helpful right now. Thank you.

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.