# Intel HD 4600 support



## tankist02 (Oct 23, 2014)

Is it fully supported by 10.1 RC2 including hardware acceleration? I configured X following Cooltrainder's guide for FreeBSD 10 as desktop. But my system switches to the VESA driver. Is there anywhere an official FreeBSD manual on how to use Intel GPU?

Processor:

```
CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz (3997.77-MHz K8-class CPU)
  Origin = "GenuineIntel"  Id = 0x306c3  Family = 0x6  Model = 0x3c  Stepping = 3
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x7ffafbbf<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,<b11>,FMA,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
  AMD Features=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>
  AMD Features2=0x21<LAHF,ABM>
  Structured Extended Features=0x2fbb<FSGSBASE,TSCADJ,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM>
  VT-x: (disabled in BIOS) PAT,HLT,MTF,PAUSE,EPT,UG,VPID
  TSC: P-state invariant, performance statistics
```

xorg.conf:

```
Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
    Option         "AIGLX" "true"
EndSection

Section "ServerFlags"
        Option  "DontZap"       "off"
        #Option "AllowEmptyInput"       "on"
        Option "AutoAddDevices"        "false"
        Option "AutoEnableDevices"     "false"
EndSection

Section "Files"
    ModulePath   "/usr/local/lib/xorg/modules"
    FontPath     "/usr/local/lib/X11/fonts/misc/"
    FontPath     "/usr/local/lib/X11/fonts/TTF/"
    FontPath     "/usr/local/lib/X11/fonts/OTF/"
    FontPath     "/usr/local/lib/X11/fonts/Type1/"
    FontPath     "/usr/local/lib/X11/fonts/100dpi/"
    FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
    Load  "dbe"
    Load  "dri"
    Load  "dri2"
    Load  "extmod"
    Load  "record"
    Load  "freetype"
    Load  "bitmap"
    Load  "type1"
    Load  "glx"
EndSection

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "kbd"
EndSection

Section "InputDevice"
    Identifier  "Mouse0"
    Driver      "mouse"
    Option       "Protocol" "auto"
    Option       "Device" "/dev/sysmouse"
    Option       "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
    Identifier   "Monitor0"
    VendorName   "Monitor Vendor"
    ModelName    "Monitor Model"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "NoAccel"               # [<bool>]
        #Option     "AccelMethod"           # <str>
        #Option     "Backlight"             # <str>
        #Option     "DRI"                   # <str>
        #Option     "ColorKey"               # <i>
        #Option     "VideoKey"               # <i>
        #Option     "Tiling"                 # [<bool>]
        #Option     "LinearFramebuffer"     # [<bool>]
        #Option     "SwapbuffersWait"       # [<bool>]
        #Option     "TripleBuffer"           # [<bool>]
        #Option     "XvPreferOverlay"       # [<bool>]
        #Option     "HotPlug"               # [<bool>]
        #Option     "ReprobeOutputs"         # [<bool>]
        #Option     "XvMC"                   # [<bool>]
        #Option     "ZaphodHeads"           # <str>
        #Option     "TearFree"               # [<bool>]
        #Option     "PerCrtcPixmaps"         # [<bool>]
        #Option     "FallbackDebug"         # [<bool>]
        #Option     "DebugFlushBatches"     # [<bool>]
        #Option     "DebugFlushCaches"       # [<bool>]
        #Option     "DebugWait"             # [<bool>]
        #Option     "BufferCache"           # [<bool>]
        Option     "AccelMethod" "EXA"
        Option     "DRI" "true"
    Identifier  "Card0"
    Driver      "intel"
    BusID       "PCI:0:2:0"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device     "Card0"
    Monitor    "Monitor0"
    SubSection "Display"
        Viewport   0 0
        Depth     1
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     4
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     8
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     15
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     16
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     24
    EndSubSection
EndSection
```

X.log.0:

