You are not logged in.

#1 2016-01-25 22:31:12

m01
Member
Registered: 2015-06-25
Posts: 8

How to select graphics card for kernel boot messages?

Setup:

  • Arch Linux, 4.3.3-3-ARCH kernel

  • GeForce GTX 760, nvidia driver - attached to big monitor (DVI), flashed with vendor-supplied EFI GOP-compatible bios.

  • Intel i5-4570 integrated graphics, i915 driver - attached to small monitor (DVI)

  • rEFInd bootloader

  • relevant UEFI settings: Primary Graphics Adapter: Onboard, Share Memory: Auto, IGPU Multi-Monitor: Enabled, Render Standb: Enabled. CSM: Disabled.

What happens:
Whatever I do, the kernel boot messages are printed on the monitor attached to my nvidia graphics card. I however want them on the monitor attached to the integrated graphics card (see below for why). The only thing that I've found to fix this is to unplug the big monitor's DVI cable, boot, and then plug it back in.

This didn't use to be the case back in September 2015; back then, with the same UEFI config (I saved it as a "user profile"), but I guess whatever kernel etc was current then, I'd see the messages coming from the integrated-graphics chip.

Anyway - I would've thought that this should be a simple matter of adding the correct console=, or perhaps video= parameters, but I've tried console=tty0-4 or so and various video= incantations like video=card0:1280x1024.. but perhaps I just don't understand how to do it correctly.

Any ideas how I can get linux kernel to use the right graphics card?

The reason why I want the kernel boot messages to be printed by the Intel onboard graphics card is because I want to use the vfio-pci driver for the discrete graphics card, so that I can pass it through to a VM later. However, even when the /etc/modprobe.d/vfio.conf file contains my GTX760's productid and vendorid combinations, and lspci -k correctly shows that the card is using the vfio driver, the kernel messages get printed on the monitor attached to that card, and my text-based login prompt appears there, too. When I then start my windows VM using virsh, the screen just goes black, unsurprisingly (clearly linux was using it and is now getting confused, despite vfio-pci driver). Again - if I unplug the DVI cable before booting and plug it back in after the bootup sequence, all of this works great (kernel boot messages appear on the monitor attached to the onboard graphics chip, I can run X there, starting the same Windows VM results in the other monitor showing the Windows boot screens etc)...

Last edited by m01 (2016-01-25 22:36:32)

Offline

#2 2016-01-26 12:39:08

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: How to select graphics card for kernel boot messages?

Your description matches almost perfectly with what happens when the nvidia card is set in bios/uefi firmware as primary videocard.

Verify which card your firmware sets as primary one.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2016-01-26 20:51:34

m01
Member
Registered: 2015-06-25
Posts: 8

Re: How to select graphics card for kernel boot messages?

It's definitely set to "Onboard", see http://imgur.com/6lgEJtj.
I've also tried changing that setting to PCI-express, and then back again. It didn't help.

One more snippet of information: The rEFInd boot menu has always popped up on the nvidia card, even when this worked in the past. However, when pressing F2 to edit the kernel command line parameters, that editor shows on both screens, so I'm assuming both are available to linux.

Offline

#4 2016-01-28 20:19:35

m01
Member
Registered: 2015-06-25
Posts: 8

Re: How to select graphics card for kernel boot messages?

I've found a way to move the console to the other screen, using the following linux kernel command line parameter:

fbcon=map:1 

source

However, that doesn't actually fix the symptoms I was seeing with my Windows VM's GPU PCI passthrough, when leaving both monitor cables plugged in. There must be something else hanging on to my graphics card... so I'm still looking for a solution.

Last edited by m01 (2016-01-28 20:19:48)

Offline

Board footer

Powered by FluxBB