# Framebuffer issues with ASUS Prime B560-Plus and iGPU without CSM on 12.3 & 13 [Bug: 260735]



## Nemo1024 (Nov 25, 2021)

I have been using FreeBSD since v9 for a ZFS-based home NAS, gradually upgrading the system to v12.2 on the same hardware.
The time has come to build a new system for the NAS and the choice fell on ASUS Prime B560-Plus motherboard (https://www.asus.com/Motherboards-Components/Motherboards/PRIME/PRIME-B560-PLUS/) and a i3-10100 CPU with iGPU graphics (no discreet video card) and 32GB of RAM.

I decided to do a complete fresh install using FreeBSD 13, but that attempt was cut short as it was not possible to boot from the installation media. the boot process would halt right after displaying the framebuffer information, as described in this thread: https://forums.freebsd.org/threads/...find-etc-hostid-cant-find-boot-entropy.82968/ I tried both `FreeBSD-13.0-RELEASE-amd64-memstick.img` and `FreeBSD-13.0-STABLE-amd64-20211118-3a15ccadf87-248076-memstick.img` with the same result.

Next I tried to launch my existing 12.2 system from the SSD. To my surprise, it booted, but the network interface was not present (only `lo0`). Booting from `FreeBSD-12.2-RELEASE-amd64-memstick.img` gave the same result. `pciconf -lv` shows several Intel devices as `none`, including (retyping from the screen manually on another computer):

    none5@pci0:0:31:6: class 0x020000 card=0x86721043 chip=0x15fa8086 rev=0x11 hdr=0x00
    vendor= 'Intel Corporation'
    device = 'Ethernet Connection (14) I219-V'
    class= network
    subclass=ethernet

Other "none's" are three serial busses, a "simple comms" and "memory"

I thought that the upcoming 12.3 release would have a wider driver set for the newer hardware, so I tried booting from `FreeBSD-12.3-RC2-amd64-memstick.img`. This gave a different problem, similar to the one with v13: after the framebuffer info, the screen cleared and it looked like the system continued to boot but without displaying any text on the screen, only the cursor in the upper left corner, and some time later, a mouse pointer in the middle of the screen. 12.3-RC1 has the same issue.

(At this point I am ready to give up on FreeBSD and try installing Ubuntu with ZFS. Hopefully I would be able to import the existing pool, or, failing that, to rebuild it from backup.)


----------



## Nemo1024 (Nov 25, 2021)

Update: 
I plugged in an NVidia GT710 that I had lying around and disabled iGPU. This also allowed me to enable the CSM (Compatibility Support Module) which was greyed out in the BIOS without a discreet video card.
This allowed me to boot 13.0-STABLE past the EFI framebuffer information screen. (With CSM disabled 13 still hangs after the framebuffer screen even with a discrete video card.)
On the upside, I could see the output of `pciconf` and confirm that v13 supports TigerLake, including the above-mentioned Ethernet device.
Now, what to do: install v13 using CSM (non-UEFI) mode with 80x25 text screen (I anyway do most of the management remotely through SSH after the initial install) or to try Ubuntu and see how it plays with ZFS? What is putting me off is the need to use a discreet video card for v13 to boot.


----------



## shkhln (Nov 25, 2021)

Are there any questions? "Should I try Ubuntu?" is not really a support level problem.


----------



## Nemo1024 (Nov 25, 2021)

Questions:
Has anyone else experienced said problems on the above-mentioned motheboard with the iGPU? Are there work-arounds in v13 (while still keeping to iGPU)? Maybe there is some BIOS/UEFI setting that I overlook?
Basically, my posts is a log of two evenings worth of trying to install FreeBSD 13 on a new build with investigations that might be helpful to the devs. I can do additional tests, if that would help.

PS: It seems the bug reported here is not entirely fixed: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209821


----------



## Alain De Vos (Nov 25, 2021)

Why not try a legacy boot ?


----------



## Nemo1024 (Nov 25, 2021)

For that I must have a discreet GPU installed on the system. With iGPU only, legacy boot is disabled in the BIOS. I described this situation in the second post. That GT710 which I used in the test will be used in another build, and I really don't want to buy another videocard just to be able to boot a headless server.


----------



## covacat (Nov 26, 2021)

if you don't mind a frankensteined version pull if_em.ko from 12.2-STABLE and use it on 12.2-RELEASE
build a kernel without device em and use the module pulled from stable
it has a pretty good chance to work


----------



## Nemo1024 (Nov 26, 2021)

Did you mean a 12.3-STABLE - that's the only v12 that I can find in the snapshots? That would seem like an interesting approach to keep using 12.2 for a little while longer
I tried now booting into a 12.3-RC2 memstick image with CSM enabled on a discreet GPU and the network interface was recognised.

I am inclined to stick with FreeBSD for my ZFS needs  If all else fails, I'll go for v13 with an NVidia GT710 GPU, CSM mode and 80x25 text resolution. It's a pity the framebuffer issue is present in both 13-RELEASE and 13-STABLE, and hopefully it will get fixed by 13.1


----------



## covacat (Nov 26, 2021)

sorry, I meant 12-STABLE (stable has no minor version)
so on 12.2-RELEASE build a kernel without device em
use that kernel with the if_em.ko from 12-STABLE (maybe 12.3-RC) will do


----------



## Nemo1024 (Dec 4, 2021)

An update on what I ended up doing.

I installed the system from `FreeBSD-13.0-STABLE-amd64-20211125-354988ca3f9-248228-memstick` as 13.0-RELEASE does neither have support for the "Ethernet Connection (14) I219-V" adapter, and "frankenbuilding" 12.2/3 didn't feel appealing. The installation was done in CSM mode with a discrete NVidia card. After all was set up, I mounted the EFI partition and copied `/boot/loader.efi` to `/EFI/BOOT/BOOTx64.efi` there, thereby making the system bootable both in CSM and EFI modes.

After that I shut down the system and removed the NVidia card from it. Thus the next boot presented only the EFI boot option (remember, CSM is disabled by Intel in iGPU mode). After the FreeBSD boot screen, the system displayed the framebuffer information and froze all output to the screen, while silently continuing with the boot process. After a few second I could SSH into the system. That is actually the setup that I can live with - the server is going to be headless with SSH access. If I, for some reason, would need to see output on the screen in the future, I will have to re-insert a video card and re-enable CSM in the BIOS. But, hopefully, FreeBSD devs will solve this bug by 13.1.

Here are two screenshots (literally) of the boot process. The first one with the garbled screen is the output from NVidia card if I boot in EFI mode. The second, with the frozen framebuffer info is from booting into EFI without the NVidia adapter. In both cases, no messages output can be seen on the screen past this point.

One caveat with installing from 13.0-STABLE may be a future problem with doing a point upgrade to 13.1 using freebsd-update, but I'll cross that bridge when I come to it.


----------



## Ozric (Dec 5, 2021)

I am having the exact same issue on a new build with an Asus Business Motherboard Pro H510M C-CSM. 13.0-RELEASE stops at framebuffer information and 12.2-RELEASE does not have the ethernet driver.

I am holding off on installation until 12.3-RELEASE, which should come out tomorrow I think. From my testing it should have the ethernet driver for i219.


----------



## Nemo1024 (Dec 5, 2021)

Ozric said:


> I am having the exact same issue on a new build with an Asus Business Motherboard Pro H510M C-CSM. 13.0-RELEASE stops at framebuffer information and 12.2-RELEASE does not have the ethernet driver.
> 
> I am holding off on installation until 12.3-RELEASE, which should come out tomorrow I think. From my testing it should have the ethernet driver for i219.


Please tell how it goes with the RELEASE verson. In my tests 12.3-RC2 had the same framebuffer problem as in 13. And yes, 12.3-RC2 had the support for i219.


----------



## Ozric (Dec 8, 2021)

Nemo1024 said:


> Please tell how it goes with the RELEASE verson. In my tests 12.3-RC2 had the same framebuffer problem as in 13. And yes, 12.3-RC2 had the support for i219.


I can confirm that 12.3-RELEASE boots and works on my Asus H510M motherboard.


----------



## grahamperrin@ (Dec 27, 2021)

> … If anyone encounters a similar issue in the future please submit a new PR with details.



– <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209821#c59>

Nemo1024 please, can you make the required new bug report?

If not, I can do so on your behalf, for example:

{snip}


----------



## Nemo1024 (Dec 27, 2021)

grahamperrin said:


> – <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209821#c59>
> 
> Nemo1024 please, can you make the required new bug report?
> 
> ...


If you could do that, please. I am not in the FreeBSD Bugzulla system and I'll probably muck something up trying to submit a bug report.


----------



## grahamperrin@ (Dec 27, 2021)

FreeBSD bug 260735 – Video/graphics: no visible progress beyond EFI framebuffer information (non-related to the 2M staging copy bug)

Nemo1024 for discoverability, you might like to edit the title of this topic to include _260735_

Thanks


----------



## Nemo1024 (Dec 27, 2021)

grahamperrin said:


> FreeBSD bug 260735 – 1b33aa1f5f99e1270d526ffa5b652250ec80a7ef (amd64 UEFI loader: stop copying staging area to 2M physical) maybe not effective in some cases
> 
> Nemo1024 for discoverability, you might like to edit the title of this topic to include _260735_
> 
> Thanks


Thank you! Title updated.


----------



## grahamperrin@ (Jan 9, 2022)

Nemo1024 above and in Bugzilla, I edited the summary line. Also in Bugzilla:

de-linking
version changed to 13.0-RELEASE
If I understand correctly, symptoms in 12.⋯ are of separate issues.

No need to reply unless I have things wrong.


----------



## grahamperrin@ (May 29, 2022)

Nemo1024 please: any different with 13.1-RELEASE?

(Maybe with an updated loader present in the EFI system partition …)


----------

