• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Solved X hangs with intel graphics driver

aimeec1995

Active Member

Thanks: 13
Messages: 159

#1
I have a dell lattitude e6400 with a Intel 4500m HD as a GPU.
Using FreeBSD 11.0 amd64, I am unable to start X with the intel driver. It just hangs.
Here are some of the errors I could find ...

Code:
fbd0 on drmn0
VT: Replacing driver "vga" with new "fb".
info: [drm] Initialized i915 1.6.0 20080730 for drmn0 on minor 0
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:pid1550:intel_pipe_set_base] *ERROR* pin & fence failed
error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
error: [drm:pid0:init_ring_common] *ERROR* render ring initialization failed ctl 0001f001 head 00003000 tail 00000000 start 00003000
error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
error: [drm:pid0:init_ring_common] *ERROR* render ring initialization failed ctl 0001f001 head 00003000 tail 00000000 start 00003000
error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
error: [drm:pid0:i915_reset] *ERROR* GPU hanging too fast, declaring wedged!
error: [drm:pid0:i915_reset] *ERROR* Failed to reset chip.
If I start xorg with no configuration it "works", just slowly.

This is my xorg.conf ...
Code:
Section "Device"
  Identifier   "Card0"
   Driver       "intel"
   Option "DRI" "3"
   Option "AccelMethod" "SNA"
   Option "TearFree" "true"
EndSection
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,127
Messages: 27,000

#2
Have you tried without the "Options" set? If you only define the driver does it work then?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,127
Messages: 27,000

