# Problem installing X.Org



## balanga (Jan 7, 2018)

I've installed Xorg in the past and it has usually 'just worked' at least when running `startx` with `twm`.

I'm now starting from scratch on a new system and would like install a minimal Desktop...
I thought I was in luck when I found 
*[howto] Minimal FreeBSD desktop*
Thread /35308/
but what started out as a 'Howto' six years ago has turned into a major discussion with almost 200 posts, and with FreeBSD continually developing, I guess a lot of the info contained is out of date and no longer relevant, for example:-

```
Next we need to configure Xorg so run this command:

# Xorg -configure
```

Elsewhere I have read that is no longer necessary, so I the absence of an up to date guide, I've simply run:-

```
pkg install xorg
startx
```

It didn't work but produced the following /var/log/Xorg.0.log, from which I hope someone can point out what I've missed...




```
[ 82991.729] 
X.Org X Server 1.18.4
Release Date: 2016-07-19
[ 82991.729] X Protocol Version 11, Revision 0
[ 82991.729] Build Operating System: FreeBSD 11.1-RELEASE-p6 amd64 
[ 82991.729] Current Operating System: FreeBSD Z83 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
[ 82991.733] Build Date: 02 January 2018  09:31:19AM
[ 82991.733] 
[ 82991.733] Current version of pixman: 0.34.0
[ 82991.733]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[ 82991.733] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 82991.733] (==) Log file: "/var/log/Xorg.0.log", Time: Sun Jan  7 13:58:02 2018
[ 82991.735] (II) Loader magic: 0x80cc10
[ 82991.735] (II) Module ABI versions:
[ 82991.735]     X.Org ANSI C Emulation: 0.4
[ 82991.735]     X.Org Video Driver: 20.0
[ 82991.735]     X.Org XInput driver : 22.1
[ 82991.735]     X.Org Server Extension : 9.0
[ 82991.735] (--) PCI:*(0:0:2:0) 8086:22b0:8086:7270 rev 54, Mem @ 0x90000000/16777216, 0x80000000/268435456, I/O @ 0x0000f000/64, BIOS @ 0x????????/65536
[ 82991.735] (==) Using default built-in configuration (39 lines)
[ 82991.735] (==) --- Start of built-in configuration ---
[ 82991.735]     Section "Device"
[ 82991.735]         Identifier    "Builtin Default intel Device 0"
[ 82991.735]         Driver    "intel"
[ 82991.735]     EndSection
[ 82991.735]     Section "Screen"
[ 82991.735]         Identifier    "Builtin Default intel Screen 0"
[ 82991.735]         Device    "Builtin Default intel Device 0"
[ 82991.735]     EndSection
[ 82991.735]     Section "Device"
[ 82991.735]         Identifier    "Builtin Default modesetting Device 0"
[ 82991.735]         Driver    "modesetting"
[ 82991.735]     EndSection
[ 82991.735]     Section "Screen"
[ 82991.736]         Identifier    "Builtin Default modesetting Screen 0"
[ 82991.736]         Device    "Builtin Default modesetting Device 0"
[ 82991.736]     EndSection
[ 82991.736]     Section "Device"
[ 82991.736]         Identifier    "Builtin Default scfb Device 0"
[ 82991.736]         Driver    "scfb"
[ 82991.736]     EndSection
[ 82991.736]     Section "Screen"
[ 82991.736]         Identifier    "Builtin Default scfb Screen 0"
[ 82991.736]         Device    "Builtin Default scfb Device 0"
[ 82991.736]     EndSection
[ 82991.736]     Section "Device"
[ 82991.736]         Identifier    "Builtin Default vesa Device 0"
[ 82991.736]         Driver    "vesa"
[ 82991.736]     EndSection
[ 82991.736]     Section "Screen"
[ 82991.736]         Identifier    "Builtin Default vesa Screen 0"
[ 82991.736]         Device    "Builtin Default vesa Device 0"
[ 82991.736]     EndSection
[ 82991.736]     Section "ServerLayout"
[ 82991.736]         Identifier    "Builtin Default Layout"
[ 82991.736]         Screen    "Builtin Default intel Screen 0"
[ 82991.736]         Screen    "Builtin Default modesetting Screen 0"
[ 82991.736]         Screen    "Builtin Default scfb Screen 0"
[ 82991.736]         Screen    "Builtin Default vesa Screen 0"
[ 82991.736]     EndSection
[ 82991.736] (==) --- End of built-in configuration ---
[ 82991.736] (==) ServerLayout "Builtin Default Layout"
[ 82991.736] (**) |-->Screen "Builtin Default intel Screen 0" (0)
[ 82991.736] (**) |   |-->Monitor "<default monitor>"
[ 82991.737] (**) |   |-->Device "Builtin Default intel Device 0"
[ 82991.737] (==) No monitor specified for screen "Builtin Default intel Screen 0".
    Using a default monitor configuration.
[ 82991.737] (**) |-->Screen "Builtin Default modesetting Screen 0" (1)
[ 82991.737] (**) |   |-->Monitor "<default monitor>"
[ 82991.737] (**) |   |-->Device "Builtin Default modesetting Device 0"
[ 82991.737] (==) No monitor specified for screen "Builtin Default modesetting Screen 0".
    Using a default monitor configuration.
[ 82991.737] (**) |-->Screen "Builtin Default scfb Screen 0" (2)
[ 82991.737] (**) |   |-->Monitor "<default monitor>"
[ 82991.738] (**) |   |-->Device "Builtin Default scfb Device 0"
[ 82991.738] (==) No monitor specified for screen "Builtin Default scfb Screen 0".
    Using a default monitor configuration.
[ 82991.738] (**) |-->Screen "Builtin Default vesa Screen 0" (3)
[ 82991.738] (**) |   |-->Monitor "<default monitor>"
[ 82991.738] (**) |   |-->Device "Builtin Default vesa Device 0"
[ 82991.738] (==) No monitor specified for screen "Builtin Default vesa Screen 0".
    Using a default monitor configuration.
[ 82991.738] (==) Automatically adding devices
[ 82991.738] (==) Automatically enabling devices
[ 82991.738] (==) Not automatically adding GPU devices
[ 82991.738] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 82991.738] (==) 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/
[ 82991.738] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[ 82991.739] (II) The server relies on devd to provide the list of input devices.
    If no devices become available, reconfigure devd or disable AutoAddDevices.
[ 82991.739] (II) LoadModule: "glx"
[ 82991.739] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[ 82991.770] (II) Module glx: vendor="X.Org Foundation"
[ 82991.770]     compiled for 1.18.4, module version = 1.0.0
[ 82991.770]     ABI class: X.Org Server Extension, version 9.0
[ 82991.770] (==) AIGLX enabled
[ 82991.770] (II) LoadModule: "intel"
[ 82991.771] (WW) Warning, couldn't open module intel
[ 82991.771] (II) UnloadModule: "intel"
[ 82991.771] (II) Unloading intel
[ 82991.771] (EE) Failed to load module "intel" (module does not exist, 0)
[ 82991.771] (II) LoadModule: "modesetting"
[ 82991.771] (II) Loading /usr/local/lib/xorg/modules/drivers/modesetting_drv.so
[ 82991.772] (II) Module modesetting: vendor="X.Org Foundation"
[ 82991.772]     compiled for 1.18.4, module version = 1.18.4
[ 82991.772]     Module class: X.Org Video Driver
[ 82991.772]     ABI class: X.Org Video Driver, version 20.0
[ 82991.772] (II) LoadModule: "scfb"
[ 82991.772] (II) Loading /usr/local/lib/xorg/modules/drivers/scfb_drv.so
[ 82991.772] (II) Module scfb: vendor="X.Org Foundation"
[ 82991.772]     compiled for 1.18.4, module version = 0.0.4
[ 82991.772]     ABI class: X.Org Video Driver, version 20.0
[ 82991.772] (II) LoadModule: "vesa"
[ 82991.772] (II) Loading /usr/local/lib/xorg/modules/drivers/vesa_drv.so
[ 82991.773] (II) Module vesa: vendor="X.Org Foundation"
[ 82991.773]     compiled for 1.18.4, module version = 2.3.4
[ 82991.773]     Module class: X.Org Video Driver
[ 82991.773]     ABI class: X.Org Video Driver, version 20.0
[ 82991.773] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 82991.773] (II) scfb: driver for wsdisplay framebuffer: scfb
[ 82991.773] (II) VESA: driver for VESA chipsets: vesa
[ 82991.800] (--) Using syscons driver with X support (version 2.0)
[ 82991.800] (--) using VT number 9

[ 82991.800] (EE) open /dev/dri/card0: No such file or directory
[ 82991.800] (WW) Falling back to old probe method for modesetting
[ 82991.800] (EE) open /dev/dri/card0: No such file or directory
[ 82991.800] (WW) Falling back to old probe method for scfb
[ 82991.800] scfb trace: probe start
[ 82991.800] (II) scfb(1): using default device
[ 82991.800] scfb trace: probe done
[ 82991.800] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 82991.800] (EE) Screen 0 deleted because of no matching config section.
[ 82991.800] (II) UnloadModule: "modesetting"
[ 82991.800] (EE) 
Fatal server error:
[ 82991.801] (EE) Cannot run in framebuffer mode. Please specify busIDs        for all framebuffer devices
[ 82991.801] (EE) 
[ 82991.801] (EE) 
Please consult the The X.Org Foundation support 
    at http://wiki.x.org
 for help. 
[ 82991.801] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 82991.801] (EE) 
[ 82991.801] (EE) Server terminated with error (1). Closing log file.
```


