# [FreeBSD-11.0] change default boot video device



## arabesc (Oct 12, 2016)

There are two video adapters in my system:


```
# pciconf -lvbce
...
vgapci0@pci0:0:2:0:   class=0x030000 card=0x040a1849 chip=0x040a8086 rev=0x06 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Xeon E3-1200 v3 Processor Integrated Graphics Controller'
    class      = display
    subclass   = VGA
    bar   [10] = type Memory, range 64, base 0xf6400000, size 4194304, enabled
    bar   [18] = type Prefetchable Memory, range 64, base 0xe0000000, size 268435456, enabled
    bar   [20] = type I/O Port, range 32, base 0xf000, size 64, enabled
    cap 05[90] = MSI supports 1 message
    cap 01[d0] = powerspec 2  supports D0 D3  current D0
    cap 13[a4] = PCI Advanced Features: FLR TP
...
vgapci1@pci0:12:0:0:   class=0x030000 card=0x20001849 chip=0x20001a03 rev=0x21 hdr=0x00
    vendor     = 'ASPEED Technology, Inc.'
    device     = 'ASPEED Graphics Family'
    class      = display
    subclass   = VGA
    bar   [10] = type Memory, range 32, base 0xf5000000, size 16777216, enabled
    bar   [14] = type Memory, range 32, base 0xf6000000, size 131072, enabled
    bar   [18] = type I/O Port, range 32, base 0xb000, size 128, enabled
    cap 01[40] = powerspec 3  supports D0 D1 D2 D3  current D0
```

The system uses the first (vgapci0) video adapter when it boots:


```
# dmesg | grep vgapci
vgapci0: <VGA-compatible display> port 0xf000-0xf03f mem 0xf6400000-0xf67fffff,0xe0000000-0xefffffff irq 16 at device 2.0 on pci0
vgapci0: Boot video device
vgapci1: <VGA-compatible display> port 0xb000-0xb07f mem 0xf5000000-0xf5ffffff,0xf6000000-0xf601ffff irq 19 at device 0.0 on pci11
```

But I would like to make it use the second one (vgapci1).
How can I achieve this?


----------



## T-Daemon (Oct 12, 2016)

If you are not planning to use both GPU's after booting the operating system, one option would be to disable
the integrated one from BIOS. If you are planning to use them both most BIOS’s permit to set the use order
of the graphic cards, like primary/secondary.


----------



## arabesc (Oct 12, 2016)

T-Daemon said:


> If you are not planning to use both GPU's after booting the operating system, one option would be to disable
> the integrated one from BIOS.


I'm planning to use both GPU's.



T-Daemon said:


> If you are planning to use them both most BIOS’s permit to set the use order
> of the graphic cards, like primary/secondary.


There is an option in the BIOS that sounds like that but it doesn't change the order of the vgapci devices. vgapci0 is always the boot video device and it is always 'Xeon E3-1200 v3 Processor Integrated Graphics Controller'.
So, is there some solution on the OS side?


----------



## T-Daemon (Oct 13, 2016)

arabesc said:


> So, is there some solution on the OS side?


I think the "Boot video device" recognition by the operation system is obtained by the information from BIOS, somebody correct me if I’m wrong.

Unless I am terribly wrong, taking the "Aspeed Graphics" video card and Xeon CPU as basis, and looking at Aspeeds internet site, your system is no consumer product, most likely a server. Furthermore you must have two monitors attached to the system. Look in your BIOS, there must be a setting same or similar to "Init Display First", mine has "Onboard" and "PCIE x16" to choose from. In my case it’s set to PCIE x16. That should change the "Boot video device". I can not verify this on my system, I don’t have a appropriate monitor cable at hand to plug it to the onboard video card.


----------



## arabesc (Oct 13, 2016)

T-Daemon said:


> taking the "Aspeed Graphics" video card and Xeon CPU as basis, and looking at Aspeeds internet site, your system is no consumer product, most likely a server.


You are right, it's an ASRock Rack E3C226D2I server board. I use it in a home server.



T-Daemon said:


> Furthermore you must have two monitors attached to the system.


It's a headless system. I use ASPEED IPMI for remote control. And I would like to use Intel GPU as an OpenCL device. But when I enable Intel GPU I lose video stream from the ASPEED controller.



T-Daemon said:


> Look in your BIOS, there must be a setting same or similar to "Init Display First", mine has "Onboard" and "PCIE x16" to choose from.


There's such an option but it doesn't affect the selection of the "Boot video device". As I understand, the "Onboard" option is about "Aspeed Graphics" controller and the "PCIE x16" option is about external graphics card that I don't have.


----------



## T-Daemon (Oct 14, 2016)

arabesc said:


> It's a headless system. I use ASPEED IPMI for remote control. And I would like to use Intel GPU as an OpenCL device. *But when I enable Intel GPU I lose video stream from the ASPEED controller.*


Those are important information. You should have started there with the problem description.
The problem is loosing the video stream over IPMI when enabling the onboard INTEL video card. That could be a bug. Asking ASROCK‘s support might clarify the situation, unless somebody from the forum can add something to the subject.



arabesc said:


> There's such an option but it doesn't affect the selection of the "Boot video device". *As I understand, the "Onboard" option is about "Aspeed Graphics" controller and the "PCIE x16" option is about external graphics card that I don't have.*



What I ment was the “Onboard” option is about the INTEL card. I presumed there would be a configuration item in the boards BIOS to choose from between "Onboard" (INTEL) and "External" (ASPEED), to set which video card to use during the BIOS booting process (Boot video device). I wasn't aware the "ASPEED Graphics" is a integrated video card on a SoC.

So there is no setting for that card in the boards BIOS. What we have are two processors (INTEL Xeon and ASPEED), both with integrated video devices, but the board BIOS knows only about the INTEL video card. As I see it, activating the onboard INTEL video will always be the “Boot video device”, there is no other the board BIOS is aware of, unless an external card is placed in the PCIE slot. Maybe a current BIOS is able to configure the ASPEED video card in the boards BIOS. One more question for the ASROCK support.


----------



## arabesc (Oct 15, 2016)

Here is how BIOS settings page looks:





There are two items under the 'Primary Graphics Adapter' option: '_PCI Express_' and '_Onboard_'.
The '_Onboard VGA_' option enables/disables ASPEED graphics controller.
/off Have no idea why ASRock Rack has done this but if you disable 'Onboard VGA' then you will not have access to the screen output, neither from the VGA output nor via the remote connection. I've restored it just by pressing sequence of keys in the BIOS as I've remembered it :/
The '_Intel VGA Device Control_' option enables/disables Intel integrated GPU.
Changing of the '_Primary Graphics Adapter_' option doesn't have any effect on the “_Boot video device_”.


----------

