8

I have an HP DL380G9 server with two discreet nvidia graphics card installed running RHEL 6 with Kernel 2.6.32-573. Both cards have the same chipset (NV117) but different models. K620 (Slot 5 address 88:00.0), K2200 (Slot 4 address 84:00.0). The K2200 is the selected card for Linux to output plymouth and boot messages.

Swapping the cards results in the HP Server BIOS hitting a page fault, even after clearing CMOS and BIOS settings. Swapping the cards back fixes the issue. There is no option in the BIOS to select a primary discreet graphics card. Linux appears to select the graphics card with the lowest PCI Bus Address.

Is there a kernel command line option or some other configuration file to select a different graphics card for the default pre-X11 display?

pacmanwa
  • 359
  • 4
  • 16

3 Answers3

4

I finally found this is done with a kernel feature called vga arbiter. Whichever VGA adapter is used as primary by the BIOS ends up being flagged a the "bootvga" device. Its possible to force vga arbiter to select and use the next vga adapter by using the stub driver for the undesired VGA adapter. Retrieve the pci device id using lspci -nn | grep VGA
Add this parameter to your kernel command line pci-stub.ids=0000:0000

When I move to RHEL 7, I'll be doing pci passthrough with this disabled adapter. Remember Nvidia graphics cards also include an audio device and end up in the same IOMMU group as the VGA device. Both pci device ids will need to be stubbed.

pacmanwa
  • 359
  • 4
  • 16
1

If you have nothing against a framebuffer console, see Documentation/fb/fbcon.txt

You probably have to add this to the linux kernel command line:

fbcon=map:1
xhienne
  • 17,075
  • 2
  • 52
  • 68
  • This does not appear to work. I do have `nomodeset` as a kernel argument. I also only appear to have a single framebuffer device as `ls /dev/fb*` only returns /dev/fb0 – pacmanwa Jan 10 '17 at 16:29
  • @pacmanwa Same goes for `/proc/fb` I suppose. Sorry to read that. Unfortunately, that was my only idea. – xhienne Jan 10 '17 at 16:32
1

I had a weird situation with a client where the server they purchased had poorly written efi drivers and the onboard vga port output a very garbled console. I tried all sorts of remedies, and settled on using a GPU for video out. Pci-stub does not, unfortunately, force the frame buffer to no longer use the onboard chip - it just replaces it with EFI VGA:

cat /proc/fb
0 EFI VGA
1 nouveaufb

In order to force video to the nouveaufb, you need to disable the efifb AND stub the onboard device. Append to grub (use your device ID in place of mine):

pci-stub.ids=8086:0412 video=efifb:off

Mkconfig your grub file

grub2-mkconfig -o /etc/grub2-efi.cfg

and presto! Your video console is now outputting to nouveau:

cat /proc/fb
0 nouveaufb
AdminBee
  • 21,637
  • 21
  • 47
  • 71
leorio_san
  • 11
  • 1