----------



## balanga (Jan 7, 2018)

`pciconf -lv`


```
hostb0@pci0:0:0:0:    class=0x060000 card=0x72708086 chip=0x22808086 rev=0x36 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=0x72708086 chip=0x22b08086 rev=0x36 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Configuration Registers'
    class      = display
    subclass   = VGA
none0@pci0:0:11:0:    class=0x118000 card=0x72708086 chip=0x22dc8086 rev=0x36 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=0x72708086 chip=0x22b58086 rev=0x36 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=0x72708086 chip=0x22988086 rev=0x36 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Trusted Execution Engine'
    class      = encrypt/decrypt
pcib1@pci0:0:28:0:    class=0x060400 card=0x72708086 chip=0x22c88086 rev=0x36 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=0x72708086 chip=0x229c8086 rev=0x36 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCU'
    class      = bridge
    subclass   = PCI-ISA
re0@pci0:1:0:0:    class=0x020000 card=0x012310ec chip=0x816810ec rev=0x0c hdr=0x00
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller'
    class      = network
    subclass   = ethernet
```


----------



## Sensucht94 (Jan 7, 2018)

balanga said:


> but what started out as a 'Howto' six years ago has turned into a major discussion with almost 200 posts, and with FreeBSD continually developing, I guess a lot of the info contained is out of date and no longer relevant, for example:-



