10.3 stable successfully running Haswell graphics

Arto Pekkanen isoa at kapsi.fi
Tue Apr 19 14:17:04 UTC 2016


X.org absolutely CANNOT figure out the screen configuration if there are
multiple GPUs present. How could it? It has no way of knowing the
context of GPU use (ie. which GPU is wired with primary display), since
the devices do not offer such a metadata. This X.org just fails, and
very generously informs you of the above notion.

Read the handbook:
https://www.freebsd.org/doc/handbook/x-config.html

To set the Intel® driver in a configuration file:

Example 5.1. Select Intel® Video Driver in a File
/usr/local/etc/X11/xorg.conf.d/driver-intel.conf

Section "Device"
	Identifier "Card0"
	Driver     "intel"
	# BusID    "PCI:1:0:0"
EndSection

If more than one video card is present, the BusID identifier can be
uncommented and set to select the desired card. A list of video card bus
IDs can be displayed with pciconf -lv | grep -B3 display.

Then reboot your computer and whatever, see if it works or not.

Still don't work? You might need to configure a primary screen. Because
you did not give me the entire X.org log, I cannot know whether X.org
figured out a server layout or not.

A screen configuration binds a graphics device with a display. It is
possible that creating a screen configuration might have X.org use that
screen as the primary, and automatically configure a server layout from it.

Write this crap to file /usr/local/etc/X11/xorg.conf:

Section "Screen"
	Identifier "Screen0"
	Device "Card0"
EndSection

You could also declared monitors here, but since we leave them out,
X.org will figure out the outputs, rolls 20 sided die to choose some
funky resolution and clones the framebuffer on all the outputs that have
display physically attached.

If the Screen section ain't enough, then we finally we add the following
to xorg.conf:

Section "ServerLayout"
	Identifier "Layout0"
	Screen "Screen0"
EndSection

This should definitely work, because then X.org finds a server layout in
configuration, and thus it will not even try to auto-screw-up a
configuration.

And this is just for Intel. Don't even get me started on nVidia as slave
GPU. That hack is whack I tell you. Got it working on my laptop, though
I had to port a few components and create custom automation software for
it (some systems programming in ANSI-C and shell scripts). But that was
... years ago. Honestly I am not even interested in nVidia anymore,
since the corporation itself is so damn uncooperative with Open Source
developers. I just show my finger at nVidia, just like our lord and
savior Linus Torvalds.

Honestly: This is just the very basics to get started. If you don't have
lot of time figuring these out yourself, wait till developers manage to
port Radeon KMS drivers from Linux 4.x. Then you can buy a cheap laptop
with only ONE Radeon GPU and get X.org working automagically. Until then
you gotta be willing to learn how every graphics stack component is
configured by hand, and you might wanna learn some systems programming
too (ANSI-C and shell scripting for starters).

