# Graphics driver problem



## litk (Sep 1, 2016)

Hi,
My another problem is graphics driver and xserver. Xserver works only with vesa(4) driver, when I try Intel driver for my Intel CPU it hangs. Another problem is that switching to vtty suspends and hard reset is needed, the same is when I try ctrl + alt + backspace, and suspend/resume doesn't work either - after resume system is working but display is turned off.

After generating xorg.conf via `X -configure` it gives no screens found error, but when I change driver from intel(4) to vesa(4) xserver works then.


----------



## Juha Nurmela (Sep 1, 2016)

/boot/loader.conf should contain *kern.vty=vt*

Juha


----------



## litk (Sep 1, 2016)

Juha Nurmela said:


> /boot/loader.conf should contain *kern.vty=vt*


My loader.conf:

```
i915kms_load="YES"
kern.vty=vt
hw.vga.textmode=1
kern.vt.fb.default_mode="1366x768"
```
And it doesnt work.

What is i915kms anyway? Is it intel driver with kms support or what? I have installed xf86-video-intel pacakges which contains intel_drv.so driver, but I cant load it:

```
$ sudo kldload intel
kldload: can't load intel: No such file or directory
```


----------



## abishai (Sep 1, 2016)

Maybe you have processor newer than haswell ?
https://wiki.freebsd.org/Graphics
Support for broadwell and skylake is WIP.


----------



## Juha Nurmela (Sep 1, 2016)

I only have the kern.vty setting, in loader.conf, and let anything else load automatically. Try removing the i915kms_load. It ends up, by default, to Xorg saying

```
[322657.191] (II) LoadModule: "intel"
[322657.191] (II) Loading /usr/local/lib/xorg/modules/drivers/intel_drv.so
[322657.192] (II) Module intel: vendor="X.Org Foundation"
```
Additionally

```
drmn0: <Intel IronLake> on vgapci0
```


----------



## litk (Sep 1, 2016)

> Maybe you have processor newer than haswell ?


It is Braswell family - celeron n3050 with hd graphic.


> Try removing the i915kms_load.


Nothing changed.
When I set intel in xorg.conf my log looks like this:

```
[  14.147]
X.Org X Server 1.17.4
Release Date: 2015-10-28
[  14.147] X Protocol Version 11, Revision 0
[  14.147] Build Operating System: FreeBSD 11.0-RC2 amd64
[  14.148] Current Operating System: FreeBSD freebsd 11.0-RC2 FreeBSD 11.0-RC2 #0 r304729: Wed Aug 24 06:59:03 UTC 2016  root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
[  14.148] Build Date: 27 August 2016  04:27:47PM
[  14.148]  
[  14.148] Current version of pixman: 0.34.0
[  14.148]    Before reporting problems, check http://wiki.x.org
   to make sure that you have the latest version.
[  14.148] Markers: (--) probed, (**) from config file, (==) default setting,
   (++) from command line, (!!) notice, (II) informational,
   (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  14.149] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Sep  1 13:40:51 2016
[  14.150] (==) Using config file: "/etc/X11/xorg.conf"
[  14.151] (==) ServerLayout "X.org Configured"
[  14.151] (**) |-->Screen "Screen0" (0)
[  14.151] (**) |  |-->Monitor "Monitor0"
[  14.152] (**) |  |-->Device "Card0"
[  14.152] (**) |-->Input Device "Mouse0"
[  14.152] (**) |-->Input Device "Keyboard0"
[  14.152] (==) Automatically adding devices
[  14.152] (==) Automatically enabling devices
[  14.152] (==) Not automatically adding GPU devices
[  14.166] (**) FontPath set to:
   /usr/local/share/fonts/misc/,
   /usr/local/share/fonts/TTF/,
   /usr/local/share/fonts/OTF/,
   /usr/local/share/fonts/Type1/,
   /usr/local/share/fonts/100dpi/,
   /usr/local/share/fonts/75dpi/,
   /usr/local/share/fonts/misc/,
   /usr/local/share/fonts/TTF/,
   /usr/local/share/fonts/OTF/,
   /usr/local/share/fonts/Type1/,
   /usr/local/share/fonts/100dpi/,
   /usr/local/share/fonts/75dpi/
[  14.166] (**) ModulePath set to "/usr/local/lib/xorg/modules"
[  14.166] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[  14.166] (WW) Disabling Mouse0
[  14.166] (WW) Disabling Keyboard0
[  14.166] (II) Loader magic: 0x8112f0
[  14.166] (II) Module ABI versions:
[  14.166]    X.Org ANSI C Emulation: 0.4
[  14.166]    X.Org Video Driver: 19.0
[  14.166]    X.Org XInput driver : 21.0
[  14.166]    X.Org Server Extension : 9.0
[  14.167] (--) PCI:*(0:0:2:0) 8086:22b1:1025:100f rev 33, Mem @ 0x90000000/16777216, 0x80000000/268435456, I/O @ 0x00002000/64, BIOS @ 0x????????/65536
[  14.167] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[  14.167] (II) LoadModule: "glx"
[  14.168] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[  14.185] (II) Module glx: vendor="X.Org Foundation"
[  14.185]    compiled for 1.17.4, module version = 1.0.0
[  14.185]    ABI class: X.Org Server Extension, version 9.0
[  14.185] (==) AIGLX enabled
[  14.186] (II) LoadModule: "intel"
[  14.186] (II) Loading /usr/local/lib/xorg/modules/drivers/intel_drv.so
[  14.191] (II) Module intel: vendor="X.Org Foundation"
[  14.191]    compiled for 1.17.4, module version = 2.21.15
[  14.191]    Module class: X.Org Video Driver
[  14.191]    ABI class: X.Org Video Driver, version 19.0
[  14.191] (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
[  14.193] (--) Using syscons driver with X support (version 16777218.0)
[  14.193] (--) using VT number 9

[  14.542] (EE) No devices detected.
[  14.542] (EE)
Fatal server error:
[  14.542] (EE) no screens found(EE)
[  14.542] (EE)
Please consult the The X.Org Foundation support
    at http://wiki.x.org
 for help.
[  14.542] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[  14.542] (EE)
[  14.557] (EE) Server terminated with error (1). Closing log file.
```
No device detected.


