# Kernel configuration for appropriate radiondrmfb use

## Dachnaz

I have been unable to successfully use the Radeon RV516 (X1300) video card in an Xserve I have been struggling with. I can't seem to find a driver which will function with the card.

To date, I have been able to successfully operate the system using its EFI framebuffer. However, building radeon into the kernel (and using R520_cp.bin firmware), or building radeon as a module and loading it in userspace, causes issues. When radeondrmfb tries to be the framebuffer, video stops syncing to the monitor. The system is fine, useable via ssh. The screen does not go blank, black, or to flashing cursor, but is completely frozen in place (the flashing cursor on the screen immediately before this happens is now a solid underscore). It seems as though the card cannot be talked to by the kernel, so I think I may be missing an option somewhere. It seems that in attempting to use radeondrmfb, no framebuffer gets used:

```
furious ~ # cat /proc/fb

0 EFI VGA

furious ~ # modprobe radeon

furious ~ # cat /proc/fb

furious ~ # 
```

.config is here: http://pastebin.com/pU69vckq

```
# lspci

00:00.0 Host bridge: Intel Corporation 5400 Chipset Memory Controller Hub (rev 20)

00:01.0 PCI bridge: Intel Corporation 5400 Chipset PCI Express Port 1 (rev 20)

00:03.0 PCI bridge: Intel Corporation 5400 Chipset PCI Express Port 3 (rev 20)

00:05.0 PCI bridge: Intel Corporation 5400 Chipset PCI Express Port 5 (rev 20)

00:09.0 PCI bridge: Intel Corporation 5400 Chipset PCI Express Port 9 (rev 20)

00:0f.0 System peripheral: Intel Corporation 5400 Chipset QuickData Technology Device (rev 20)

00:10.0 Host bridge: Intel Corporation 5400 Chipset FSB Registers (rev 20)

00:10.1 Host bridge: Intel Corporation 5400 Chipset FSB Registers (rev 20)

00:10.2 Host bridge: Intel Corporation 5400 Chipset FSB Registers (rev 20)

00:10.3 Host bridge: Intel Corporation 5400 Chipset FSB Registers (rev 20)

00:10.4 Host bridge: Intel Corporation 5400 Chipset FSB Registers (rev 20)

00:11.0 Host bridge: Intel Corporation 5400 Chipset CE/SF Registers (rev 20)

00:15.0 Host bridge: Intel Corporation 5400 Chipset FBD Registers (rev 20)

00:15.1 Host bridge: Intel Corporation 5400 Chipset FBD Registers (rev 20)

00:16.0 Host bridge: Intel Corporation 5400 Chipset FBD Registers (rev 20)

00:16.1 Host bridge: Intel Corporation 5400 Chipset FBD Registers (rev 20)

00:1b.0 Audio device: Intel Corporation 631xESB/632xESB High Definition Audio Controller (rev 09)

00:1c.0 PCI bridge: Intel Corporation 631xESB/632xESB/3100 Chipset PCI Express Root Port 1 (rev 09)

00:1d.0 USB controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #1 (rev 09)

00:1d.1 USB controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #2 (rev 09)

00:1d.2 USB controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #3 (rev 09)

00:1d.3 USB controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #4 (rev 09)

00:1d.7 USB controller: Intel Corporation 631xESB/632xESB/3100 Chipset EHCI USB2 Controller (rev 09)

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d9)

00:1f.0 ISA bridge: Intel Corporation 631xESB/632xESB/3100 Chipset LPC Interface Controller (rev 09)

00:1f.1 IDE interface: Intel Corporation 631xESB/632xESB IDE Controller (rev 09)

00:1f.2 SATA controller: Intel Corporation 631xESB/632xESB SATA AHCI Controller (rev 09)

00:1f.3 SMBus: Intel Corporation 631xESB/632xESB/3100 Chipset SMBus Controller (rev 09)

01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RV516 [Radeon X1300/X1550 Series]

04:00.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Upstream Port (rev 01)

04:00.3 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express to PCI-X Bridge (rev 01)

05:00.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Downstream Port E1 (rev 01)

05:01.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Downstream Port E2 (rev 01)

05:02.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Downstream Port E3 (rev 01)

06:00.0 PCI bridge: Texas Instruments XIO2213A/B/XIO2221 PCI Express to PCI Bridge [Cheetah Express]

07:00.0 FireWire (IEEE 1394): Texas Instruments XIO2213A/B/XIO2221 IEEE-1394b OHCI Controller [Cheetah Express]

09:00.0 Ethernet controller: Intel Corporation 80003ES2LAN Gigabit Ethernet Controller (Copper) (rev 01)

09:00.1 Ethernet controller: Intel Corporation 80003ES2LAN Gigabit Ethernet Controller (Copper) (rev 01)

09:00.2 IDE interface: Intel Corporation 631xESB/632xESB IDE Redirection (rev 01)

09:00.4 IPMI SMIC interface: Intel Corporation 631xESB/632xESB IPMI/KCS0 (rev 01)

09:00.7 IPMI SMIC interface: Intel Corporation 631xESB/632xESB BT (rev 01)

0b:00.0 PCI bridge: Intel Corporation 6702PXH PCI Express-to-PCI Bridge A (rev 09)

0c:02.0 SCSI storage controller: LSI Logic / Symbios Logic SAS1064 PCI-X Fusion-MPT SAS (rev 03)
```

