# Intel HD Graphics 520



## cduret (May 4, 2016)

Still struggling with my new T460 thinkpad.
I have an Intel Core i7-6600U at 2.60GHz with the HD Graphics 520 chipset.

As far as I know skylake's graphics architecture is not supported in FreeBSD 10.3
Is this support will happen any time soon ?

I installed the scfb driver to have a non accelerated working X session.
Here is my xorg.conf file : http://pastebin.com/5aDyBfF3

The X server start successfully but I cannot have other resolution than 640x480!


```
@ xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 480, current 640 x 480, maximum 640 x 480
default connected 640x480+0+0 0mm x 0mm
640x480        0.00*
```

Am I missing something?

Thank you


----------



## SirDice (May 4, 2016)

cduret said:


> Is this support will happen any time soon ?


"Real Soon Now(tm)" 

https://wiki.freebsd.org/Graphics/Update i915 GPU driver to Linux 3.8


----------



## wblock@ (May 4, 2016)

No idea if this works on 10-STABLE, but it does work in -CURRENT:

Boot into the loader shell, option 3 at the boot prompt in -CURRENT.  Use `gop list` to see the available modes, then `gop set [i]n[/i]` to choose a mode.  The scfb driver will use that mode.

Nobody has been able to tell me how to set a mode without user interaction.  If you figure that out, please let me know.


----------



## wheelcomplex yin (Aug 17, 2016)

I'm using follow xorg.conf with scfb + slim + xfce4, it work fine for me(*1920 x 1080 Resolution*), without user interaction.


```
Xiaomi Air 13 
Intel Core i5-6200u Dual Core 2.3GHz

00:00.0 Host bridge: Intel Corporation Skylake Host Bridge/DRAM Registers (rev 08)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 520 (rev 07)
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21)
00:1c.0 PCI bridge: Intel Corporation Device 9d10 (rev f1)
00:1c.4 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 (rev f1)
00:1d.0 PCI bridge: Intel Corporation Device 9d18 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
01:00.0 3D controller: NVIDIA Corporation Device 134b (rev a2)
02:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a)
03:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller (rev 01)
```


```
FreeBSD miair13.localdomain 12.0-CURRENT FreeBSD 12.0-CURRENT #0 0939530(master)-dirty: Wed Aug 17 16:20:40 CST 2016     root@n550jk.localdomain:/usr/obj/usr/src/sys/PREINIT  amd64
```


```
#
Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" LeftOf "Screen0"
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

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

Section "Module"
    Load "glx"
    Load "dbe"
    Load "extmod"
    Load "dri"
    Load "record"
    Load "dri2"
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"
    #Option "AccelMethod" "sna"
    Identifier  "Card0"
#    Driver      "vesa"
 #   Driver      "intel"
    Driver      "scfb"
    BusID       "PCI:0:2:0"
EndSection

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

Section "Monitor"
    Identifier    "Monitor1"
    VendorName    "Dell"
    ModelName    "U2412M"
    ModeLine    "1920x1200"    154.0 1920 1968 2000 2080 1200 1203 1209 1235 -HSync +VSync
    Option       "DPMS"          "true"
    Option       "PreferredMode" "1920x1200"
EndSection

Section "Screen"
    Identifier "Screen1"
    Device     "Card0"
    Monitor    "Monitor1"
    SubSection "Display"
        Viewport   0 0
        Depth     1
        #Modes "1366x768"
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     4
        #Modes "1366x768"
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     8
        #Modes "1366x768"
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     15
        #Modes "1366x768"
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     16
        #Modes "1366x768"
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     24
        #Modes "1366x768"
    EndSubSection
EndSection

#
```



wblock@ said:


> No idea if this works on 10-STABLE, but it does work in -CURRENT:
> 
> Boot into the loader shell, option 3 at the boot prompt in -CURRENT.  Use `gop list` to see the available modes, then `gop set [I]n[/I]` to choose a mode.  The scfb driver will use that mode.
> 
> Nobody has been able to tell me how to set a mode without user interaction.  If you figure that out, please let me know.


----------



## Julien Picalausa (Aug 22, 2016)

wblock@ said:


> No idea if this works on 10-STABLE, but it does work in -CURRENT:
> 
> Boot into the loader shell, option 3 at the boot prompt in -CURRENT.  Use `gop list` to see the available modes, then `gop set [I]n[/I]` to choose a mode.  The scfb driver will use that mode.
> 
> Nobody has been able to tell me how to set a mode without user interaction.  If you figure that out, please let me know.



I found this post a while back and it was exactly the answer I was looking for. But I did find a way to set the mode via loader.conf, so I thought I'd contribute back.


```
beastie_disable="YES"
exec="gop set n"
```

Adding these lines will properly switch the mode at boot time without user interaction at the cost of disabling the loader menu. It looks like something in the code used to display the menu resets the mode, which happens after loader.conf has been processed. There might be ways about it that avoid disabling the menu, but my knowledge of the loader is not sufficient to come up with one.


----------



## wblock@ (Aug 23, 2016)

I've since been told that `gop set` can be put in /boot/loader.rc.local.


----------



## abishai (Aug 23, 2016)

Proper resolution is autodetected on my Dell XPS13 when booted with UEFI. I have only hint to enable scfb, not full xorg.conf layout.

I don't think support for skylake is coming soon, I have drm46 branch in boot environment and it is in rather alpha state and probably can't do more than 2D and even in 2D it have artifacts if compositor enabled. Resume is broken as well, however brightness can be set with `xset`, scfb lacks this support.


----------



## sHagen (Nov 24, 2016)