Hi!...I looked over that thread again recently, I can give you my opinion, for what it's worth: I found it still valuable, and almost nothing seemed outdated.



balanga said:


> Next we need to configure Xorg so run this command:
> # Xorg -configure
> Elsewhere I have read that is no longer necessary, so I the absence of an up-to-date guide,...



It's because at the state it's now (R7.7), in most cases Xorg is able to detect the best configuration automatically, the first time one launches it. So unless issues are encountered, the `Xorg -configure` command should not be used, as the new configuration may bring issues  which the first didn't have. Yet, since the new configuration file (/root/xorg.conf.new) will not overwrite the default /etc/X11/xorg.conf, you're still free to test it before overwriting the former, with no harm done. Anyway tweaking with xorg.conf is not recommended, whereas any custom/additional configuration can be more safely placed in a .conf file inside /usr/local/etc/X11/xorg.conf.d, following the xorg.conf(5) syntax, see also 5.4 Xorg Configuration
Looking at your log:

```
[ 82991.771] (WW) Warning, couldn't open module intel
[ 82991.771] (II) UnloadModule: "intel"
[ 82991.771] (II) Unloading intel
[ 82991.771] (EE) Failed to load module "intel" (module does not exist, 0)
```
en
it looks like you haven't installed x11-drivers/xf86-video-intel for your:

```
vgapci0@pci0:0:2:0:    class=0x030000 card=0x72708086 chip=0x22b08086 rev=0x36 hdr=0x00
   vendor     = 'Intel Corporation'
   device     = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Configuration Registers'
   class      = display
   subclass   = VGA
```
Which is in accordance with the fact you just installed x11/xorg meta port, as it does not include intel(4) amongst drivers, see x11/xorg-drivers.
Having failed to find a suitable driver, Xorg is trying to load vesa(4), scfb(4), modesetting(4) as fall back, and has added corresponding multiple entries to your /etc/X11/xorg.conf.

Try installing x11-driver/xf86-video-intel, then add a custom .conf file for your Intel GPU inside /usr/local/etc/X11/xorg.conf.d, with at least minimal content like that:


```
Section    "Device"
       Identifier "Card0"
       Driver     "intel"
       BusID      "PCI:0:2:0"
EndSection
```

Refer to intel(4) for additional options 

If the auto-generated configuration conflicts with yours, try deleting the entries in your xorg.conf related to all the other drivers but intel

Also, to enable 3D video acceleration add your user to `video` group:
`pw groupmod video -m balanga`

Finally, since you're on Intel, you could enable the KMS driver to get proper resolution on ttyv* with vt console, by adding

```
i915kms_load="YES"
```
to /boot/loader.conf

EDIT: If your integrated Graphics happened not to be supported yet, try with framebuffer driver instead


----------



## Deleted member 48958 (Jan 7, 2018)

It is better to add i915kms to "kld_list" in /etc/rc.conf:

```
kld_list="i915kms"
```
 than to load it via /boot/loader.conf.


----------



## balanga (Jan 7, 2018)

After installing  x11-drivers/xf86-video-intel and creating /usr/local/etc/X11xorg.conf.d/intel.conf containing:-

```
Section        "Device"
    Identifier    "Card0"
    Driver    "intel"
    BusId    "PCI:0:2:0"
Endsection
```
I now get:

```
[ 92072.577] 
X.Org X Server 1.18.4
Release Date: 2016-07-19
[ 92072.577] X Protocol Version 11, Revision 0
[ 92072.578] Build Operating System: FreeBSD 11.1-RELEASE-p6 amd64 
[ 92072.578] Current Operating System: FreeBSD Z83 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
[ 92072.578] Build Date: 02 January 2018  09:31:19AM
[ 92072.578] 
[ 92072.578] Current version of pixman: 0.34.0
[ 92072.578]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[ 92072.579] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 92072.579] (==) Log file: "/var/log/Xorg.0.log", Time: Sun Jan  7 16:29:23 2018
[ 92072.579] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
[ 92072.579] (==) No Layout section.  Using the first Screen section.
[ 92072.579] (==) No screen section available. Using defaults.
[ 92072.579] (**) |-->Screen "Default Screen Section" (0)
[ 92072.579] (**) |   |-->Monitor "<default monitor>"
[ 92072.580] (==) No device specified for screen "Default Screen Section".
    Using the first device section listed.
[ 92072.580] (**) |   |-->Device "Card0"
[ 92072.580] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[ 92072.580] (==) Automatically adding devices
[ 92072.580] (==) Automatically enabling devices
[ 92072.580] (==) Not automatically adding GPU devices
[ 92072.580] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 92072.580] (==) 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/
[ 92072.580] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[ 92072.580] (II) The server relies on devd to provide the list of input devices.
    If no devices become available, reconfigure devd or disable AutoAddDevices.
[ 92072.580] (II) Loader magic: 0x80cc10
[ 92072.580] (II) Module ABI versions:
[ 92072.580]     X.Org ANSI C Emulation: 0.4
[ 92072.580]     X.Org Video Driver: 20.0
[ 92072.580]     X.Org XInput driver : 22.1
[ 92072.580]     X.Org Server Extension : 9.0
[ 92072.581] (--) PCI:*(0:0:2:0) 8086:22b0:8086:7270 rev 54, Mem @ 0x90000000/16777216, 0x80000000/268435456, I/O @ 0x0000f000/64, BIOS @ 0x????????/65536
[ 92072.581] (II) LoadModule: "glx"
[ 92072.581] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[ 92072.585] (II) Module glx: vendor="X.Org Foundation"
[ 92072.585]     compiled for 1.18.4, module version = 1.0.0
[ 92072.585]     ABI class: X.Org Server Extension, version 9.0
[ 92072.585] (==) AIGLX enabled
[ 92072.585] (II) LoadModule: "intel"
[ 92072.586] (II) Loading /usr/local/lib/xorg/modules/drivers/intel_drv.so
[ 92072.586] (II) Module intel: vendor="X.Org Foundation"
[ 92072.586]     compiled for 1.18.4, module version = 2.99.917
[ 92072.586]     Module class: X.Org Video Driver
[ 92072.586]     ABI class: X.Org Video Driver, version 20.0
[ 92072.586] (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
[ 92072.587] (II) intel: Driver for Intel(R) HD Graphics
[ 92072.587] (II) intel: Driver for Intel(R) Iris(TM) Graphics
[ 92072.587] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics
[ 92072.587] (--) Using syscons driver with X support (version 2.0)
[ 92072.588] (--) using VT number 9

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

Is this because i915kms is missing?


----------



## Deleted member 48958 (Jan 7, 2018)

Remove all /usr/local/etc/X11xorg.conf.d/ files, that you created,
and create /etc/X11/xorg.conf file, that should contain "Device" section:

```
Section "Device"
	Identifier   "Card0"
	BusID        "PCI:0:2:0"
	Driver       "modesetting"
