Bug 194766 - [drm:pid12:i915_hangcheck_elapsed] [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
Summary: [drm:pid12:i915_hangcheck_elapsed] [drm:pid12:i915_hangcheck_hung] *ERROR* Ha...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Many People
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-02 19:01 UTC by Ivan Klymenko
Modified: 2023-03-01 10:00 UTC (History)
16 users (show)

See Also:


Attachments
dmesg.txt (19.85 KB, text/plain)
2014-11-02 19:01 UTC, Ivan Klymenko
no flags Details
pciconf_lvbce.txt (11.35 KB, text/plain)
2014-11-02 19:01 UTC, Ivan Klymenko
no flags Details
devinfo_vr.txt (15.40 KB, text/plain)
2014-11-02 19:02 UTC, Ivan Klymenko
no flags Details
hw.dri.0.info.i915_error_state.log-11.10.2013 (233.83 KB, application/x-bzip)
2014-11-02 19:06 UTC, Ivan Klymenko
no flags Details
hw.dri.0.info.i915_error_state.log1-02.12.2013 (250.03 KB, application/x-bzip)
2014-11-02 19:07 UTC, Ivan Klymenko
no flags Details
hw.dri.0.info.i915_error_state.log2-16.02.2014 (235.12 KB, application/x-bzip)
2014-11-02 19:07 UTC, Ivan Klymenko
no flags Details
hw.dri.0.info.i915_error_state.log3-04.06.2014 (264.26 KB, application/x-bzip)
2014-11-02 19:08 UTC, Ivan Klymenko
no flags Details
hw.dri.0.info.i915_error_state.log4-24.10.2014 (230.19 KB, application/x-bzip)
2014-11-02 19:08 UTC, Ivan Klymenko
no flags Details
hw.dri.0.info.i915_error_state.log5-30.10.2014 (230.67 KB, application/x-bzip)
2014-11-02 19:08 UTC, Ivan Klymenko
no flags Details
hw.dri.0.info.i915_error_state.log6-02.11.2014 (231.82 KB, application/x-bzip)
2014-11-02 19:09 UTC, Ivan Klymenko
no flags Details
hw.dri.0.info.i915_error_state.log7-12.11.2014 (245.32 KB, application/x-bzip)
2014-11-12 18:56 UTC, Ivan Klymenko
no flags Details
hw.dri.0.info.i915_error_state.txt (truncated) (3.03 KB, text/plain)
2015-01-26 21:48 UTC, Lars Engels
no flags Details
hw.dri.0.info.i915_error_state.log-next (280.15 KB, application/x-bzip)
2015-08-27 13:12 UTC, Ivan Klymenko
no flags Details
hw.dri.0.info.i915_error_state.log-next1 (277.24 KB, application/x-bzip)
2015-08-27 13:12 UTC, Ivan Klymenko
no flags Details
Makefile diffs between 10.1-RELEASE-p19 and 10.2-RELEASE-p2 (5.83 KB, text/plain)
2015-09-12 20:21 UTC, Kenneth Salerno
no flags Details
dev/drm2 diffs between 10.1-RELEASE-p19 and 10.2-RELEASE-p2 (395.07 KB, application/gzip)
2015-09-12 20:22 UTC, Kenneth Salerno
no flags Details
drm error edited+comments (28 bytes, text/plain)
2015-11-22 15:10 UTC, rhs
no flags Details
hw.dri.0.info.i915_error_state_15.12.2015 (368.17 KB, application/gzip)
2015-12-15 10:52 UTC, Ivan Klymenko
no flags Details
hw.dri.0.info.i915_error_state_09.05.2016 (279.98 KB, application/x-bzip)
2016-05-09 18:58 UTC, Ivan Klymenko
no flags Details
Kernel kludge: reduce the "hung" wait from 60s to 6s. (502 bytes, patch)
2018-05-06 12:35 UTC, Anonymized Account
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Klymenko 2014-11-02 19:01:07 UTC
Created attachment 148946 [details]
dmesg.txt

I consistently keep getting this problem for several years.

dmesg
...
error: [drm:pid12:i915_hangcheck_elapsed] *ERROR* Hangcheck timer elapsed... GPU hung
info: [drm] capturing error event; look for more information in sysctl hw.dri.0.info.i915_error_state
error: [drm:pid6:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
Comment 1 Ivan Klymenko 2014-11-02 19:01:57 UTC
Created attachment 148947 [details]
pciconf_lvbce.txt
Comment 2 Ivan Klymenko 2014-11-02 19:02:24 UTC
Created attachment 148948 [details]
devinfo_vr.txt
Comment 3 Ivan Klymenko 2014-11-02 19:06:59 UTC
Created attachment 148949 [details]
hw.dri.0.info.i915_error_state.log-11.10.2013
Comment 4 Ivan Klymenko 2014-11-02 19:07:24 UTC
Created attachment 148950 [details]
hw.dri.0.info.i915_error_state.log1-02.12.2013
Comment 5 Ivan Klymenko 2014-11-02 19:07:43 UTC
Created attachment 148952 [details]
hw.dri.0.info.i915_error_state.log2-16.02.2014
Comment 6 Ivan Klymenko 2014-11-02 19:08:08 UTC
Created attachment 148953 [details]
hw.dri.0.info.i915_error_state.log3-04.06.2014
Comment 7 Ivan Klymenko 2014-11-02 19:08:27 UTC
Created attachment 148954 [details]
hw.dri.0.info.i915_error_state.log4-24.10.2014
Comment 8 Ivan Klymenko 2014-11-02 19:08:46 UTC
Created attachment 148955 [details]
hw.dri.0.info.i915_error_state.log5-30.10.2014
Comment 9 Ivan Klymenko 2014-11-02 19:09:07 UTC
Created attachment 148956 [details]
hw.dri.0.info.i915_error_state.log6-02.11.2014
Comment 10 Ivan Klymenko 2014-11-12 18:56:50 UTC
Created attachment 149332 [details]
hw.dri.0.info.i915_error_state.log7-12.11.2014
Comment 11 Ivan Klymenko 2014-11-19 08:42:01 UTC
Someone who understands what to do with it all?
Comment 12 Lars Engels freebsd_committer freebsd_triage 2015-01-26 21:47:39 UTC
I am also seeing this on several Thinkpad T530 with Ivy Bridge graphics on 10.1-RELEASE.

agp0: <IvyBridge mobile GT2 IG> on vgapci1
agp0: aperture size is 256M, detected 65532k stolen memory
 
info: [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
info: [drm] Driver supports precise vblank timestamp query.
drmn1: taking over the fictitious range 0xe0000000-0xf0000000
fbd1 on drmn1
VT: Replacing driver "vga" with new "fb".
info: [drm] Initialized i915 1.6.0 20080730
error: [drm:pid12:i915_hangcheck_elapsed] *ERROR* Hangcheck timer elapsed... GPU hung
info: [drm] capturing error event; look for more information in sysctl hw.dri.0.info.i915_error_state
pid 969 (fluxbox), uid 0: exited on signal 6 (core dumped)
Comment 13 Lars Engels freebsd_committer freebsd_triage 2015-01-26 21:48:39 UTC
Created attachment 152206 [details]
hw.dri.0.info.i915_error_state.txt (truncated)
Comment 14 Lars Engels freebsd_committer freebsd_triage 2015-01-26 21:51:03 UTC
A workaround for this is to disable DRI in xorg.conf (as found at [1]):

Section "Device"
Identifier "Card0"
Driver "intel"
Option "Shadow" "true"
Option "DRI" "false"
BoardName "Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device (rev 01)"
BusID "PCI:0:2:0"
EndSection


[1] http://ubuntuforums.org/showthread.php?t=1739646&s=5e5d32babc31e48922fea23242195367&p=10922238#post10922238
Comment 15 Ivan Klymenko 2015-01-26 22:00:23 UTC
(In reply to Lars Engels from comment #14)
I would not like to give up while OpenGL...
Comment 16 Konstantin Belousov freebsd_committer freebsd_triage 2015-01-29 13:34:36 UTC
You have RC6 enabled.

info: [drm] Enabling RC6 states: RC6 on, RC6p on, RC6pp on

Did you changed this manually, or driver mis-managed the setting ?
Comment 17 Lars Engels freebsd_committer freebsd_triage 2015-01-29 13:51:50 UTC
I don't know how I would have enabled that. :) sysctl or loader.conf?
Comment 18 Ivan Klymenko 2015-01-29 14:07:25 UTC
(In reply to Konstantin Belousov from comment #16)
Yes I changed this option manually in loader.conf
drm.i915.enable_rc6 = 7
But disabling this option does not affect to reproduce bug.

I found both guaranteed to reproduce the bug on my HW:
use in Firefox html5 video playback, which is involved gstreamer with hardware video decoding.
And after a while watching the video appears this bug.

In other circumstances, is more difficult to understand because of what is happening bug.

The only thing that would add - is widely used OpenGL WM - compton, or any other OpenGL WM.
Comment 19 Lars Engels freebsd_committer freebsd_triage 2015-01-29 15:00:17 UTC
On the non-working T530 the setting is not set in loader.conf.
Comment 20 Marcus von Appen freebsd_committer freebsd_triage 2015-02-18 11:54:21 UTC
Updated 10.1-BETA and 10.1-RC versioned bugs to 10.1-STABLE.
Comment 22 Glen Barber freebsd_committer freebsd_triage 2015-07-07 15:55:54 UTC
Is this still an issue on 10.2-PRERELEASE?
Comment 23 Ivan Klymenko 2015-07-23 09:31:43 UTC
The console displays a lot of these messages:
...
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
info: [drm] capturing error event; look for more information in sysctl hw.dri.0.info.i915_error_state
info: [drm] Enabling RC6 states: RC6 on, RC6p on, RC6pp on
error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
info: [drm] Enabling RC6 states: RC6 on, RC6p on, RC6pp on
error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
info: [drm] Enabling RC6 states: RC6 on, RC6p on, RC6pp on
error: [drm:pid1499:gen6_sanitize_pm] *ERROR* Power management discrepancy: GEN6_RP_INTERRUPT_LIMITS expected 18000000, was 12060000
error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
info: [drm] Enabling RC6 states: RC6 on, RC6p on, RC6pp on
error: [drm:pid1499:gen6_sanitize_pm] *ERROR* Power management discrepancy: GEN6_RP_INTERRUPT_LIMITS expected 18000000, was 12060000
error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
info: [drm] Enabling RC6 states: RC6 on, RC6p on, RC6pp on
error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
info: [drm] Enabling RC6 states: RC6 on, RC6p on, RC6pp on
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid1499:gen6_sanitize_pm] *ERROR* Power management discrepancy: GEN6_RP_INTERRUPT_LIMITS expected 180d0000, was 12060000
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
error: [drm:pid17:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer

...
Comment 24 Andrew Stevenson 2015-08-02 15:39:04 UTC
As another data point, I get a lot of:

Aug  2 13:14:18 sanna kernel: error: [drm:pid3:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
Aug  2 13:15:03 sanna kernel: error: [drm:pid3:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer

messages but not the other ones so maybe there are two issues? I'm using 10.2-PRERELEASE (r285858) and a GMA950 video controller.
Comment 25 Ivan Klymenko 2015-08-27 13:09:59 UTC
uname -a
FreeBSD nonamehost.local 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r287198: Thu Aug 27 12:59:19 EEST 2015     ivan@nonamehost.local:/media/da0s1/obj/usr/src/sys/mk11  amd64

error: [drm:pid1475:gen6_sanitize_pm] *ERROR* Power management discrepancy: GEN6_RP_INTERRUPT_LIMITS expected 18000000, was 12000000
pid 1732 (gsettings-data-conv), uid 1001: exited on signal 5
pid 1789 (xfce4-power-manager), uid 1001: exited on signal 11
error: [drm:pid1475:gen6_sanitize_pm] *ERROR* Power management discrepancy: GEN6_RP_INTERRUPT_LIMITS expected 180d0000, was 18000000
pid 1699 (wrapper-1.0), uid 1001: exited on signal 10
pid 3428 (wrapper-1.0), uid 1001: exited on signal 11
error: [drm:pid1475:gen6_sanitize_pm] *ERROR* Power management discrepancy: GEN6_RP_INTERRUPT_LIMITS expected 000d0000, was 180d0000
error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
info: [drm] capturing error event; look for more information in sysctl hw.dri.0.info.i915_error_state
info: [drm] Enabling RC6 states: RC6 on, RC6p on, RC6pp on
error: [drm:pid1475:gen6_sanitize_pm] *ERROR* Power management discrepancy: GEN6_RP_INTERRUPT_LIMITS expected 180d0000, was 12060000
error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
Comment 26 Ivan Klymenko 2015-08-27 13:12:13 UTC
Created attachment 160405 [details]
hw.dri.0.info.i915_error_state.log-next
Comment 27 Ivan Klymenko 2015-08-27 13:12:38 UTC
Created attachment 160406 [details]
hw.dri.0.info.i915_error_state.log-next1
Comment 28 Kenneth Salerno 2015-09-11 16:45:27 UTC
I am seeing this issue in 10.2-RELEASE{,-p1,-p2} through 10-STABLE. drm2 and i915kms was working for me in 10.1-RELEASE.
Comment 29 Kenneth Salerno 2015-09-12 20:12:29 UTC
I just built kernel 10.1-RELEASE-p19 and can confirm drm2/i915kms and Xv are working great.

I previously built kernels 11-CURRENT, 10-STABLE, 10.2-RELEASE-p2 and all had a broken drm2 with hung GPU that cannot be reset and broken Xv as described by Ivan Klymenko.

For now, I am stuck running the 10.1-RELEASE-p19 kernel with my 10.2-RELEASE-p2 world until someone can take a look at what was introduced in 10.2 that broke drm2 for i915 chipsets.

Thank you!
Comment 30 Kenneth Salerno 2015-09-12 20:21:08 UTC
Created attachment 160959 [details]
Makefile diffs between 10.1-RELEASE-p19 and 10.2-RELEASE-p2
Comment 31 Kenneth Salerno 2015-09-12 20:22:15 UTC
Created attachment 160960 [details]
dev/drm2 diffs between 10.1-RELEASE-p19 and 10.2-RELEASE-p2
Comment 32 ml 2015-11-16 10:57:51 UTC
Just a me too...

The hardware is an Acer TM-B113:

agp0: <SandyBridge mobile GT1 IG> on vgapci0
agp0: aperture size is 256M, detected 131068k stolen memory
info: [drm] Initialized drm 1.1.0 20060810
drmn0: <Intel SandyBridge (M)> on vgapci0
info: [drm] MSI enabled 1 message(s)
info: [drm] AGP at 0xb0000000 256MB

I'm running 10.1/amd64 with:
libdrm-2.4.65_1,1
xf86-video-intel-2.21.15_9
xorg-server-1.17.4,1



The hang has started recently (or at least its incidence has increased a lot).
There is no day I can work with this laptop without one/two hangs.


This is very annoying, so I'm looking for help on one side and offering to do any testing on the other.
Thanks.
Comment 33 rhs 2015-11-22 15:10:14 UTC
Created attachment 163422 [details]
drm error edited+comments
Comment 34 rhs 2015-11-22 15:15:04 UTC
This machine seems to "hang" while left unattended. Have never had the problem while editing etc. Information and comments in link.
Comment 35 rhs 2015-11-22 15:27:10 UTC
Comment on attachment 163422 [details]
drm error edited+comments

This machine seems to "hang" while left unattended. Have never had the problem while editing etc. Information and comments in link.
Comment 36 Ivan Klymenko 2015-12-15 10:52:25 UTC
Created attachment 164264 [details]
hw.dri.0.info.i915_error_state_15.12.2015
Comment 37 rhs 2015-12-27 15:31:39 UTC
Try adding <drm.i915.semaphores="1"> to </boot/loader.conf>. I have tested this for over 1wk now and have not had any hangs. I cannot find running instances of additional drm semaphores in my system. Maybe someone can tell me how to trap them?
Hope this works for you as well.
Happy New Year

rhs
Comment 38 Ivan Klymenko 2016-01-07 17:47:03 UTC
(In reply to rhs from comment #37)

At first glance it seems to help get rid of the problem, but ...
I got in the moments of X full lock system.
Perhaps in these moments just happen GPU hung without the option drm.i915.semaphores = "1"
Comment 39 Kenneth Salerno 2016-01-08 14:47:32 UTC
First of all, this bug has been open 14 months. I would like to believe there are fbsd developers left out there that care about laptop/desktop issues, and so I wait. I upgraded to 10.2-RELEASE multiple times to try each "fix" and then downgraded back to 10.1-RELEASE to have a working Xv acceleration again, but at this point I will wait until I see a code fix enter the 10.2-RELEASE branch rather than try any more "workarounds" (and a clue for other users, it is in the drm2 driver not drm), or wait and see if 10.3-RELEASE incorporates changes from 11-CURRENT that fix the i915kms/drm2 code.

This bug is the result of the import of Linux kernel modeset driver code that brought the bug along with the version that was copied. If you search through Linux kernel bug reports you'll see they had the same issue, and freebsd svn logs confirm the wholesale import. Looking through the latest 11-CURRENT branch, I see some attempts in the code to stop the GPU hung messages from appearing but personally have not tested if that is a cosmetic bandaid or not.
Comment 40 ml 2016-01-17 17:06:36 UTC
(In reply to Ivan Klymenko from comment #38)

I followed your suggestion and added this tweak a few work days ago: so far, so good.
I have never experienced a lockup since; however these lockups were not so frequent lately in any case, so it's hard to tell for sure whether this solved.
I'll let you know if my GPU locks up again.

Thanks.
Comment 41 Kenneth Salerno 2016-04-16 15:36:59 UTC
This (drm2) is fixed in 10.3-RELEASE.
Comment 42 Mark Linimon freebsd_committer freebsd_triage 2016-04-18 00:59:47 UTC
Apparently fixed in 10.3-RELEASE.
Comment 43 Ivan Klymenko 2016-05-09 18:57:07 UTC
uname -a
FreeBSD nonamehost.local 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r299257: Mon May  9 16:26:05 EEST 2016     ivan@nonamehost.local:/media/da0s1/obj/usr/src/sys/mk11  amd64


...
error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
info: [drm] capturing error event; look for more information in sysctl hw.dri.0.info.i915_error_state
error: [drm:pid0:i915_reset] *ERROR* Failed to reset chip.
Comment 44 Ivan Klymenko 2016-05-09 18:58:15 UTC
Created attachment 170154 [details]
hw.dri.0.info.i915_error_state_09.05.2016
Comment 45 Anonymized Account freebsd_committer freebsd_triage 2018-04-10 17:17:52 UTC
Not fixed, ok?

I still get this as of 11.1 -- and been since 10.0 or before, thinking it was my hardware.

I found a more or less reliable way to cause it: do a lot of 2D graphics -- like drawing something in graphics/inkscape or in WED from games/xptools. Happens at least once in half an hour and is very annoying.

I don't know if related, but I also often get corruption like missing/blinking characters in fonts, broken transparency and black areas with dark blue dots that sometimes move/blink. Sometimes they show up in 3d textures as well.

Should I attach hw.dri.0.info.i915_error_state next time this happens?

Or could anyone at least point me to a setting in the kernel sources defining how often the hangcheck happens -- so that I have to wait only 10 seconds instead of sitting there for a whole minute each time it hangs?

Cheers,
Mike
Comment 46 Anonymized Account freebsd_committer freebsd_triage 2018-04-10 17:21:01 UTC
Actually I mean from 10.something, haven't seriously used intel graphics before that, maybe it was something else.
Comment 47 Ivan Klymenko 2018-04-30 21:12:56 UTC
(In reply to Michael Danilov from comment #45)
For all these years the problem has not been resolved.
I ran out of patience - I closed this bug report with sarcasm that "Works As Intended".
Comment 48 Eitan Adler freebsd_committer freebsd_triage 2018-05-01 02:53:07 UTC
Yes bugs suck. Bugs that have been reported but not fixed suck more. But I'd rather have a record of us sucking than closing more bugs.
Comment 49 Niclas Zeising freebsd_committer freebsd_triage 2018-05-01 10:22:57 UTC
Have you tried drm-next-kmod or drm-stable-kmod? It's the new graphics drivers for intel graphics cards, and radeon graphics cards.
Comment 50 Ivan Klymenko 2018-05-01 10:32:00 UTC
(In reply to Niclas Zeising from comment #49)
No. I use Linux for several years. At that time there were no such ports.
Comment 51 Anonymized Account freebsd_committer freebsd_triage 2018-05-01 13:02:00 UTC
Is it supported on 11.x? The IGNORE message for 11.x says it is "not supported on 10.x or older", but it is still IGNORE for 11.x.
Comment 52 Niclas Zeising freebsd_committer freebsd_triage 2018-05-01 15:43:33 UTC
(In reply to Michael Danilov from comment #51)

graphics/drm-stable-kmod is supported on 11 stable and the upcoming 11.2 release.
Comment 53 Anonymized Account freebsd_committer freebsd_triage 2018-05-01 16:24:56 UTC
Ok, that means just waiting for at least 3 months.

Is there a way to force the hangcheck to happen more often then? I have not found any variable defining the interval in kernel sources.
Comment 54 Anonymized Account freebsd_committer freebsd_triage 2018-05-06 12:35:57 UTC
Created attachment 193086 [details]
Kernel kludge: reduce the "hung" wait from 60s to 6s.

Alright, I asked several times and no one told me, so I found out myself eventually. Might help someone else survive till 11.1.
Comment 55 Anonymized Account freebsd_committer freebsd_triage 2018-05-06 12:37:27 UTC
11.2*
Comment 56 Anonymized Account freebsd_committer freebsd_triage 2018-07-06 12:04:11 UTC
Still happening with graphics/drm-stable-kmod.
Comment 57 Niclas Zeising freebsd_committer freebsd_triage 2018-07-06 12:48:54 UTC
(In reply to Michael Danilov from comment #56)

Can you try with drm-next-kmod as well?
Regards
Niclas
Comment 58 Anonymized Account freebsd_committer freebsd_triage 2018-07-06 12:56:24 UTC
Sure, doing it now, will report back.
Comment 59 Johannes Lundberg 2018-07-06 14:37:09 UTC
Hi

What DDX driver are you using? If Intel, try switching to/from sna/uxa. Recommended though is the modesetting driver. I have seen hung GPU sometimes with Intel but I don't remember if it was sna or uxa. Either way, Intel DDX is kind of deprecated and modesetting is very stable now. 

Try with this in your xorg.conf 

Section "Device"
	Driver      "modesetting"
EndSection

or simply uninstall xf86-video-intel and it will use modesetting by default.
Comment 60 Anonymized Account freebsd_committer freebsd_triage 2018-07-06 14:50:51 UTC
Yes it still hangs with -next.

That's right, I am using the intel driver. I vaguely remember trying out modesetting, and that it either wasn't friends with vt console, or didn't work at all -- so I went back to intel.

I will try different combinations in the evening.
Comment 61 Anonymized Account freebsd_committer freebsd_triage 2018-07-06 14:54:42 UTC
But I've just tried modesetting again and it works! \o/ Must have been it was not ready back then.

Will report back if it still hangs...
Comment 62 Anonymized Account freebsd_committer freebsd_triage 2018-07-06 21:03:36 UTC
Well I haven't seen any hangs yet but I still do get trash rectangles on screen sometimes, so something is wrong even with modesetting.
Comment 63 Anonymized Account freebsd_committer freebsd_triage 2018-08-23 12:29:15 UTC
Anyone? Why does it corrupt sometimes?
Comment 64 Johannes Lundberg 2018-08-23 12:36:27 UTC
(In reply to Michael Danilov from comment #63)

What is your OS version/revision and drm driver version (stable/next/devel)?
Comment 65 Johannes Lundberg 2018-08-23 12:40:55 UTC
(In reply to Michael Danilov from comment #63)

And what is your hardware?
Comment 66 Anonymized Account freebsd_committer freebsd_triage 2018-08-25 00:06:44 UTC
FreeBSD 11.2-RELEASE-p2
drm-next-kmod-4.11.g20180822 (updated today from some version around July, but I think I've already seen corruption again)

Lenovo B570e
Intel(R) Core(TM) i7-2820QM CPU @ 2.30GHz
Comment 67 Niclas Zeising freebsd_committer freebsd_triage 2019-01-31 10:40:02 UTC
(In reply to Michael Danilov from comment #66)
Hi!
Is this still an issue with the latest driver update?
Have you tried FreeBSD 12?
Comment 68 Anonymized Account freebsd_committer freebsd_triage 2019-01-31 10:58:13 UTC
I haven't been able to update my ports since November beccause https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235075 I might try doing that separately on the driver ports.

Thanks for reminding of 12, didn't know it's already been released, will try.
Comment 69 Anonymized Account freebsd_committer freebsd_triage 2019-02-04 21:20:42 UTC
Just updated to 12. Not sure if hangs are still there but I've already seen corruption rectangles with the base system kernel module...
Comment 70 Anonymized Account freebsd_committer freebsd_triage 2019-02-04 23:52:37 UTC
I tried updating a copy of ports svn an copying over the ports and then running svn resolve on them, but svn resolve never ends and freezes on "Resolving [some revision number here]....".
Comment 71 Anonymized Account freebsd_committer freebsd_triage 2019-02-04 23:58:28 UTC
Rather "Checking r462619..."
Comment 72 Jan Beich freebsd_committer freebsd_triage 2021-02-07 21:17:25 UTC
Try your luck on FreeBSD >= 13.0 as drm-kmod received a number of bug fixes for old GPUs and switched to upstream LTS branch. On older versions DRM is pretty much frozen except occasional fixes contributed by others e.g., https://github.com/FreeBSDDesktop/kms-drm/pull/226
Comment 73 Zhong 2021-09-26 01:19:51 UTC
Hi All,

I'm on 12.2 Release and my logs does show this issue is happening as well:

ep 25 12:00:07 Dell kernel: error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
Sep 25 12:00:07 Dell kernel: info: [drm] capturing error event; look for more information in sysctl hw.dri.0.info.i915_error_state
Sep 25 12:00:07 Dell kernel: error: [drm:pid0:i915_reset] *ERROR* Failed to reset chip.
Sep 25 13:42:46 Dell kernel: .
Sep 25 13:43:18 Dell devd[534]: notify_clients: send() failed; dropping unresponsive client
Sep 25 13:43:18 Dell syslogd: last message repeated 1 times
Sep 25 13:43:19 Dell kernel: 
Sep 25 13:43:19 Dell kernel: error: [drm:pid3309:assert_pll] *ERROR* PLL state assertion failure (expected on, current off)
Sep 25 13:43:19 Dell syslogd: last message repeated 1 times
Sep 25 13:43:19 Dell kernel: error: [drm:pid3309:assert_pipe] *ERROR* pipe A assertion failure (expected on, current off)
Sep 25 13:43:20 Dell kernel: error: [drm:pid3309:intel_enable_lvds] *ERROR* timed out waiting for panel to power on
Sep 25 13:43:20 Dell kernel: error: [drm:pid3309:intel_modeset_check_state] *ERROR* encoder's hw state doesn't match sw tracking (expected 1, found 0)
Sep 25 13:43:20 Dell kernel: error: [drm:pid3309:assert_pipe] *ERROR* pipe A assertion failure (expected on, current off)
Sep 25 13:43:27 Dell kernel: .

This usually occurs if I leave my laptop on overnight or in the middle of watching video, the screen will go dead as you can visibly see the image few seconds after and a restart puts the screen back on.
Comment 74 Zhong 2021-09-26 01:38:34 UTC
(In reply to Zhong from comment #73)

I wanted to add that the way to reproduce this is to run cheese which uses the webcam. The new i915 driver doesn't support my native resolution but appears to be able to open cheese so I'll check back to see if I can get the driver from the module directory to work.
Comment 75 Anonymized Account freebsd_committer freebsd_triage 2021-09-26 11:37:15 UTC
Back when I used FreeBSD, the hangs were prevalent on Blender, and this could be related:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/3748
Comment 76 Zhong 2021-09-29 01:44:55 UTC
(In reply to Zhong from comment #74)
It appears the screen won't load when trying to use the driver from the port. It's best for me to other options.
Comment 77 Emmanuel Vadot freebsd_committer freebsd_triage 2022-12-17 10:34:21 UTC
Is this still happening on >=13 ?
Comment 78 preqwitz 2023-03-01 10:00:40 UTC
(In reply to Emmanuel Vadot from comment #77)
yes. the system gets pretty much unusable after 10-15 minutes in load. Tried with 13.1-RELEASE, 13.2-STABLE and 14-CURRENT