```
...
[  2963.789] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
    i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
    915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
    Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
    GM45, 4 Series, G45/G43, Q45/Q43, G41, B43, HD Graphics,
    HD Graphics 2000, HD Graphics 3000, HD Graphics 2500,
    HD Graphics 4000, HD Graphics P4000, HD Graphics 4600,
    HD Graphics 5000, HD Graphics P4600/P4700, Iris(TM) Graphics 5100,
    HD Graphics 4400, HD Graphics 4200, Iris(TM) Pro Graphics 5200
[  2963.790] (--) Using syscons driver with X support (version 2.0)
[  2963.790] (--) using VT number 9

[  2963.798] drmOpenDevice: node name is /dev/dri/card0
[  2963.798] Failed to change owner or group for file /dev/dri! 2: No such file or directory
[  2963.798] Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
[  2963.798] drmOpenDevice: open result is -1, (No such file or directory)
[  2963.798] Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
[  2963.798] drmOpenDevice: open result is -1, (No such file or directory)
[  2963.798] drmOpenDevice: Open failed
[  2963.798] drmOpenByBusid: Searching for BusID pci:0000:00:02.0
[  2963.798] drmOpenDevice: node name is /dev/dri/card0
[  2963.798] Failed to change owner or group for file /dev/dri! 2: No such file or directory
[  2963.798] Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
[  2963.798] drmOpenDevice: open result is -1, (No such file or directory)
[  2963.798] Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
[  2963.798] drmOpenDevice: open result is -1, (No such file or directory)
[  2963.798] drmOpenDevice: Open failed
[  2963.798] drmOpenByBusid: drmOpenMinor returns -2
...
/code]
```


----------



## SirDice (Oct 23, 2014)

tankist02 said:


> Is there anywhere an official FreeBSD manual on how to use Intel GPU?


Not exactly an official manual but have a look at the wiki: https://wiki.freebsd.org/Graphics


----------



## wblock@ (Oct 23, 2014)

HD4600 is Haswell.  To support Haswell graphics, the driver needs additional kernel features.  Early testing is going on now, but is not yet present in prereleases of 10.1.  At this stage of the release, Haswell support will probably not be present in 10.1-RELEASE, but added to 10-STABLE after that.


----------



## tankist02 (Oct 23, 2014)

Thanks a lot for the explanation, will use an old Nvidia card for now. It is ancient, but still better than VESA.


----------



## youngunix (Oct 24, 2014)

wblock@ said:


> HD4600 is Haswell.  To support Haswell graphics, the driver needs additional kernel features.  Early testing is going on now, but is not yet present in prereleases of 10.1.  At this stage of the release, Haswell support will probably not be present in 10.1-RELEASE, but added to 10-STABLE after that.


I have the same CPU as the OP, running 10-STABLE and I can't wait for it to work.


----------



## pkubaj (Oct 24, 2014)

You can try patching kernel with https://kib.kiev.ua/kib/drm/i915.6.patch


----------



## fmayhar (Oct 31, 2014)

pkubaj said:


> You can try patching kernel with https://kib.kiev.ua/kib/drm/i915.6.patch



What version is this patch relative to?  I tried patching 10-STABLE and it didn't apply cleanly.


----------



## pkubaj (Oct 31, 2014)

11-CURRENT


----------



## fmayhar (Nov 1, 2014)

pkubaj said:


> 11-CURRENT


Thanks.  So what's the timeline for getting the patch into -CURRENT?  (Or, even better, getting it through -CURRENT and into -STABLE?)


----------



## gogamoga (Jan 11, 2015)

new patch: http://kib.kiev.ua/kib/drm/i915.8.patch


----------



## SnarSnug (Jan 26, 2015)

I tried this patch, but the make has a shell command error


----------



## Oleg_NYC (Jun 17, 2015)

With this update https://svnweb.freebsd.org/base?view=revision&revision=277487 , is it now possible to use the i1915kms driver with Haswell cpus(HD 4600 graphics)?


----------



## pkubaj (Jun 17, 2015)

oleglelchuk said:


> With this update https://svnweb.freebsd.org/base?view=revision&revision=277487 , is it now possible to use the i1915kms driver with Haswell cpus(HD 4600 graphics)?


No, this update doesn't add support for the new GPU's. It just enhances support for those that were supported before.


----------



## Oleg_NYC (Jun 17, 2015)

According to this thread https://forums.freebsd.org/threads/situation-with-intel-graphics-haswell-broadwell.50865 , OpenBSD supports HD 4600.


----------