EndSection
```

Also be sure that i915kms kernel module is loaded,
add it to "kld_list" in /etc/rc.conf (and remove _i915kms_load="YES"_ from /boot/loader.conf),
as written above, and execute:
`# kldload i915kms`

When using "modesetting" driver instead of "intel", it is not necessary to install x11-drivers/xf86-video-intel.
Also "modesetting" driver works a little bit more "stable" for me.


----------



## tobik@ (Jan 7, 2018)

balanga said:


> vgapci0@pci0:0:2:0: class=0x030000 card=0x72708086 chip=*0x22b0*8086 rev=0x36 hdr=0x00


This is a Cherryview GPU. It's not supported on any release version of FreeBSD at the moment.


----------



## Sensucht94 (Jan 7, 2018)

ILUXA said:


> When using "modesetting" driver instead of "intel", it is not necessary to install x11-drivers/xf86-video-intel



Yes, but  as  framebuffer driver, modesetting+KMS has no video acceleration . Moreover Intel can boast way more Options, amid which, backlight control


----------



## Deleted member 48958 (Jan 7, 2018)

Sensucht94 said:


> modesetting+KMS has no video acceleration


No. It has video acceleration, it works 100% OK for me with i915kms kernel module.

If you got no acceleration with "modesetting" driver, also try to add:

```
Section "Module"
        Load  "glamoregl"
EndSection
```
and
	
	



```
Section "Device"
        Identifier   "Card0"
        BusID        "PCI:0:2:0"
        Driver       "modesetting"
        [b]Option       "AccelMethod" "glamor"[/b]
EndSection
```
to /etc/X11/xorg.conf.


----------



## balanga (Jan 7, 2018)

tobik@ said:


> This is a Cherryview GPU. It's not supported on any release version of FreeBSD at the moment.



It's one of these...

Are you saying I may as well give up on getting X.org working on this at the moment, or is there some w-i-p which I could test?


----------



## Sensucht94 (Jan 7, 2018)

balanga said:


> It's one of these...
> 
> Are you saying I may as well give up on getting X.org working on this at the moment, or is there some w-i-p which I could test?



You can give a chance to scfb(4) though results maybe disappointing, depending on your expectations,or switch to CURRENT and try with graphics/drm-next-kmod; See  FreeBSDDesktop/kms-drm on Github


----------



## scottro (Jan 7, 2018)

If you want to try with drm-next and CURRENT, I have a little page  that gives  instructions at http://srobb.net/freebsdintel.html


