Date: Sun, 27 Jul 2014 20:32:41 +1000 From: Da Rock <freebsd-x11@herveybayaustralia.com.au> To: Roland Smith <rsmith@xs4all.nl> Cc: freebsd-x11@freebsd.org Subject: Re: Xorg, Radeon and KMS problems Message-ID: <53D4D549.2040505@herveybayaustralia.com.au> In-Reply-To: <20140726141107.GA1382@slackbox.erewhon.home> References: <53D39B39.9010407@herveybayaustralia.com.au> <20140726141107.GA1382@slackbox.erewhon.home>
next in thread | previous in thread | raw e-mail | index | archive | help
God I have some weird shit going on atm... Good to see you on this list - kinda hoping you were here :) On Sat, Jul 26, 2014 at 10:12:41PM +1000, Da Rock wrote: > Ok. First time post to this list, so be gentle > > Just trying to sort out FreeBSD 10 - still - and after numerous issues I > finally get Xorg to run, and failed. > > I have a dual card laptop (Compaq CQ62 Athlon version), with the R880M > and 6300HD video. I've always had some issues with this on previous > versions, but nothing like this - and I was hoping 10 with KMS would > resolve it once and for all > > I've built everything WITH_NEW_XORG, WITH_GALLIUM, WITH_KMS. New install > completely minty fresh 10. Tried packages, but that resulted in more > issues, so I'm bypassing that now to get to the bottom of this > particular problem. > > Running startx, I get ... nothing. Comes back with no screens found. > > Running configure, I get 5 screens in the layout - with 2 vesa devices, > 2 radeon devices (expected), and 2 fbdev devices. Try this config, I get > success; with a proviso: lxde screens look really weird. Fragmented > display, disappears until redraw or something - not what I'd call > useable. Whats worse is it degrades from there to the point where > everything but the background and active window disappears. > > Comment out the vesa devices, I get a black screen with no way back > except acpi shutdown. > > Try loading the radeonkms in the loader.conf, black screen with no way > to rectify except to use the live disk. > > I'm not 100% here, but I'm trying all my foo on this with no luck. By > rights all this should be working, right? What am I missing? I've heard > word of a newcons driver, but I'm not sure this is the core of the > 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. From 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=0x030000 card=0x1445103c chip=0x97121002 > rev=0x00 hdr=0x00 > vendor = 'Advanced Micro Devices [AMD] nee ATI' > device = 'RS880M [Mobility Radeon HD 4200 Series]' > class = display > subclass = VGA <snip> > vgapci1@pci0:2:0:0: class=0x030000 card=0x1445103c chip=0x68e41002 > rev=0x00 hdr=0x00 > vendor = 'Advanced Micro Devices [AMD] nee ATI' > device = 'Robson CE [AMD Radeon HD 6300 Series]' > class = display > subclass = VGA <snip> 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 From your dmesg, it seems that the HD 4200 is connected to the monitor; > vgapci0: <VGA-compatible display> port 0x7000-0x70ff mem > 0xd0000000-0xdfffffff,0xf1300000-0xf130ffff,0xf1200000-0xf12fffff irq 18 > 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 boot, 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 “DisplaySize width height” 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. Ok, haven't quite got it all in place yet - haven't had time to recompile Xorg yet without hal. But I have done the preliminary xorg.conf and given it a shot. It works... but I think I've made a discovery of weird proportions. Being dual card I believe Xorg is writing to both cards to one screen. It kinda makes sense with the issues I'm having; what twigged me is this weird xsreensaver effect where there are 2 screensaver programs going at once on the one screen - something that usually only happens if there are 2 screens connected like an external monitor, except there's one screensaver on each. What I reckon I need to do is to be able to take control of this process and say I want the 4200 going to the built in, and the HD to the external HDMI/VGA. Tried playing with that on 9.x but I've never been that good with Xorg and all its magic blackboxness :D Also, how does no hal work? What does that effect with regards other apps? Are you speaking of using the devd option in make config too? > 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 and it works fine. Good to know. Was wondering how that all fit... is vt tied with the graphical boot or separate altogether? 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 from my /boot/loader.conf: # Kernel modules radeonkms_load="YES" drm2_load="YES" iicbus_load="YES" iic_load="YES" iicbb_load="YES" radeonkmsfw_R520_cp_load="YES" # Use the new vt driver. kern.vty=vt N.B: Do*not* use the `radeonkmsfw_R520_cp_load="YES"` line. It's not the correct firmware for your chip! For reference my kldstat looks like this atm: Id Refs Address Size Name 1 45 0xffffffff80200000 15f0310 kernel 2 1 0xffffffff81a12000 432d4 linux.ko 3 1 0xffffffff81a56000 116c16 radeonkms.ko 4 1 0xffffffff81b6d000 47147 drm2.ko 5 4 0xffffffff81bb5000 1ccf iicbus.ko 6 1 0xffffffff81bb7000 1a2a iic.ko 7 1 0xffffffff81bb9000 1ad8 iicbb.ko 8 1 0xffffffff81bbb000 1028 radeonkmsfw_RS780_pfp.ko 9 1 0xffffffff81bbd000 5b1f radeonkmsfw_RS780_me.ko 10 1 0xffffffff81bc3000 131b radeonkmsfw_R600_rlc.ko 11 1 0xffffffff81bc5000 18a6 radeonkmsfw_CEDAR_pfp.ko 12 1 0xffffffff81bc7000 1ca1 radeonkmsfw_CEDAR_me.ko 13 1 0xffffffff81bc9000 1329 radeonkmsfw_CEDAR_rlc.ko Hope that helps clear the picture so that you can give more focused help, but I will get back probably tomorrow once Xorg is rebuilt with the results of that step. Hope this helps... Roland -- 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53D4D549.2040505>