#4
I had to lookup what that option does actually. But it's possible you tried to force it to use a DRI level that's not supported by your card. As far as I understood it DRI3 should be the default for the intel(4) driver but perhaps that only works reliably with newer drivers (we're slightly behind compared to Linux for example).
 

aimeec1995

Active Member

Thanks: 13
Messages: 159

#5
I had to lookup what that option does actually. But it's possible you tried to force it to use a DRI level that's not supported by your card. As far as I understood it DRI3 should be the default for the intel(4) driver but perhaps that only works reliably with newer drivers (we're slightly behind compared to Linux for example).
Will just have to live without compositing.
 

ILUXA

Aspiring Daemon

Thanks: 328
Messages: 535

#6
*ERROR* Hangcheck timer elapsed... GPU hung
After upgrade from 11.0 to 11.1 I also start getting this error with my intel integrated graphics (Lenovo t420),
while "X hangs", also I do not use any extra options in xorg.conf, It seems, that there are some problems
with intel graphics driver in 11.1-RELEASE. It is interesting to try if the issue exists in 11.1-STABLE…

Also I had problems with suspend/resume in 11.1, my laptop resumed by itself with GPU errors in dmesg.
Is it a known issue? With intel GPU on 11.1-RELEASE. What is interesting, that 11.0-RELEASE used
to work fine without any issues on the same hardware, also, as far as I can remember,
I had no problems even with latest 11.0-STABLE builds. Now I'm trying to use 11.1-RELEASE again, but experiencing the same issues...

*ERROR* Hangcheck timer elapsed... GPU hung
Seems I found solution, this error appeared because I forgot to add
Code:
drm.i915.semaphores="1"
to /boot/loader.conf after 11.1 installation.
I forgot that I already tried to fix it, while using 11.0.

I also use acpi_ibm.ko kernel module, modesetting driver (preinstalled) and these settings in /etc/X11/xorg.conf:
Code:
...
Section "Device"
        Identifier   "Card0"
        BusID        "PCI:0:2:0"
        Driver       "modesetting"
        Option       "AccelMethod" "glamor"
EndSection
...
And got no problems with suspend/resume (using hw.acpi.lid_switch_state=S3 in /etc/sysctl.conf).
 
Last edited:

ILUXA

Aspiring Daemon

Thanks: 328
Messages: 535

#7
Unfortunately the issue persists...
GPU hungs when using FreeBSD-11.1-RELEASE with Intel SandyBridge integrated graphincs...
It happens less rarely when using options from above, but it doesn't go away.
Downgrading to 10.4-RELEASE doesn't help also, because intel graphic driver seems to be broken in 10.4,
I got some visual glitches when tried to use 10.4-RELEASE… Also "SNA" acceleration doesn't work at all (black screen),
when using 10.4-RELEASE, "UXA" works, but with glitches, as written above, also I got issues with "modesetting" driver.
So I'm forced to use 11.0-RELEASE, which reached the end of life. I tried a lot of xorg.conf options with 11.1-RELEASE also,
but without any luck. Also GPU doesn't hung for me when using regular Xorg apps, it hungs when using games,
like Quake 3 from ports,or some wine games, but when it hungs, some times the only one option is to reboot...

May be it is possible to build 11.1-RELEASE kernel, but using i915 files from 11.0-RELEASE kernel?
It seems to be the only one option to try when using 11.1-RELEASE with a PC with SandyBridge integrated graphics.
 

ILUXA

Aspiring Daemon

Thanks: 328
Messages: 535

#8
Finally, it seems, I found the solution...
To fix sandy bridge graphics issue, for last few weeks I tried to use :) :
1. 10.4-RELEASE -- doesn't work well
2. 11.1-RELEASE -- GPU hung
3. 11.1-STABLE -- GPU hung
4. 12.0-CURRENT -- Seems to be working fine! graphics/drm-next-kmod required, without it you'll also get "GPU hung".

Also "fine" is not the best word to describe CURRENT branch,
but at least for now I'm able to play games/ioquake3 :D

By the way I tried 12-CURRENT at the first place, but at that time it was unusable,
Xorg was crashing every time, but it seems it's working fine for now, and I even like it :).
BTW, I'm using
Code:
FreeBSD ThinkPad 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r326738M: Sun Dec 10 09:20:42 EET 2017     root@ThinkPad:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64
Also I suggest you to install graphics/drm-next-kmod from ports tree,
because when I installed it using pkg, I wasn't able to load it — /var/log/messages:
Code:
Dec 10 18:19:26 ThinkPad kernel: link_elf_obj: symbol kmem_object_store undefined
Dec 10 18:19:26 ThinkPad kernel: linker_load_file: /boot/modules/linuxkpi_gplv2.ko - unsupported file type
Dec 10 18:19:26 ThinkPad kernel: KLD drm.ko: depends on linuxkpi_gplv2 - not available or version mismatch
Dec 10 18:19:26 ThinkPad kernel: linker_load_file: /boot/modules/drm.ko - unsupported file type
Dec 10 18:19:26 ThinkPad kernel: KLD i915kms.ko: depends on drmn - not available or version mismatch
Dec 10 18:19:26 ThinkPad kernel: linker_load_file: /boot/modules/i915kms.ko - unsupported file type
But after rebuilding it from ports tree, it's working fine without any issues.
Also GPU performance was improved very much.


To upgrade to CURRENT, remove old and download new system sources:
# rm -rf /usr/src
# svnlite co https://svn.FreeBSD.org/base/head /usr/src
(After it is possible to update it with # svnlite up /usr/src)
Then follow these instructions to rebuild world and kernel:
http://www.wonkity.com/~wblock/docs/html/buildworld.html
 

ILUXA

Aspiring Daemon

Thanks: 328
Messages: 535

#9
BTW, this problem is not FreeBSD specific,
the same problem appears for me also when using
GNU/Linux with Sandybridge GPU. Also I got far less
intel graphics related problems when using FreeBSD,
than when using Linux (Linux intel GPU related errors are much more various :)).

So, it seems, intel graphic drivers are just bad.
The only driver that is working not too shitty
on both operating systems (FreeBSD and Devuan),
is the "modesetting" video driver.

The interesting part is that I never had any serious intel graphics issues when
I was using FreeBSD 11.0-RELEASE, even with "intel" driver with "SNA" acceleration.
 
Last edited:
Top