----------



## balanga (Jan 9, 2018)

Getting X.org working on this system definitely sounds like a challenge and I have no real idea if it will be successful. If it only takes me a day to find out whether it works or not then I might give it a go...


----------



## akram65 (Jan 10, 2018)

Is this way going to work with my kaby lake laptip too? I got nvidia installed as well with drm-next-kmod port make installed.


----------



## balanga (Jan 10, 2018)

scottro said:


> If you want to try with drm-next and CURRENT, I have a little page  that gives  instructions at http://srobb.net/freebsdintel.html



I thought I'd give this a try but it sounds quite complicated and error prone....

After running `pkg install drm-next-kmod`, weird things happen...

```
UFS /dev/da0p2 (/) cylinder checksum failed: cg 2, cgp: 0xb462f3c7 != bp: 0x94c260e0
UFS /dev/da0p2 (/) cylinder checksum failed: cg 2, cgp: 0xb462f3c7 != bp: 0x94c260e0
UFS /dev/da0p2 (/) cylinder checksum failed: cg 2, cgp: 0xb462f3c7 != bp: 0x94c260e0
UFS /dev/da0p2 (/) cylinder checksum failed: cg 2, cgp: 0xb462f3c7 != bp: 0x94c260e0
UFS /dev/da0p2 (/) cylinder checksum failed: cg 2, cgp: 0xb462f3c7 != bp: 0x94c260e0
```

and when I try to reboot:-

```
syncing disks, vnodes remaining... 2 0 done
        buffers synced.
     d0: detached
     d0: detached
   _alloc_device: failure selecting configuration index 0:USB_ERR_TIMEOUT, port 3, addr 3 (ignored)
    n0.2: <vendor 0x1c4f product 0x0026. at usbus0
```

Unfortunately the leftmost three characters are cut off the screen as is the last line.
The system halts and a power cycle is necessary, but it does boot up OK.
I'll try and post parts of X.org.log when I get chance...


----------



## scottro (Jan 10, 2018)

I mention on the page that the package didn't work for me with more recent snapshots. I had to install the source with svnlite co (as in checkout) then build the port rather than use the package.


----------



## Phishfry (Jan 10, 2018)

That's the pitfalls of -CURRENT. You really have to keep your ears on the FreeBSD current mailing list. There are releases that can hurt your hardware. Sometimes these testing releases are pulled with a warning sometimes not.
What I do is pick a time when it looks like -CURRENT is in a good place to download and not all messed up.
I try to stick with a good working version for a couple of months.
On Pi3 there is no alternative so it's a bumpy ride.


----------



## balanga (Jan 11, 2018)

balanga said:


> I thought I'd give this a try but it sounds quite complicated and error prone....
> 
> I'll try and post parts of X.org.log when I get chance...