----------



## Snurg (Sep 1, 2016)

If xorg does not recognize the screen resolution as apparently in your case, you may need to specify it explicitly.
Like in the "Screen" section in this basic xorg.conf.

Just FYI, VESA driver breaks suspend/resume in many cases.
Then it is necessary to build a kernel without this option and to use scons as console instead of vt.


----------



## litk (Sep 1, 2016)

> If xorg does not recognize the screen resolution as apparently in your case, you may need to specify it explicitly.


Screen resolution of what? vt? vt res is 640x480.

I thought that bus id may be wrong but it is correct:

```
pciconf -lv
vgapci0@pci0:0:2:0:   class=0x030000 card=0x100f1025 chip=0x22b18086 rev=0x21 hdr=0x00
  vendor  = 'Intel Corporation'
  device  = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller'
  class  = display
  subclass  = VGA
```
I forgot to add user to video group, but nothing changed.


----------



## Snurg (Sep 1, 2016)

litk said:


> Screen resolution of what?


That one of xorg.conf:

```
Modes  "1920x1080"
```
 or whatever the desired resolution


----------



## litk (Sep 1, 2016)

> That one of xorg.conf:


Screen resolution is excellent set via mate settings.


----------



## litk (Sep 1, 2016)

It's seems that Braswell will not be supported so I have to come back to linux


----------



## litk (Sep 1, 2016)

I tried pc computer with amd a8-5600K cpu (year 2012), and guess what? Black screen after startx, without any errors in logs. I tried radeon and ati drivers... well this system is completely unusable. So what cpu are supported on free bsd? Pentium III, Duron and geforce 2mx will work?


----------



## Snurg (Sep 1, 2016)

I guess you must be doing something wrong.
I suggest you to use PC-BSD, which is actually FreeBSD with easier installer and good automated graphics card setup.
The first steps in FreeBSD are not always the easiest.


----------



## litk (Sep 2, 2016)

> I suggest you to use PC-BSD, which is actually FreeBSD with easier installer and good automated graphics card setup.


I tried it already. There is a wizard of graphics setup, but every option is not working except vesa, and switching to vty also, suspend/resume etc. so the same is here.


----------



## windscape (Sep 4, 2016)

litk 

I have had good luck with an NVIDIA GeForce GT 610 video card using the x11/nvidia-driver port. I recommend using any NVIDIA card supported by either the current or legacy NVIDIA driver ports. You can find the list of supported NVIDIA video cards by searching for nvidia-driver on www.freshports.org to determine the current version of the port. Once that has been determined, go to http://www.nvidia.com/object/unix.html, click the appropriate FreeBSD driver version link, and then review the list of cards on the Supported Products tab.

I hope this helps.


----------



## litk (Sep 4, 2016)

Thanks, but my PC computer with amd a8-5600K works. The black screen problem was because HDMI connection with LCD TV. I disconnected it and Voilà, works. So this CPU seems to be supported, switching tv vtty works, video performance is enough to play hd videos acceptable. Only issue with video is lack of suspend/resume, but I can live without it... and HDMI... yes this can be a another problem. Btw which amd driver is better, radeon or ati?


----------



## wblock@ (Sep 4, 2016)

The ati driver is for very old ATI video cards that probably few people use any more.  Use radeon.


----------



## shepper (Sep 4, 2016)

The ati video driver is a wrapper script.  In theory, both should work but, if you are using a modern card/chipset, your configuration will be cleaner if you follow wblock@'s advice.


> ATI(4x)                                                                ATI(4x)
> 
> *NAME*
> ati - ATI video driver
> ...


----------



## litk (Sep 6, 2016)

Thanks. I continue my adventure with FreeBSD.


----------