Hmm, when I look at the freebsd-ports-graphics repository and the xserver-next branch, then I can see that the intel driver got updated a while ago.
Repo: https://github.com/freebsd/freebsd-ports-graphics/tree/xserver-next/x11-drivers/xf86-video-intel

It is fetching and compiling xf86-video-intel-2.99.917.20160614 which already has skylake support. I also found my device ID in there (Lenovo x260, Intel HD 520).

The interesting bit is that it is compiling just fine on my 11-RELEASE machine. However, there's no change in system behavior after installing (make install) it. X is still launching via framebuffer device and forcing driver "intel" will result in "(EE) no screens found".

So there's a solution in the sky, but I can't reach it 

Also, trueos (former pc-bsd) - which is based on freebsd-current - already comes with skylake support als also with the "2.99.917.20160614" intel driver. So this seems to be the right thing. But the trueos patches do not compile on FreeBSD (11-RELEASE).

There is definitely some room to fiddle around...


----------



## wblock@ (Nov 24, 2016)

sHagen said:


> But the trueos patches do not compile on FreeBSD (11-RELEASE).


Right, -current is 12. There will be a lot of overlap, but an increasing amount of difference.


----------



## sHagen (Dec 6, 2016)

wblock@ said:


> Right, -current is 12. There will be a lot of overlap, but an increasing amount of difference.



I got it working quiet well by moving to the -current drm 4.7 base branch and the xserver-next ports branch. But that's a bit too much of a hassle to maintain for a non-development machine as it requires to recompile Xorg+dependencies cause the changed ABI compared to -current. I went back to -release for now.

I'm watching the discussions about the drm 4.7 branch... eventually it will be merged into current in midterm.


----------



## Horani (Dec 6, 2016)

This is the only thing why I am unable to use FreeBSD on my laptop. I know FreeBSD is server oriented, however it seems a little unfortunate that it has been missing such a basic support for couple of generations old Intel hardware.
More so when OpenBSD, DragonflyBSD, TrueOS (and Linux) all have it for some time already.


----------



## yklaxds (Jun 10, 2017)

wheelcomplex yin said:


> I'm using follow xorg.conf with scfb + slim + xfce4



Can you adjust the screen brightness?


----------



## sHagen (Jun 15, 2017)

Screen brightness can be controlled with intel_backlight.


----------



## cduret (Dec 12, 2018)

hi,
I have just see that freebsd 12.0 is released these days.

Does it now support hardware acceleration of HD 520 intel graphics chipset ?

My thinkpad T460 has the i7-6600U processor at 2.60GHz with the HD Graphics 520 chipset.

thanks


----------



## k.jacker (Dec 14, 2018)

It has already been supported since FreeBSD 11.2 was released in June 2018


----------



## cduret (Dec 14, 2018)

great I will come back to freebsd 

cheers


----------



## Sevendogsbsd (Dec 14, 2018)

I have a HD 630 and it is fully supported. I am going on the assumption that 630 > 520 = support, which may be wrong


----------



## cduret (Dec 14, 2018)

I will give a try in 2019, I gave up 2 years ago by switching to gentoo linux till now.


----------



## Sevendogsbsd (Dec 14, 2018)

As a former Gentoo user, I can say FreeBSD is far easier. Just my .02   I had to take a hard look at things I did in Linux vice things I would do in FreeBSD and make some choices.


----------



## VladiBG (Dec 20, 2018)

Intel Core i7-6600U at 2.60GHz with the HD Graphics 520 chipset is supported using drm-next-kmod to install it you can use
`pkg install drm-next-kmod`
`sysrc kld_list="/boot/modules/i915kms.ko"`


----------



## Sevendogsbsd (Dec 20, 2018)

I thought now there is a meta package for the Intel video driver: `drm-kmod`, which will pull in the appropriate driver. Doing this for me gave me native resolution at a VT instead of 640x480 or whatever it was before.


----------



## VladiBG (Dec 20, 2018)

You are right.

drm-stable-kmod is drm-fbsd11.2-kmod
drm-next-kmod is drm-fbsd12.0-kmod
drm-devel-kmod is drm-current-kmod


----------



## k3y5 (Jun 3, 2020)

Sevendogsbsd said:


> I have a HD 630 and it is fully supported. I am going on the assumption that 630 > 520 = support, which may be wrong



Necroposting, what driver did you use? I'm setting up an older dell latitude, and it has the HD 630. It seems to have been set from what pciconf tells me. I've installed the intel driver from https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/x-config.html. Yet, when I add the intel driver to my X11 config. I get a "intel driver not found," when trying to run startx. 

What driver did you use, and were you able to get the X11 config setup?


----------



## Sevendogsbsd (Jun 3, 2020)

I used graphics/drm-kmod and no xorg configuration. Worked perfectly. I don’t recall if I also had another package for Intel installed. I’ll look later and edit this if I did.


----------



## SirDice (Jun 3, 2020)

Sevendogsbsd said:


> I don’t recall if I also had another package for Intel installed.


You need to have x11-drivers/xf86-video-intel installed too. It used to be a dependency of the full x11/xorg installation but that's not the case any more (look at x11-drivers/xorg-drivers).  No need to recompile x11/xorg-drivers from ports, just install x11-drivers/xf86-video-intel.


----------



## k3y5 (Jun 3, 2020)

SirDice said:


> You need to have x11-drivers/xf86-video-intel installed too. It used to be a dependency of the full x11/xorg installation but that's not the case any more (look at x11-drivers/xorg-drivers).  No need to recompile x11/xorg-drivers from ports, just install x11-drivers/xf86-video-intel.



That was it, thank you. Working flawlessly now.


----------