```
[    23.453] 
X.Org X Server 1.18.4
Release Date: 2016-07-19
[    23.453] X Protocol Version 11, Revision 0
[    23.453] Build Operating System: FreeBSD 12.0-CURRENT amd64 
[    23.453] Current Operating System: FreeBSD Z83 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r327524: Wed Jan  3 19:43:33 UTC 2018     root@releng3.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
[    23.454] Build Date: 28 December 2017  02:37:40AM
[    23.454] 
[    23.454] Current version of pixman: 0.34.0
[    23.455]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[    23.455] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    23.455] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Jan 10 20:52:55 2018
[    23.466] (II) Loader magic: 0x811d40
[    23.466] (II) Module ABI versions:
[    23.466]     X.Org ANSI C Emulation: 0.4
[    23.466]     X.Org Video Driver: 20.0
[    23.466]     X.Org XInput driver : 22.1
[    23.466]     X.Org Server Extension : 9.0
[    23.467] (--) PCI:*(0:0:2:0) 8086:22b0:8086:7270 rev 54, Mem @ 0x90000000/16777216, 0x80000000/268435456, I/O @ 0x0000f000/64, BIOS @ 0x????????/65536
[    23.468] (==) Using default built-in configuration (39 lines)
[    23.468] (==) --- Start of built-in configuration ---
[    23.468]     Section "Device"
[    23.468]         Identifier    "Builtin Default intel Device 0"
[    23.468]         Driver    "intel"
[    23.468]     EndSection
[    23.468]     Section "Screen"
[    23.468]         Identifier    "Builtin Default intel Screen 0"
[    23.468]         Device    "Builtin Default intel Device 0"
[    23.468]     EndSection
[    23.468]     Section "Device"
[    23.468]         Identifier    "Builtin Default modesetting Device 0"
[    23.468]         Driver    "modesetting"
[    23.468]     EndSection
[    23.469]     Section "Screen"
[    23.469]         Identifier    "Builtin Default modesetting Screen 0"
[    23.469]         Device    "Builtin Default modesetting Device 0"
[    23.469]     EndSection
[    23.469]     Section "Device"
[    23.469]         Identifier    "Builtin Default scfb Device 0"
[    23.469]         Driver    "scfb"
[    23.469]     EndSection
[    23.469]     Section "Screen"
[    23.469]         Identifier    "Builtin Default scfb Screen 0"
[    23.469]         Device    "Builtin Default scfb Device 0"
[    23.469]     EndSection
[    23.469]     Section "Device"
[    23.469]         Identifier    "Builtin Default vesa Device 0"
[    23.469]         Driver    "vesa"
[    23.469]     EndSection
[    23.469]     Section "Screen"
[    23.469]         Identifier    "Builtin Default vesa Screen 0"
[    23.469]         Device    "Builtin Default vesa Device 0"
[    23.469]     EndSection
[    23.469]     Section "ServerLayout"
[    23.469]         Identifier    "Builtin Default Layout"
[    23.470]         Screen    "Builtin Default intel Screen 0"
[    23.470]         Screen    "Builtin Default modesetting Screen 0"
[    23.470]         Screen    "Builtin Default scfb Screen 0"
[    23.470]         Screen    "Builtin Default vesa Screen 0"
[    23.470]     EndSection
[    23.470] (==) --- End of built-in configuration ---
[    23.470] (==) ServerLayout "Builtin Default Layout"
[    23.470] (**) |-->Screen "Builtin Default intel Screen 0" (0)
[    23.470] (**) |   |-->Monitor "<default monitor>"
[    23.472] (**) |   |-->Device "Builtin Default intel Device 0"
[    23.472] (==) No monitor specified for screen "Builtin Default intel Screen 0".
    Using a default monitor configuration.
[    23.472] (**) |-->Screen "Builtin Default modesetting Screen 0" (1)
[    23.472] (**) |   |-->Monitor "<default monitor>"
[    23.472] (**) |   |-->Device "Builtin Default modesetting Device 0"
[    23.472] (==) No monitor specified for screen "Builtin Default modesetting Screen 0".
    Using a default monitor configuration.
[    23.473] (**) |-->Screen "Builtin Default scfb Screen 0" (2)
[    23.473] (**) |   |-->Monitor "<default monitor>"
[    23.473] (**) |   |-->Device "Builtin Default scfb Device 0"
[    23.473] (==) No monitor specified for screen "Builtin Default scfb Screen 0".
    Using a default monitor configuration.
[    23.473] (**) |-->Screen "Builtin Default vesa Screen 0" (3)
[    23.473] (**) |   |-->Monitor "<default monitor>"
[    23.474] (**) |   |-->Device "Builtin Default vesa Device 0"
[    23.474] (==) No monitor specified for screen "Builtin Default vesa Screen 0".
    Using a default monitor configuration.
[    23.474] (==) Automatically adding devices
[    23.474] (==) Automatically enabling devices
[    23.474] (==) Not automatically adding GPU devices
[    23.475] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    23.492] (==) 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/
[    23.493] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[    23.493] (II) The server relies on devd to provide the list of input devices.
    If no devices become available, reconfigure devd or disable AutoAddDevices.
[    23.495] (II) LoadModule: "glx"
[    23.499] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[    23.538] (II) Module glx: vendor="X.Org Foundation"
[    23.538]     compiled for 1.18.4, module version = 1.0.0
[    23.538]     ABI class: X.Org Server Extension, version 9.0
[    23.538] (==) AIGLX enabled
[    23.539] (II) LoadModule: "intel"
[    23.544] (WW) Warning, couldn't open module intel
[    23.544] (II) UnloadModule: "intel"
[    23.544] (II) Unloading intel
[    23.544] (EE) Failed to load module "intel" (module does not exist, 0)
[    23.544] (II) LoadModule: "modesetting"
[    23.544] (II) Loading /usr/local/lib/xorg/modules/drivers/modesetting_drv.so
[    23.547] (II) Module modesetting: vendor="X.Org Foundation"
[    23.547]     compiled for 1.18.4, module version = 1.18.4
[    23.548]     Module class: X.Org Video Driver
[    23.548]     ABI class: X.Org Video Driver, version 20.0
[    23.548] (II) LoadModule: "scfb"
[    23.548] (II) Loading /usr/local/lib/xorg/modules/drivers/scfb_drv.so
[    23.549] (II) Module scfb: vendor="X.Org Foundation"
[    23.549]     compiled for 1.18.4, module version = 0.0.4
[    23.549]     ABI class: X.Org Video Driver, version 20.0
[    23.550] (II) LoadModule: "vesa"
[    23.550] (II) Loading /usr/local/lib/xorg/modules/drivers/vesa_drv.so
[    23.551] (II) Module vesa: vendor="X.Org Foundation"
[    23.551]     compiled for 1.18.4, module version = 2.3.4
[    23.551]     Module class: X.Org Video Driver
[    23.551]     ABI class: X.Org Video Driver, version 20.0
[    23.551] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    23.552] (II) scfb: driver for wsdisplay framebuffer: scfb
[    23.552] (II) VESA: driver for VESA chipsets: vesa
[    23.552] (--) Using syscons driver with X support (version 2.0)
[    23.552] (--) using VT number 9

[    23.553] (EE) open /dev/dri/card0: No such file or directory
[    23.553] (WW) Falling back to old probe method for modesetting
[    23.553] (EE) open /dev/dri/card0: No such file or directory
[    23.553] (WW) Falling back to old probe method for scfb
[    23.553] scfb trace: probe start
[    23.553] (II) scfb(1): using default device
[    23.553] scfb trace: probe done
[    23.554] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[    23.554] (EE) Screen 0 deleted because of no matching config section.
[    23.554] (II) UnloadModule: "modesetting"
[    23.554] (EE) 
Fatal server error:
[    23.554] (EE) Cannot run in framebuffer mode. Please specify busIDs        for all framebuffer devices
[    23.554] (EE) 
[    23.554] (EE) 
Please consult the The X.Org Foundation support 
    at http://wiki.x.org
 for help. 
[    23.554] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    23.554] (EE) 
[    23.555] (EE) Server terminated with error (1). Closing log file.
```

This is after install drm-next-kmode.

Is there anything I should try before giving up on this for the time being?


----------



## balanga (Jan 11, 2018)

Phishfry said:


> That's the pitfalls of -CURRENT. You really have to keep your ears on the FreeBSD current mailing list. There are releases that can hurt your hardware. Sometimes these testing releases are pulled with a warning sometimes not.
> What I do is pick a time when it looks like -CURRENT is in a good place to download and not all messed up.
> I try to stick with a good working version for a couple of months.
> On Pi3 there is no alternative so it's a bumpy ride.



I think I'll go back to 11.1-RELEASE for this Mini-PC and wait until I hear that Cherryview is supported before trying again to get xorg running. In the meantime I'll try and get my Z83 setup as a TVheadend server and a 4G router with the help of DVB-T and 4G dongles.


----------



## balanga (Jan 14, 2018)

Just tried installing TrueOS and it works!!!

Not sure how TrueOS managed to configure X.org but the installation disk started up the GUI to my surprise...


----------



## balanga (Mar 29, 2018)

tobik@ said:


> This is a Cherryview GPU. It's not supported on any release version of FreeBSD at the moment.



I am able to use this system with TrueOS, which I thought was based on FreeBSD 12.0-CURRENT...


----------