On 15.04.2016 02:30, Jeremy wrote:
> When the nVidia card was attached, did kldloading i915ikms cause kernel
> panic? Or was the problem merely X.org not detecting the intel GPU device?
> 
> I wish I would have kept the dmesg log for that period. But if I
> remember correctly, both video devices were detected by FreeBSD, the
> Nvidia Card and the iGPU from Intel. I actually have the xorg.log..,
> I'll clip some of it except for the relevant information:
> 
> [  2462.054]
> X.Org X Server 1.17.4
> Release Date: 2015-10-28
> [  2462.054] X Protocol Version 11, Revision 0
> [  2462.054] Build Operating System: FreeBSD 10.3-PRERELEASE amd64
> [  2462.054] Current Operating System: FreeBSD riotskates
> 10.3-PRERELEASE FreeBSD 10.3-PRERELEASE #0 r297531M: Mon Apr  4 00:05:47
> CDT 2016     root at riotskates:/usr/obj/usr/src/sys/I915 amd64
> [  2462.055] Build Date: 03 April 2016  08:06:13PM
> [  2462.055] 
> [  2462.055] Current version of pixman: 0.34.0
> [  2462.055]     Before reporting problems, check http://wiki.x.org
>     to make sure that you have the latest version.
> 
> ...
> 
> [  2462.058] (II) Module ABI versions:
> [  2462.058]     X.Org ANSI C Emulation: 0.4
> [  2462.058]     X.Org Video Driver: 19.0
> [  2462.058]     X.Org XInput driver : 21.0
> [  2462.058]     X.Org Server Extension : 9.0
> [  2462.058] (!!) More than one possible primary device found
> [  2462.058] (--) PCI: (0:0:2:0) 8086:0412:103c:2af3 rev 6, Mem @
> 0xf7400000/4194304, 0xd0000000/268435456, I/O @ 0x0000f000/64, BIOS @
> 0x????????/65536
> [  2462.058] (--) PCI: (0:1:0:0) 10de:11c2:196e:104c rev 161, Mem @
> 0xf6000000/16777216, 0xe0000000/134217728, 0xe8000000/33554432, I/O @
> 0x0000e000/128, BIOS @ 0x????????/65536
> [  2462.059] (II) "glx" will be loaded. This was enabled by default and
> also specified in the config file.
> [  2462.059] (II) LoadModule: "glx"
> [  2462.059] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
> [  2462.089] (II) Module glx: vendor="NVIDIA Corporation"
> [  2462.089]     compiled for 4.0.2, module version = 1.0.0
> [  2462.089]     Module class: X.Org Server Extension
> [  2462.089] (II) NVIDIA GLX Module  346.96  Sun Aug 23 21:29:48 PDT 2015
> [  2462.089] (II) LoadModule: "nvidia"
> [  2462.090] (II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
> [  2462.091] (II) Module nvidia: vendor="NVIDIA Corporation"
> [  2462.091]     compiled for 4.0.2, module version = 1.0.0
> [  2462.091]     Module class: X.Org Video Driver
> [  2462.091] (II) NVIDIA dlloader X Driver  346.96  Sun Aug 23 21:08:26
> PDT 2015
> [  2462.091] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
> [  2462.091] (--) Using syscons driver with X support (version 0.x)
> [  2462.091] (--) using VT number 9
> 
> [  2462.091] (EE) No devices detected.
> [  2462.092] (EE)
> Fatal server error:
> [  2462.092] (EE) no screens found(EE)
> [  2462.092] (EE)
> Please consult the The X.Org Foundation support
>      at http://wiki.x.org
>  for help.
> [  2462.092] (EE) Please also check the log file at
> "/var/log/Xorg.0.log" for additional information.
> [  2462.092] (EE)
> [  2462.092] (EE) Server terminated with error (1). Closing log file.
> 
> 
> The error from Xorg was more than one possible primary device found, no
> devices detected, no screens found.
> 
> Even though I selected the primary video as the iGPU from Intel thru the
> BIOS, it looks like Xorg was confused.
> The kernel never did panic though, Xorg just never started. I am using a
> desktop computer, and the Nvidia card was an addon I originally intended
> to use only as a GPGPU thru Windows. But It became my video card for
> FreeBSD while I waited for the Haswell port to be completed.
> 
> Regards,
> 
> Jeremy Cox
> 
> On Thu, Apr 14, 2016 at 11:25 AM, Arto Pekkanen <isoa at kapsi.fi
> <mailto:isoa at kapsi.fi>> wrote:
> 
>     When the nVidia card was attached, did kldloading i915ikms cause kernel
>     panic? Or was the problem merely X.org not detecting the intel GPU
>     device?
> 
>     A person just before posted that their laptop with both intel and nVidia
>     GPUs has kernel panic upon loading i915kms, even though the laptop Ivy
>     Bridge chipset should be fully supported even in 10.3 without patches.
> 
>     Summa summarum: the DRM/KMS stack seems to misbehave with nVidia GPUs.
>     This need to be fixed. More data required for devs.
> 
>     If you want to help, you could run FreeBSD HEAD from a USB stick and
>     test if intel is usable with nVidia attached, and if not, report PR to
>     the developers so they can fix this problem.
> 
>     On 14.04.2016 07:13, Jeremy wrote:
>     > Thanks for all of your hard work at FreeBSD. And thanks to *Masachika
>     > ISHIZUKA's *Haswell patch I am running my Haswell graphics on
>     FreeBSD 10.3
>     > stable (r297531M) using Xorg Server version 1.18.3 and KDE 4.14.3.
>     >
>     > The only issue I had was trying to get Xorg Server to start with my Nvidia
>     > card installed in my computer and Haswell graphics selected by the computer
>     > BIOS as the primary video, (but without my Nvidia card being used at all).
>     > I tried modifying the Xorg.conf file with BUSID and also tried removing the
>     > Nvidia configure lines from Xorg.conf but nothing worked, and it wouldn't
>     > start. I finally had to physically remove the Nvidia card to get the
>     > Haswell graphics to work. Other than that, the Haswell graphics works like
>     > a charm.
>     >
>     > Again, thank you all for your hard work!
>     > regards,
>     >
>     > Jeremy Cox
>     > _______________________________________________
>     > freebsd-x11 at freebsd.org <mailto:freebsd-x11 at freebsd.org> mailing list
>     > https://lists.freebsd.org/mailman/listinfo/freebsd-x11
>     > To unsubscribe, send any mail to
>     "freebsd-x11-unsubscribe at freebsd.org
>     <mailto:freebsd-x11-unsubscribe at freebsd.org>"
>     >
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-x11/attachments/20160419/d56f7b29/attachment.sig>


More information about the freebsd-x11 mailing list