From owner-freebsd-x11@FreeBSD.ORG Sat Jul 26 14:11:19 2014 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19E4BE85 for ; Sat, 26 Jul 2014 14:11:19 +0000 (UTC) Received: from smtp-vbr6.xs4all.nl (smtp-vbr6.xs4all.nl [194.109.24.26]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C16FE2FAC for ; Sat, 26 Jul 2014 14:11:18 +0000 (UTC) Received: from slackbox.erewhon.home (slackbox.xs4all.nl [83.162.243.5]) by smtp-vbr6.xs4all.nl (8.13.8/8.13.8) with ESMTP id s6QEB7iM091896; Sat, 26 Jul 2014 16:11:08 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.erewhon.home (Postfix, from userid 1001) id 9761112487; Sat, 26 Jul 2014 16:11:07 +0200 (CEST) Date: Sat, 26 Jul 2014 16:11:07 +0200 From: Roland Smith To: Da Rock Subject: Re: Xorg, Radeon and KMS problems Message-ID: <20140726141107.GA1382@slackbox.erewhon.home> References: <53D39B39.9010407@herveybayaustralia.com.au> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FL5UXtIhxfXey3p5" Content-Disposition: inline In-Reply-To: <53D39B39.9010407@herveybayaustralia.com.au> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.23 (2014-03-12) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: freebsd-x11@freebsd.org X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jul 2014 14:11:19 -0000 --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 26, 2014 at 10:12:41PM +1000, Da Rock wrote: > Ok. First time post to this list, so be gentle :) >=20 > Just trying to sort out FreeBSD 10 - still - and after numerous issues I= =20 > finally get Xorg to run, and failed. >=20 > I have a dual card laptop (Compaq CQ62 Athlon version), with the R880M=20 > and 6300HD video. I've always had some issues with this on previous=20 > versions, but nothing like this - and I was hoping 10 with KMS would=20 > resolve it once and for all :( >=20 > I've built everything WITH_NEW_XORG, WITH_GALLIUM, WITH_KMS. New install= =20 > completely minty fresh 10. Tried packages, but that resulted in more=20 > issues, so I'm bypassing that now to get to the bottom of this=20 > particular problem. >=20 > Running startx, I get ... nothing. Comes back with no screens found. >=20 > Running configure, I get 5 screens in the layout - with 2 vesa devices,= =20 > 2 radeon devices (expected), and 2 fbdev devices. Try this config, I get= =20 > success; with a proviso: lxde screens look really weird. Fragmented=20 > display, disappears until redraw or something - not what I'd call=20 > useable. Whats worse is it degrades from there to the point where=20 > everything but the background and active window disappears. >=20 > Comment out the vesa devices, I get a black screen with no way back=20 > except acpi shutdown. >=20 > Try loading the radeonkms in the loader.conf, black screen with no way=20 > to rectify except to use the live disk. >=20 > I'm not 100% here, but I'm trying all my foo on this with no luck. By=20 > rights all this should be working, right? What am I missing? I've heard= =20 > word of a newcons driver, but I'm not sure this is the core of the=20 > problem or even helpful. What do I need to do to resolve this? The main problem seems to be that X cannot find a screen. And the RADEON driver doesn't show up in the Xorg log. I think the root cause is that the system doesn't know which one to choose. =46rom the Xorg log: > [ 206.973] (!!) More than one possible primary device found What I would try is build Xorg without HAL, and add Option "AutoAddDevices" "off" to the ServerLayout section of your Xorg.conf. Add two Device sections to your Xorg.conf using the data from pciconf; > vgapci0@pci0:1:5:0: class=3D0x030000 card=3D0x1445103c chip=3D0x971210= 02=20 > rev=3D0x00 hdr=3D0x00 > vendor =3D 'Advanced Micro Devices [AMD] nee ATI' > device =3D 'RS880M [Mobility Radeon HD 4200 Series]' > class =3D display > subclass =3D VGA > vgapci1@pci0:2:0:0: class=3D0x030000 card=3D0x1445103c chip=3D0x68e410= 02=20 > rev=3D0x00 hdr=3D0x00 > vendor =3D 'Advanced Micro Devices [AMD] nee ATI' > device =3D 'Robson CE [AMD Radeon HD 6300 Series]' > class =3D display > subclass =3D VGA Section "Device" Identifier "Card0" Driver "radeon" BoardName "Radeon HD 4200" BusID "PCI:1:5:0" EndSection Section "Device" Identifier "Card1" Driver "radeon" BoardName "Radeon HD 6300" BusID "PCI:2:0:0" EndSection =46rom your dmesg, it seems that the HD 4200 is connected to the monitor; > vgapci0: port 0x7000-0x70ff mem=20 > 0xd0000000-0xdfffffff,0xf1300000-0xf130ffff,0xf1200000-0xf12fffff irq 18= =20 > at device 5.0 on pci1 > vgapci0: Boot video device Then write a Screen section containing one of the monitors. Most listing for the CQ62 list it as using a HD 4200, and it seems to be the one used at boo= t, so I'd try that first. Section "Monitor0" VendorName "built-in" Identifier "Monitor0" EndSection If you know the pysical size of the monitor, add a =E2=80=9CDisplaySize wi= dth height=E2=80=9D line to the Monitor0 section. That will help calculate the horizontal and vertical pitch. Section "Screen" Identifier "Screen0" Device "Card0" Monitor "Monitor0" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1366 x 768" EndSubSection EndSection Xorg will load the necessary modules when it starts. > dmesg: > Copyright (c) 1992-2014 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights reserved. > FreeBSD is a registered trademark of The FreeBSD Foundation. > FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 > root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 You cannot use the new vt(4) driver on 10.0-RELEASE. It is only available on 10-STABLE. This means that you cannot switch from X back to the sc console. That is not supported with kernel modesetting. You will either have to do without or upgrade to 10-STABLE. I'm on r269090 using a Radeon X 1650 Pro a= nd it works fine. After upgrading to 10-STABLE, use kldstat to see which modules are loaded by Xorg, and add them to /boot/loader.conf. Then you can enable vt. An excerpt =66rom my /boot/loader.conf: # Kernel modules radeonkms_load=3D"YES" drm2_load=3D"YES" iicbus_load=3D"YES" iic_load=3D"YES" iicbb_load=3D"YES" radeonkmsfw_R520_cp_load=3D"YES" # Use the new vt driver. kern.vty=3Dvt N.B: Do *not* use the `radeonkmsfw_R520_cp_load=3D"YES"` line. It's not the correct firmware for your chip! Hope this helps... Roland --=20 R.F.Smith http://rsmith.home.xs4all.nl/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 5753 3324 1661 B0FE 8D93 FCED 40F6 D5DC A38A 33E0 (keyID: A38A33E0) --FL5UXtIhxfXey3p5 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJT07b7AAoJEED21dyjijPgqC0QALt61IxhVNF6da68tM9EXFmY Ek7Xg1GGZn3qzUiCkIkO+sZYU6dB5lU6ObCMJfX1grSwLdPzjlXz5S6cfeJkHFSy zYk3Gq4mMGLVgpuQuhrHQ/Xi7Z4VQGfgRdE3SvabzYxO0pHbYhXw+bHG5bYoxGN1 /GfTkKdjrXdOKZuzNbvK535HbBjwtkYpTJ95MSltnGjlz7ybI9g/kLZFXSF/Qp20 pup+eWD6Ej1b18q6bDtJiZ81xYfoUih1VVG49umG58NaPLSK+P5aQV+U8xfmiTPD b9iZShlXLWyn2iSGySgh7vlliQHsl35ELnk9ANsbNSaTacO95yrrWSlgOt3uwcRc DLT6nuR4IDk9arEJ84A2I0ANkiGFp3QLUTCpf073mwyXA1fXijtV9NzLZgLS2ZEL 8VyOBqPjEevvgRd8CbK2XIH8KgzSHABKpOeqq4zZ9hddQFE4Fvhad40d7AZBSWNA XaBdlumrhzmBvRijmxpwsz9tneOR5q/eh3fZp/4/JqEzQZbaauQoX4guAtVd+9aA 2SRSpkEJJ26++6/yobU2E+/ss68U15XHbO62bEd8JNPws725MHLpSlu4hTt1SUtU ybTxmZC1aUR+68I0JWxjtVdMv2Y6qDERucj5ns+nh/8teRAf11LiIssXbc3b9YF7 SUC8VOs5EK+aj5sZSINI =4hJe -----END PGP SIGNATURE----- --FL5UXtIhxfXey3p5--