Following modprobe radeon, here's the dmesg output:

```
[  395.094680] [drm] Initialized drm 1.1.0 20060810

[  395.124588] [drm] radeon kernel modesetting enabled.

[  395.124665] checking generic (80010000 500000) vs hw (80000000 10000000)

[  395.124666] fb: conflicting fb hw usage radeondrmfb vs EFI VGA - removing generic driver

[  395.124743] Console: switching to colour dummy device 80x25

[  395.125471] [drm] initializing kernel modesetting (RV515 0x1002:0x7187 0x1002:0x7187).

[  395.125492] [drm] register mmio base: 0x90B20000

[  395.125493] [drm] register mmio size: 65536

[  395.125569] radeon 0000:01:00.0: Invalid ROM contents

[  395.152088] [drm] Not an x86 BIOS ROM, not using.

[  395.152091] radeon 0000:01:00.0: Fatal error during GPU init

[  395.152094] [drm] radeon: finishing device.

[  395.152095] [TTM] Memory type 2 has not been initialized

[  395.152099] [drm] radeon: cp finalized

[  395.152315] radeon: probe of 0000:01:00.0 failed with error -22
```

I'm going to keep thinking about these dmesg data, but in the meantime suggestions are greatly appreciated!

Cheers,

Dachnaz

----------

## eyoung100

```
01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RV516 [Radeon X1300/X1550 Series]
```

leads me to this Gentoo Wiki: Radeon.  Follow the Wiki to double check the kernel settings, and remove the EFI fb, then set the VIDEO_CARDS to radeon, and the INPUT_DEVICES to evdev.

----------

## Dachnaz

That wiki page has done me a whole lot of no good, unfortunately.

Removing EFI FB support just stops me from ever getting a console on the attached monitor. efifb stops just fine when radeondrmfb starts, so there really isn't any danger there.

VIDEO_CARDS is already set to radeon. I added a line with INPUT_DEVICES="evdev", though this won't affect the behavior of the radeon module.

With a little digging, I found this: https://help.ubuntu.com/community/MacBookPro8-2/Raring ; I might not be on a macbook, but the problems are similar. The issue seems to be that the Radeon drivers, be they module or built-in, expect to pull information from the BIOS. What seems to be the best workaround for my situation is to boot via EFI stub and not through GRUB2. However, I have not ever been able to boot via EFI stub using rEFInd. No matter what I've tried (as far as kernel options go; I've basically left in all EFI support in my kernels), the kernel never gets loaded and the system hangs at a screen telling me what kernel options rEFInd is attempting to boot with. Perhaps I'm missing some kernel options along these lines?

----------

## eyoung100

That explains this:

```
[drm] Not an x86 BIOS ROM, not using. 
```

I don't have an EFI system, so rEFInd is beyond my expertise, but let me poke around, and see what I can find.

----------

## Dachnaz

Just this morning I found a couple more resources which may help:

https://bugs.freedesktop.org/show_bug.cgi?id=26891  -- This issue with Mac Radeons looking for non-existent BIOS ROMs after EFI boot is known. It just isn't well-explored, and since nobody really uses Xserves, well... Anyhow, I'll take a look into this hacky workaround today.

http://www.rodsbooks.com/ubuntu-efi/ -- More tips and links to even more resources regarding EFI booting Linux on Apples. Apple's firmware does not play nice with anything.

EDIT: http://kingeve.com/wordpress/?p=1519 -- Specific documentation for Radeon on a macbook pro. I'm going to take full advantage of this when I convince my school to switch to Linux from OS X... 

I will report back to identify anything that helped or solved the issue!

----------

## VoidMage

A minor note: FB_EFI shouldn't be a problem here - I've got no problems with it on with integrated intel .

----------

## Dachnaz

Sigh. I also tried this: https://help.ubuntu.com/community/UEFIBooting

I booted using fakebios, dumped the vbios and booted with that. No change to the dmesg output after modprobe radeon bricks the display. Same with modprobe radeon after booting with fakebios. I'm stumped!

----------

## Dachnaz

The issue is that the radeon driver cannot pull information about the video card (memory size and physical address, clock speeds, etc) from the BIOS because there is no BIOS on an Xserve. Apple's EFI firmware does not support BIOS emulation, so fakebios doesn't work either. I may be able to harvest the appropriate information if I can get the kernel to boot in EFI stub mode directly from rEFInd, but so far I have been unable to EFI stub boot at all. I may have to try using a dummy initrd, but I do not know if this is the case.

This is to the point where it is an entirely academic pursuit. I should be able to set up a way to ssh -X without the video card being needed at all, right?

----------

