# Custom kernel missing AGP



## Beeblebrox (Mar 14, 2013)

It appears I do not have Hardware 3D acceleration by AGP enabled in my kernel. "kldstat -v" shows that these have been loaded: radeon.ko, drm.ko, agp (hostb/agp_via, hostb/agp_intel, vgapci/agp_i810, hostb/agp_amd64).
`$ dmesg | grep drm`

```
Preloaded elf obj module "/boot/kernel/drm.ko" at 0xffffffff80ec4490.
drm0: <ATI Radeon HD 4200> on vgapci0
info: [drm] MSI enabled 1 message(s)
info: [drm] Initialized radeon 1.31.0 20080613
info: [drm] Setting GART location based on new memory map
info: [drm] Loading RS780/RS880 Microcode
info: [drm] Resetting GPU
info: [drm] writeback test succeeded in 1 usecs
info: [drm] Resetting GPU
info: [drm] Loading RS780/RS880 Microcode
info: [drm] Resetting GPU
```
`$ dmesg | grep agp`
However, gives no output. src/sys/dev/agp/ lists agp_ati.c, so I think agp_ati should be included in the kldstat output if it were built. Therefore I have the modules I don't need but don't have the module I do need.

Installed video card driver is xf86-video-ati-6.14.6. glxgears runs, and /dev/dri/card0 has mode crw-rw-rw-. My src.conf has (among others) WITHOUT_MODULES "drm/i915 drm/savage drm/tdfx drm/via drm2/i915kms". KERNEL.CONF has "device  agp"

Is my debug correct in that I need agp_ati built into kernel, and if so why is ti not getting built?


----------



## kpa (Mar 14, 2013)

Is your system a PCIe or AGP based? If it's PCIe the agp(4) driver is not needed because it's used only on now old and obsolete AGP hardware.


----------



## Beeblebrox (Mar 14, 2013)

It's an on-board gpu, so not PCIe. The Radeon 4200 is a member of the R700 family, and what you are saying is that agp is not needed since it's not on the list of the agp man page.

I am certain I have a gpu acceleration problem, even if not an agp issue. So how to debug?


----------



## kpa (Mar 14, 2013)

Post the output of `$ pciconf -lv`. The onboard GPU is very likely on the PCIe bus unless something tells otherwise. Note that PCIe is both a bus and a connector type.


----------



## Beeblebrox (Mar 14, 2013)

