Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#73226 - blank screen on starting (wrong videocard used)
Attached to Project:
Arch Linux
Opened by Martin Baselier (martinbaselier) - Sunday, 02 January 2022, 11:22 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Monday, 07 February 2022, 07:04 GMT
Opened by Martin Baselier (martinbaselier) - Sunday, 02 January 2022, 11:22 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Monday, 07 February 2022, 07:04 GMT
|
DetailsDescription:
I've setup my video card for pci-passtrough. I recently upgraded using a second-hand motherboard and cpu (Gigabyte B250M-D3H with i7700k (coming from gigabyte h110m-s2h with i5-6600k)). After that my system had problems starting Linux. My screen would stay blank and only if I started an arch-installer on usb and rebooted from there it would start normally. After analyzing journalctl-output I noticed vgaarb would change my boot device from the internal video-card to the one bound to vfio-pci. After that it could not load a driver and X would not start, resulting in a blank screen. This seems to be a combination a buggy motherboard-firmware and a kernel that doesn't handle it correctly. The EFI always uses the external card no matter which option is choose there. Additional info: * package version(s) kernel 5.15.12 * config and/or log files etc. this is what happens on a bad start Jan 01 20:38:10 tinpc kernel: pci 0000:00:02.0: vgaarb: setting as boot VGA device Jan 01 20:38:10 tinpc kernel: pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none Jan 01 20:38:10 tinpc kernel: pci 0000:01:00.0: vgaarb: VGA device added: decodes=io+mem,owns=none,locks=none Jan 01 20:38:10 tinpc kernel: pci 0000:00:02.0: vgaarb: no bridge control possible Jan 01 20:38:10 tinpc kernel: pci 0000:01:00.0: vgaarb: bridge control possible Jan 01 20:38:10 tinpc kernel: pci 0000:01:00.0: vgaarb: overriding boot device Jan 01 20:38:10 tinpc kernel: vgaarb: loaded Jan 01 20:38:10 tinpc kernel: vfio-pci 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=none Jan 01 20:38:10 tinpc kernel: i915 0000:00:02.0: [drm] VT-d active for gfx access Jan 01 20:38:10 tinpc kernel: i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem Jan 01 20:38:10 tinpc kernel: vfio-pci 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=none Jan 01 20:38:10 tinpc kernel: i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4) Jan 01 20:38:10 tinpc kernel: i915 0000:00:02.0: [drm] GuC firmware i915/kbl_guc_62.0.0.bin version 62.0 submission:disabled Jan 01 20:38:10 tinpc kernel: i915 0000:00:02.0: [drm] GuC SLPC: disabled Jan 01 20:38:10 tinpc kernel: i915 0000:00:02.0: [drm] HuC firmware i915/kbl_huc_4.0.0.bin version 4.0 authenticated:yes Jan 01 20:38:10 tinpc kernel: [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on minor 0 Jan 01 20:38:10 tinpc kernel: mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915]) Jan 01 20:38:10 tinpc kernel: i915 0000:00:02.0: [drm] fb1: i915drmfb frame buffer device Jan 01 20:38:10 tinpc kernel: snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915]) this is on a good start: Jan 01 20:40:40 tinpc kernel: pci 0000:00:02.0: vgaarb: setting as boot VGA device Jan 01 20:40:40 tinpc kernel: pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none Jan 01 20:40:40 tinpc kernel: pci 0000:01:00.0: vgaarb: VGA device added: decodes=io+mem,owns=none,locks=none Jan 01 20:40:40 tinpc kernel: pci 0000:00:02.0: vgaarb: no bridge control possible Jan 01 20:40:40 tinpc kernel: pci 0000:01:00.0: vgaarb: bridge control possible Jan 01 20:40:40 tinpc kernel: vgaarb: loaded Jan 01 20:40:40 tinpc kernel: vfio-pci 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=none Jan 01 20:40:40 tinpc kernel: i915 0000:00:02.0: [drm] VT-d active for gfx access Jan 01 20:40:40 tinpc kernel: fb0: switching to i915 from EFI VGA Jan 01 20:40:40 tinpc kernel: i915 0000:00:02.0: vgaarb: deactivate vga console Jan 01 20:40:40 tinpc kernel: i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem Jan 01 20:40:40 tinpc kernel: vfio-pci 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=none Jan 01 20:40:40 tinpc kernel: mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915]) Jan 01 20:40:40 tinpc kernel: i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4) Jan 01 20:40:40 tinpc kernel: i915 0000:00:02.0: [drm] GuC firmware i915/kbl_guc_62.0.0.bin version 62.0 submission:disabled Jan 01 20:40:40 tinpc kernel: i915 0000:00:02.0: [drm] GuC SLPC: disabled Jan 01 20:40:40 tinpc kernel: i915 0000:00:02.0: [drm] HuC firmware i915/kbl_huc_4.0.0.bin version 4.0 authenticated:yes Jan 01 20:40:40 tinpc kernel: [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on minor 0 Jan 01 20:40:40 tinpc kernel: fbcon: i915drmfb (fb0) is primary device Jan 01 20:40:40 tinpc kernel: i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device Jan 01 20:40:40 tinpc kernel: snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915]) So it noticed when the screen would stay blank the log says: pci 0000:01:00.0: vgaarb: overriding boot device When the system starts correctly, the log shows: fb0: switching to i915 from EFI VGA fbcon: i915drmfb (fb0) is primary device I've recompiled the kernel and changed vga_arbiter_add_pci_device in vgaarb.c to return false when "owns=none". Now Linux start fine, but I can't pass my card to my vm. * link to upstream bug report, if any This issue might be related to https://aur.archlinux.org/packages/linux-vfio/ Steps to reproduce: |
This task depends upon
Closed by Sven-Hendrik Haase (Svenstaro)
Monday, 07 February 2022, 07:04 GMT
Reason for closing: Upstream
Additional comments about closing: 2022-01-17: A task closure has been requested. Reason for request: reported upstream
Monday, 07 February 2022, 07:04 GMT
Reason for closing: Upstream
Additional comments about closing: 2022-01-17: A task closure has been requested. Reason for request: reported upstream
I've found a workaround though. I changed vgaarb.c in the following way:
I've searched for "overriding boot device"
After that I've added an if, before the vga_set_default_device. So now it reads:
if (strcmp(vga_iostate_to_str(vgadev->owns),"none")!=0)
vga_set_default_device(vgadev->pdev);
I don't really know if it's relevant that "owns=none", but I hope it is. I would mean a simple upstream-fix and me not having to compile my own kernel.
After that if I unbind the console and the efi-framebuffer, I can start my vm.
echo 0 > /sys/class/vtconsole/vtcon0/bind
echo 0 > /sys/class/vtconsole/vtcon1/bind
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind