Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Apr 2016 17:16:54 +0300
From:      Arto Pekkanen <isoa@kapsi.fi>
To:        Jeremy <jeremy.m.cox@gmail.com>
Cc:        freebsd-x11@freebsd.org
Subject:   Re: 10.3 stable successfully running Haswell graphics
Message-ID:  <57163DD6.90908@kapsi.fi>
In-Reply-To: <CAPH9q1ojsNRUe2x%2BvCsa--6SxjkzxD7qrqb0iYkczAsxXwN6fg@mail.gmail.com>
References:  <CAPH9q1p4ctRSKv=wrZvetj0CHk_yKtM9P5Gk1=W71AAonhcfOw@mail.gmail.com> <570FC47B.1060302@kapsi.fi> <CAPH9q1ojsNRUe2x%2BvCsa--6SxjkzxD7qrqb0iYkczAsxXwN6fg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--LDQkMa1To37NhmpqF1iEINmQm6204bFjc
Content-Type: multipart/mixed; boundary="5axljlhRAJGmKo6iwVS2riPX8HS5v3cRd"
From: Arto Pekkanen <isoa@kapsi.fi>
To: Jeremy <jeremy.m.cox@gmail.com>
Cc: freebsd-x11@freebsd.org
Message-ID: <57163DD6.90908@kapsi.fi>
Subject: Re: 10.3 stable successfully running Haswell graphics
References: <CAPH9q1p4ctRSKv=wrZvetj0CHk_yKtM9P5Gk1=W71AAonhcfOw@mail.gmail.com>
 <570FC47B.1060302@kapsi.fi>
 <CAPH9q1ojsNRUe2x+vCsa--6SxjkzxD7qrqb0iYkczAsxXwN6fg@mail.gmail.com>
In-Reply-To: <CAPH9q1ojsNRUe2x+vCsa--6SxjkzxD7qrqb0iYkczAsxXwN6fg@mail.gmail.com>

--5axljlhRAJGmKo6iwVS2riPX8HS5v3cRd
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

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=C2=AE driver in a configuration file:

Example 5.1. Select Intel=C2=AE 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 i=
t.

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
=2E.. 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 devi=
ce?
>=20
> 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:
>=20
> [  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:4=
7
> CDT 2016     root@riotskates:/usr/obj/usr/src/sys/I915 amd64
> [  2462.055] Build Date: 03 April 2016  08:06:13PM
> [  2462.055]=20
> [  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.
>=20
> ...
>=20
> [  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=
=2Eso
> [  2462.089] (II) Module glx: vendor=3D"NVIDIA Corporation"
> [  2462.089]     compiled for 4.0.2, module version =3D 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 20=
15
> [  2462.089] (II) LoadModule: "nvidia"
> [  2462.090] (II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_dr=
v.so
> [  2462.091] (II) Module nvidia: vendor=3D"NVIDIA Corporation"
> [  2462.091]     compiled for 4.0.2, module version =3D 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
>=20
> [  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.
>=20
>=20
> The error from Xorg was more than one possible primary device found, no=

> devices detected, no screens found.
>=20
> Even though I selected the primary video as the iGPU from Intel thru th=
e
> 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 intende=
d
> 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.
>=20
> Regards,
>=20
> Jeremy Cox
>=20
> On Thu, Apr 14, 2016 at 11:25 AM, Arto Pekkanen <isoa@kapsi.fi
> <mailto:isoa@kapsi.fi>> wrote:
>=20
>     When the nVidia card was attached, did kldloading i915ikms cause ke=
rnel
>     panic? Or was the problem merely X.org not detecting the intel GPU
>     device?
>=20
>     A person just before posted that their laptop with both intel and n=
Vidia
>     GPUs has kernel panic upon loading i915kms, even though the laptop =
Ivy
>     Bridge chipset should be fully supported even in 10.3 without patch=
es.
>=20
>     Summa summarum: the DRM/KMS stack seems to misbehave with nVidia GP=
Us.
>     This need to be fixed. More data required for devs.
>=20
>     If you want to help, you could run FreeBSD HEAD from a USB stick an=
d
>     test if intel is usable with nVidia attached, and if not, report PR=
 to
>     the developers so they can fix this problem.
>=20
>     On 14.04.2016 07:13, Jeremy wrote:
>     > Thanks for all of your hard work at FreeBSD. And thanks to *Masac=
hika
>     > 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=
=2E
>     >
>     > 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 th=
e 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 re=
moving 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 w=
orks like
>     > a charm.
>     >
>     > Again, thank you all for your hard work!
>     > regards,
>     >
>     > Jeremy Cox
>     > _______________________________________________
>     > freebsd-x11@freebsd.org <mailto:freebsd-x11@freebsd.org> mailing =
list
>     > https://lists.freebsd.org/mailman/listinfo/freebsd-x11
>     > To unsubscribe, send any mail to
>     "freebsd-x11-unsubscribe@freebsd.org
>     <mailto:freebsd-x11-unsubscribe@freebsd.org>"
>     >
>=20
>=20


--5axljlhRAJGmKo6iwVS2riPX8HS5v3cRd--

--LDQkMa1To37NhmpqF1iEINmQm6204bFjc
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iF4EAREIAAYFAlcWPdYACgkQTBivhqtJa26wcAD5AR/Twf4NRKwPG/9VY04PhcsR
5igO2sljHCGnlppawYgBAL3Bkue0cyphmq0FVAJsdkoeOUdtq/fQmtPx5cTAlrDM
=iWp6
-----END PGP SIGNATURE-----

--LDQkMa1To37NhmpqF1iEINmQm6204bFjc--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?57163DD6.90908>