# Enabling Intel Video Acceleration On FreeBSD



## RedPhoenix (Aug 21, 2017)

Well hello again everybody.....    :3   After my last success with enabling Sound in FreeBSD on my Lenovo Flex 3 1120, I need help with another issue.....   :3   First, here is the output of pciconf -lv: 
	
	



```
hostb0@pci0:0:0:0:    class=0x060000 card=0x390217aa chip=0x22808086 rev=0x35 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series SoC Transaction Register'
    class      = bridge
    subclass   = HOST-PCI
vgapci0@pci0:0:2:0:    class=0x030000 card=0x390217aa chip=0x22b18086 rev=0x35 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller'
    class      = display
    subclass   = VGA
none0@pci0:0:11:0:    class=0x118000 card=0x390217aa chip=0x22dc8086 rev=0x35 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Power Management Controller'
    class      = dasp
xhci0@pci0:0:20:0:    class=0x0c0330 card=0x390217aa chip=0x22b58086 rev=0x35 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series USB xHCI Controller'
    class      = serial bus
    subclass   = USB
none1@pci0:0:26:0:    class=0x108000 card=0x390217aa chip=0x22988086 rev=0x35 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Trusted Execution Engine'
    class      = encrypt/decrypt
hdac0@pci0:0:27:0:    class=0x040300 card=0x390217aa chip=0x22848086 rev=0x35 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series High Definition Audio Controller'
    class      = multimedia
    subclass   = HDA
pcib1@pci0:0:28:0:    class=0x060400 card=0x390217aa chip=0x22c88086 rev=0x35 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port'
    class      = bridge
    subclass   = PCI-PCI
pcib2@pci0:0:28:1:    class=0x060400 card=0x390217aa chip=0x22ca8086 rev=0x35 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port'
    class      = bridge
    subclass   = PCI-PCI
pcib3@pci0:0:28:2:    class=0x060400 card=0x390217aa chip=0x22cc8086 rev=0x35 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port'
    class      = bridge
    subclass   = PCI-PCI
isab0@pci0:0:31:0:    class=0x060100 card=0x390217aa chip=0x229c8086 rev=0x35 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCU'
    class      = bridge
    subclass   = PCI-ISA
none2@pci0:0:31:3:    class=0x0c0500 card=0x390217aa chip=0x22928086 rev=0x35 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx SMBus Controller'
    class      = serial bus
    subclass   = SMBus
sdhci_pci0@pci0:1:0:0:    class=0x080501 card=0x390217aa chip=0x86211217 rev=0x01 hdr=0x00
    vendor     = 'O2 Micro, Inc.'
    device     = 'SD/MMC Card Reader Controller'
    class      = base peripheral
    subclass   = SD host controller
iwm0@pci0:2:0:0:    class=0x028000 card=0x82708086 chip=0x08b48086 rev=0x93 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Wireless 3160'
    class      = network
re0@pci0:3:0:0:    class=0x020000 card=0x382b17aa chip=0x816810ec rev=0x15 hdr=0x00
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller'
    class      = network
    subclass   = ethernet
```

As you can see, it detects the Intel Graphics (I THINK so anyway  ).....   Anywho, I also downloaded the xf86-intel-video Driver, and even kldload'd the Intel i915 Driver.....   But, when I put Driver "intel", instead of Driver "scfb" into my /etc/X11/xorg.conf File, when I type startx from a TTY Screen as a test, I get "Error: no screens found".....      Also, here's my Xorg config.....   :3   
	
	



```
Section "Device"
  Identifier "Card 0"
  Driver "scfb"
EndSection
```

Yup!.....   That's it!.....   :3   Anywho, thanks for any help guys.....   :3   I REALLY appreciate all the help you've given me so far, and now that I'm using FreeBSD, I can make you guys some awesome C Programs.....


----------



## Minbari (Aug 21, 2017)

You don't need to do Xorg config, you need to add in /usr/local/etc/X11/xorg.conf.d/ a file: driver-intel.conf which contain:


```
Section "Device"
   Identifier "Card0"
    Driver     "intel"
EndSection
```

For scfb you need to install: xf86-video-scfb, unload i915 or i915kms (kldunload i915) and then create a file in /usr/local/etc/X11/xorg.conf.d a file: driver-scfb.conf which contain:


```
Section "Device"
     Identifier    "Card0"
     Driver        "scfb"
EndSection
```

I'm not sure though if it works with both of them (intel & scfb), I only have intel driver installed and loaded in early KMS: /boot/loader.conf:


```
kern.vty=vt       # default in 11.x
i915kms_load="YES"
```


----------



## RedPhoenix (Aug 21, 2017)

Minbari said:


> You don't need to do Xorg config, you need to add in /usr/local/etc/X11/xorg.conf.d/ a file: driver-intel.conf which contain:
> 
> 
> ```
> ...


I thank you, good sir.....   :3   Let me try it out!.....   ^^


----------



## SirDice (Aug 21, 2017)

I'm not sure what generation CPU/GPU this is. But the last 2 or 3 Intel GPU generations are not (yet) supported. There's work being done to upgrade the necessary components but it hasn't landed in any -RELEASE version yet.


----------



## RedPhoenix (Aug 21, 2017)

SirDice said:


> I'm not sure what generation CPU/GPU this is. But the last 2 or 3 Intel GPU generations are not (yet) supported. There's work being done to upgrade the necessary components but it hasn't landed in any -RELEASE version yet.


Thank you for your response, Mr. Dice.....   :3   Lemme check on my Model's Gen, and I'll report back!.....   ^^


----------



## RedPhoenix (Aug 21, 2017)

SirDice said:


> I'm not sure what generation CPU/GPU this is. But the last 2 or 3 Intel GPU generations are not (yet) supported. There's work being done to upgrade the necessary components but it hasn't landed in any -RELEASE version yet.


Ok, apparently, it's a Gen 3.....   :3   Would that work.....?   :3


----------



## Deleted member 30996 (Aug 21, 2017)

I found this on the notebookcheck.net Lenovo Flex 3 11 inch page:



> *Intel HD Graphics (Bay Trail)*:
> 
> Integrated GPU for tablet and notebook Bay Trail SoCs. Based on the Ivy Bridge GPU with four Execution Units and support for DirectX 11.



Which is a 3rd generation line of processors and according to the FreeBSD Wiki has been supported since FreeBSD 9.1.


----------



## Minbari (Aug 21, 2017)

On my Thinkpad T430 (i5-3320M) acceleration work OK,


```
Section "Device"
   Identifier   "Card0"
   Driver       "intel"
   Option "DRI" "3"
   Option "AccelMethod" "SNA"
   Option "TearFree" "true"
EndSection
```


----------



## scottro (Aug 21, 2017)

I believe the wiki also mentions that some people still run into issues.  I've not used scfb, (I think it still requires EFI and I use MBR) but have had some success using CURRENT and drm-next.  I have a little page on how I got it to sorta work. 

http://srobb.net/freebsdintel.html


----------



## RedPhoenix (Aug 21, 2017)

Trihexagonal said:


> I found this on the notebookcheck.net Lenovo Flex 3 11 inch page:
> 
> 
> 
> Which is a 3rd generation line of processors and according to the FreeBSD Wiki has been supported since FreeBSD 9.1.


Whoo hoo!......   :3   I'm on my way to playing BRUTAL DOOM, baby!!.....   :3


----------



## RedPhoenix (Aug 21, 2017)

scottro said:


> I believe the wiki also mentions that some people still run into issues.  I've not used scfb, (I think it still requires EFI and I use MBR) but have had some success using CURRENT and drm-next.  I have a little page on how I got it to sorta work.
> 
> http://srobb.net/freebsdintel.html


Why thank you, good sir or madam.....   :3   I'll give it a looksee.....   :3


----------



## RedPhoenix (Aug 21, 2017)

Minbari said:


> On my Thinkpad T430 (i5-3320M) acceleration work OK,
> 
> 
> ```
> ...


No, it didn't work.....   For some reason, it's not working with the "intel" Driver option.....


----------



## RedPhoenix (Aug 21, 2017)

scottro said:


> I believe the wiki also mentions that some people still run into issues.  I've not used scfb, (I think it still requires EFI and I use MBR) but have had some success using CURRENT and drm-next.  I have a little page on how I got it to sorta work.
> 
> http://srobb.net/freebsdintel.html


Very educational.....!   :3   I don't wanna risk it with current though, as this is my Programming Machine for FreeBSD.....   :3


----------



## scottro (Aug 21, 2017)

Ah, no, definitely not a good idea.


----------



## RedPhoenix (Aug 22, 2017)

scottro said:


> Ah, no, definitely not a good idea.


:3


----------



## RedPhoenix (Aug 22, 2017)

Anyone.....?      Or, have I hit a dead end.....?   :3


----------



## islamux (Aug 22, 2017)

sorry 
but how to know my acceleration is working well or not


----------



## kuroneko (Aug 22, 2017)

islamux said:


> sorry
> but how to know my acceleration is working well or not


install mesa-demos
then in the terminal type: `glxinfo | grep "direct rendering"`
If you get : `direct rendering: Yes` then it mean it works I think.


----------



## islamux (Aug 22, 2017)

kuroneko said:


> install mesa-demos
> then in the terminal type: `glxinfo | grep "direct rendering"`
> If you get : `direct rendering: Yes` then it mean it works I think.


thanx .. i know that command from linux but i want to know another in freebsd


----------



## kuroneko (Aug 22, 2017)

islamux said:


> thanx .. i know that command from linux but i want to know another in freebsd


If it works then what's the point of knowing another command? glxinfo is both on linux and FreeBSD.


----------



## RedPhoenix (Aug 22, 2017)

islamux said:


> sorry
> but how to know my acceleration is working well or not


Try installing and running a game like ZDoom.....   :3   I don't know if you play violent games or not, but you can just uninstall it after you try and run it.....   :3


----------



## islamux (Aug 22, 2017)

kuroneko said:


> If it works then what's the point of knowing another command? glxinfo is both on linux and FreeBSD.


just to know if there was...


----------