```
hostb0@pci0:0:0:0:	class=0x060000 card=0x22561019 chip=0x96011022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD]'
    device     = 'RS880 Host Bridge'
    class      = bridge
    subclass   = HOST-PCI
    cap 08[c4] = HT slave
    cap 08[54] = HT unit ID clumping
    cap 08[40] = HT retry mode
    cap 08[9c] = HT unknown d07c
    cap 08[f8] = HT unknown e000
pcib1@pci0:0:1:0:	class=0x060400 card=0x96021022 chip=0x96021022 rev=0x00 hdr=0x01
    vendor     = 'Advanced Micro Devices [AMD]'
    device     = 'RS780/RS880 PCI to PCI bridge (int gfx)'
    class      = bridge
    subclass   = PCI-PCI
    cap 08[44] = HT MSI fixed address window enabled at 0xfee00000
    cap 0d[b0] = PCI Bridge card=0x96021022
pcib2@pci0:0:5:0:	class=0x060400 card=0x22561019 chip=0x96051022 rev=0x00 hdr=0x01
    vendor     = 'Advanced Micro Devices [AMD]'
    device     = 'RS780/RS880 PCI to PCI bridge (PCIE port 1)'
    class      = bridge
    subclass   = PCI-PCI
    cap 01[50] = powerspec 3  supports D0 D3  current D0
    cap 10[58] = PCI-Express 2 root port slot max data 128(128) link x1(x1)
                 speed 2.5(5.0)
    cap 05[a0] = MSI supports 1 message 
    cap 0d[b0] = PCI Bridge card=0x22561019
    cap 08[b8] = HT MSI fixed address window enabled at 0xfee00000
    ecap 000b[100] = Vendor 1 ID 1
    ecap 0002[110] = VC 1 max VC0
ahci0@pci0:0:17:0:	class=0x010601 card=0x43901019 chip=0x43911002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode]'
    class      = mass storage
    subclass   = SATA
    cap 01[60] = powerspec 2  supports D0 D3  current D0
    cap 12[70] = SATA Index-Data Pair
none0@pci0:0:18:0:	class=0x0c0310 card=0x22561019 chip=0x43971002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SB7x0/SB8x0/SB9x0 USB OHCI0 Controller'
    class      = serial bus
    subclass   = USB
none1@pci0:0:18:1:	class=0x0c0310 card=0x22561019 chip=0x43981002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SB7x0 USB OHCI1 Controller'
    class      = serial bus
    subclass   = USB
none2@pci0:0:18:2:	class=0x0c0320 card=0x22561019 chip=0x43961002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SB7x0/SB8x0/SB9x0 USB EHCI Controller'
    class      = serial bus
    subclass   = USB
    cap 01[c0] = powerspec 2  supports D0 D1 D2 D3  current D0
    cap 0a[e4] = EHCI Debug Port at offset 0xe0 in map 0x14
none3@pci0:0:19:0:	class=0x0c0310 card=0x22561019 chip=0x43971002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SB7x0/SB8x0/SB9x0 USB OHCI0 Controller'
    class      = serial bus
    subclass   = USB
none4@pci0:0:19:1:	class=0x0c0310 card=0x22561019 chip=0x43981002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SB7x0 USB OHCI1 Controller'
    class      = serial bus
    subclass   = USB
none5@pci0:0:19:2:	class=0x0c0320 card=0x22561019 chip=0x43961002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SB7x0/SB8x0/SB9x0 USB EHCI Controller'
    class      = serial bus
    subclass   = USB
    cap 01[c0] = powerspec 2  supports D0 D1 D2 D3  current D0
    cap 0a[e4] = EHCI Debug Port at offset 0xe0 in map 0x14
none6@pci0:0:20:0:	class=0x0c0500 card=0x22561019 chip=0x43851002 rev=0x3c hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SBx00 SMBus Controller'
    class      = serial bus
    subclass   = SMBus
    cap 08[b0] = HT MSI fixed address window disabled at 0xfee00000
atapci0@pci0:0:20:1:	class=0x01018a card=0x22561019 chip=0x439c1002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SB7x0/SB8x0/SB9x0 IDE Controller'
    class      = mass storage
    subclass   = ATA
    cap 05[70] = MSI supports 1 message 
hdac1@pci0:0:20:2:	class=0x040300 card=0x22561019 chip=0x43831002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SBx00 Azalia (Intel HDA)'
    class      = multimedia
    subclass   = HDA
    cap 01[50] = powerspec 2  supports D0 D3  current D0
isab0@pci0:0:20:3:	class=0x060100 card=0x22561019 chip=0x439d1002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SB7x0/SB8x0/SB9x0 LPC host controller'
    class      = bridge
    subclass   = PCI-ISA
pcib3@pci0:0:20:4:	class=0x060401 card=0x00000000 chip=0x43841002 rev=0x00 hdr=0x01
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SBx00 PCI to PCI Bridge'
    class      = bridge
    subclass   = PCI-PCI
none7@pci0:0:20:5:	class=0x0c0310 card=0x22561019 chip=0x43991002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SB7x0/SB8x0/SB9x0 USB OHCI2 Controller'
    class      = serial bus
    subclass   = USB
hostb1@pci0:0:24:0:	class=0x060000 card=0x00000000 chip=0x12001022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD]'
    device     = 'Family 10h Processor HyperTransport Configuration'
    class      = bridge
    subclass   = HOST-PCI
    cap 08[80] = HT host
hostb2@pci0:0:24:1:	class=0x060000 card=0x00000000 chip=0x12011022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD]'
    device     = 'Family 10h Processor Address Map'
    class      = bridge
    subclass   = HOST-PCI
hostb3@pci0:0:24:2:	class=0x060000 card=0x00000000 chip=0x12021022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD]'
    device     = 'Family 10h Processor DRAM Controller'
    class      = bridge
    subclass   = HOST-PCI
hostb4@pci0:0:24:3:	class=0x060000 card=0x00000000 chip=0x12031022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD]'
    device     = 'Family 10h Processor Miscellaneous Control'
    class      = bridge
    subclass   = HOST-PCI
    cap 0f[f0] = unknown
hostb5@pci0:0:24:4:	class=0x060000 card=0x00000000 chip=0x12041022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD]'
    device     = 'Family 10h Processor Link Control'
    class      = bridge
    subclass   = HOST-PCI
vgapci0@pci0:1:5:0:	class=0x030000 card=0x22561019 chip=0x97101002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'RS880 [Radeon HD 4200]'
    class      = display
    subclass   = VGA
    cap 01[50] = powerspec 3  supports D0 D1 D2 D3  current D0
    cap 05[a0] = MSI supports 1 message, 64 bit enabled with 1 message
hdac0@pci0:1:5:1:	class=0x040300 card=0x22561019 chip=0x970f1002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'RS880 HDMI Audio [Radeon HD 4200 Series]'
    class      = multimedia
    subclass   = HDA
    cap 01[50] = powerspec 3  supports D0 D1 D2 D3  current D0
    cap 05[a0] = MSI supports 1 message, 64 bit enabled with 1 message
alc0@pci0:2:0:0:	class=0x020000 card=0x81311019 chip=0x10631969 rev=0xc0 hdr=0x00
    vendor     = 'Atheros Communications Inc.'
    device     = 'AR8131 Gigabit Ethernet'
    class      = network
    subclass   = ethernet
    cap 01[40] = powerspec 3  supports D0 D3  current D0
    cap 05[48] = MSI supports 1 message, 64 bit enabled with 1 message
    cap 10[58] = PCI-Express 1 endpoint max data 128(4096) link x1(x1)
                 speed 2.5(2.5)
    cap 03[6c] = VPD
    ecap 0001[100] = AER 1 0 fatal 1 non-fatal 0 corrected
    ecap 0003[180] = Serial 1 ffd0b3301078d2ff
re0@pci0:3:0:0:	class=0x020000 card=0x816910ec chip=0x816910ec rev=0x10 hdr=0x00
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8169 PCI Gigabit Ethernet Controller'
    class      = network
    subclass   = ethernet
    cap 01[dc] = powerspec 2  supports D0 D1 D2 D3  current D0
```


----------



## kpa (Mar 14, 2013)

I can see only PCIe/PCI devices there, no AGP.


----------



## Beeblebrox (Mar 14, 2013)

pciconf does not, but dmidecode shows it:

```
System Slot Information
	Designation: AGP
	Type: 32-bit AGP 4x
	Current Usage: In Use
	Length: Short
	ID: 0
	Characteristics:
		3.3 V is provided
		Opening is shared
		PME signal is supported
	Bus Address: ffff:01:05.0
```


----------

