Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QubesOS 4.1 installer doesn't boot on sandy/ivy bridge (xx20/xx30) #789

Closed
tlaurion opened this issue Aug 1, 2020 · 45 comments
Closed

QubesOS 4.1 installer doesn't boot on sandy/ivy bridge (xx20/xx30) #789

tlaurion opened this issue Aug 1, 2020 · 45 comments
Assignees

Comments

@tlaurion
Copy link
Collaborator

tlaurion commented Aug 1, 2020

Booting
https://openqa.qubes-os.org/tests/10816/asset/iso/Qubes-4.1-20200726-x86_64.iso results in this even though 116787f was merged in :

signal-2020-08-01-154642

@marmarek any idea?

Originally posted by @tlaurion in #788 (comment)

@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 3, 2020

@Asiderr @osresearch @marmarek:
Trying to map relevant information to this bug and will edit this comment while I gather information from the past

@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 5, 2020

@marmarek: no-real-mode gone under xen?

@osresearch
Copy link
Collaborator

I just downloaded the Qubes 4.1 ISO and it appears to be using Xen 4.13. Grepping through the 4.13 source it appears that no-real-mode should still be valid in the early command line parser, although the main parser doesn't seem to have it:

static bool skip_realmode(const char *cmdline)
{
    return find_opt(cmdline, "no-real-mode", false) || find_opt(cmdline, "tboot=", true);
}

which is used here:

void __stdcall cmdline_parse_early(const char *cmdline, early_boot_opts_t *ebo)
{
    if ( !cmdline )
        return;

    ebo->skip_realmode = skip_realmode(cmdline);
    ebo->opt_edd = edd_parse(cmdline);
    ebo->opt_edid = edid_parse(cmdline);

#ifdef CONFIG_VIDEO
    vga_parse(cmdline, ebo);
#endif
}

This parser has moved from arch/x86/boot/cmdline.S in Xen 4.8 to cmdline.c, although it is invoked in a funny way.

The Xen code in 4.13 that does the trampoline setup has changed, so I wonder if we can retry with the ancient patch that prevents the EBDA from being consulted. From my 2016 xen-devel post:

diff --recursive -u /home/hudson/build/clean/xen-4.6.3/xen/arch/x86/boot/head.S 
./xen/arch/x86/boot/head.S
--- /home/hudson/build/clean/xen-4.6.3/xen/arch/x86/boot/head.S 2016-06-20 
08:08:22.000000000 -0400
+++ ./xen/arch/x86/boot/head.S  2016-08-03 17:56:37.511121443 -0400
@@ -86,6 +86,8 @@
         cmp     $MULTIBOOT_BOOTLOADER_MAGIC,%eax
         jne     not_multiboot
 
+#if 0
+
         /* Set up trampoline segment 64k below EBDA */
         movzwl  0x40e,%eax          /* EBDA segment */
         cmp     $0xa000,%eax        /* sanity check (high) */
@@ -108,6 +110,12 @@
         shl     $10-4,%edx
         cmp     %eax,%edx           /* compare with BDA value */
         cmovb   %edx,%eax           /* and use the smaller */
+#else
+       // coreboot does not provide an Extended BIOS Data Area pointer
+       // just stash things the Multiboot structure, adjusted to bytes
+        mov     MB_mem_lower(%ebx),%eax
+        shl     $10-4,%eax
+#endif
 
 2:      /* Reserve 64kb for the trampoline */
         sub     $0x1000,%eax

The other possibility is that something in the VGA has changed, which was the other place that I had to hack back in the distant past... I'm attempting to get Heads running in qemu again so that I can test it against the Qubes ISO.

@Asiderr
Copy link

Asiderr commented Aug 10, 2020

@osresearch @tlaurion I've built the Xen hypervisor with the patch. After the hypervisor replacement, the problem still arises. I tried to run the installation media with an older version of the hypervisor and I’ve found out that regression has appeared between 4.11 and 4.12 version.

@osresearch
Copy link
Collaborator

image

Does it only fail on real hardware? I'm running under qemu and the installer is able to boot into the graphical installer after a while, although the Xen console does not appear on the vga.

qemu command:

qemu-system-x86_64 \
  -cpu Haswell-noTSX-IBRS,vmx=on  \
  -M q35,accel=kvm \
  -m 4G \
  --serial /dev/tty \
  --bios build/qemu-coreboot/coreboot.rom \
  -cdrom /tmp/media/hudson/build/qubes/Qubes-4.1-20200726-x86_64.iso

Once Heads is booted, these commands to kexec into the Qubes installer:

insmod /lib/modules/libata.ko 
insmod /lib/modules/libahci.ko 
insmod /lib/modules/ahci.ko
mount -o ro /dev/sr0 /boot
kexec -l /boot/images/pxeboot/xen.gz \
  --command-line "no-real-mode console=vga vga=current" \
  --module /boot/images/pxeboot/vmlinuz \
  --module /boot/images/pxeboot/initrd.img

(You can use console=com1 for xen and it will provide more feedback in this case, although that is probably not an option on the x230 or other systems)

@Asiderr
Copy link

Asiderr commented Aug 24, 2020

@osresearch @tlaurion

Does it only fail on real hardware?

I'm using x230.

I've bisected Xen from the 4.11 to 4.13 version and
I found out that problems start with:

xen-project/xen@dcf4179

This is the first commit where Qubes OS doesn't boot properly. The Qubes
kernel cannot find the LUKS UUID and boot ends in the emergency mode.
The colorful artifacts appear in this commit:

xen-project/xen@07c181c

I've started the thread in the xen-devel ml:

https://markmail.org/message/2owv3q2nmhvg52zs

@ghost
Copy link

ghost commented Aug 27, 2020

Has anyone tried to use builds from here?
https://gist.github.com/marmarek/f0e225b593650212108f1ea6974f5914

@tlaurion
Copy link
Collaborator Author

@0rb677

https://openqa.qubes-os.org/tests/10816/asset/iso/Qubes-4.1-20200726-x86_64.iso

Those are built by openqa, qubesos QA platform. I didnt built myself but if bug is upstream in Xen and non patched by @marmarek in QubesOS, I do not see the point building from scratch.

Should I see something different?

@tlaurion
Copy link
Collaborator Author

tlaurion commented Sep 13, 2020

@Asiderr

xen-project/xen@dcf4179

This is the first commit where Qubes OS doesn't boot properly. The Qubes kernel cannot find the LUKS UUID and boot ends in the emergency mode.

This in linked to #749 (Resulting QubesOS installation has a LUKS v.2 header that Heads cannot pplay with) and is not related to Xen not being able to boot installer with "no-real-mode" on real hardware.

Were you able to boot the installer?

@marmarek
Copy link
Contributor

marmarek commented Oct 1, 2020

I tried to boot installed 4.0 system with replaced Xen to Xen 4.14 built directly from stable-4.14 branch and it worked, so there is hope.
Next I'll try with recent installation image and compare results.

@MrChromebox
Copy link
Contributor

no issues booting Qubes-R4.1.0-alpha20201014pre1-x86_64.iso on Librem 13v2/4, Mini, or L1UM

@tlaurion
Copy link
Collaborator Author

tlaurion commented Oct 24, 2020

Downloading https://mirrors.edge.kernel.org/qubes/iso/Qubes-R4.1.0-alpha20201014-x86_64.iso
Next step is #749 to have Heads support LUKS2

tlaurion added a commit to tlaurion/heads that referenced this issue Oct 26, 2020
…de of coreboot in attempt to resolve linuxboot#789 (glitches with repeated patterns all over the screen where FB is not being reinitialized by linux kernel)
tlaurion added a commit to tlaurion/heads that referenced this issue Oct 26, 2020
…the source of the gfx corryption is linked to the linux kernel, since librems don't seem to have issue linuxboot#789. Innocent copy of librem_mini kernel first, then will customize to add sdcard reader required modules and remove unused modules and compare to x230 kernel config of 4.x
@tlaurion
Copy link
Collaborator Author

With newer iso, same behavior as #789 (comment) is observed.
Tried to bring back coreboot native gfx init with tlaurion@945196c but it just added more corruption.

Trying to migrate kernel to have newer i915 support with tlaurion@bafaecb

tlaurion added a commit to tlaurion/heads that referenced this issue Oct 27, 2020
…at to ease understanding of configuration changes..... I think i'm actually against storing in savedefconfig format for both linux config and coreboot configs, since it complexifies understanding of board differences.

Still trying to figure out linuxboot#789
@tlaurion
Copy link
Collaborator Author

tlaurion commented Nov 3, 2020

No success on my side for the moment. @jans23?

tlaurion added a commit to tlaurion/heads that referenced this issue Dec 11, 2020
…boards (coreboot 4.8.1 boards first)

xx20-maximized boards: deactivation of NKSTORAGECLI (Fix linuxboot#926 while permitting support of newer OSes linuxboot#789 which requires cryptsetup2 (linuxboot#876)
@tlaurion
Copy link
Collaborator Author

Newer Xen version might fix the issue (coming next week). Crossing fingers, Xen 4.14 :)

tlaurion added a commit to tlaurion/heads that referenced this issue Dec 11, 2020
…boards (coreboot 4.8.1 boards first)

xx20-maximized boards: deactivation of NKSTORAGECLI (Fix linuxboot#926 while permitting support of newer OSes linuxboot#789 which requires cryptsetup2 (linuxboot#876)
x230-nkstorecli board removal: was already not having dropbear, e1000e. Was a testboard to test compilation of nkstorecli. Integrated under xx30-maximized boards.
@tlaurion
Copy link
Collaborator Author

tlaurion commented Feb 4, 2021

@tlaurion tlaurion closed this as completed Feb 4, 2021
@tlaurion
Copy link
Collaborator Author

tlaurion commented Feb 4, 2021

Requires #876 to install. Proven to work also.

@Asiderr
Copy link

Asiderr commented Apr 19, 2021

@tlaurion Problem still occurs on the x230. Tested with current master (BOARD=x230) and Qubes R4.1 - 20210117.

@qubicrm
Copy link

qubicrm commented Apr 24, 2021

@tlaurion @marmarek

there is some improvement... I think.
Using Qubes R4.1-20210424, x230, heads-maximized rom (I think this issue did not exist with plain x230, but not sure).

NOTE: My heads rom throws a message that may be related:


i915 0000:00:02.0: Invalid PCI ROM header signature expecting 0xaa55, got 0x230c
[drm] Failed to find VBIOS tables (VBT)


but it works perfectly with qubes 4.04

I made a regular USB-device with dd as usual, because the iso in a ext4 partition method is not possible due to lack public key for verification. (I also think that is not relevant)

same initial screen, but after a while it continues

then it shows this error trace:


? add_wait_quewe_exclusive +0x70/0x70
ilk_crtc_enable+0x220/0x350 [i915]
intel_enable_crtc+0x53/0x60 [i915]
intel_commit_modeset_enables+0x53/0x80 [i915]
intel_atomic_commit_tail+0x1fe/0x5f0 [i915]
intel_atomic_commit+0x333/0x3b0 [i915]
drm_client_modeset_commit_atomic+0x1fc/0x240 [drm]
drm_client_modeset_commit_locked+0x53/0x80 [drm]
drm_client_modeset_commit+0x24/0x40 [drm]
drm_fb_helper_set_par+0xa5/0xd0 [drm_kms_helper]
intel_fbdev_set_par+0x16/0x60 [i915]
? con_is_visible+0x27/0x40
fbcon_init+0x2b3/0x570
visual_init+0xce/0x130
do_bind_con_driver.isra.0+0x1db/0x2e0
do_take_over_console+0x36/0x40
do_fbcon_takeover+0x5c/+0xc0
do_register_framebuffer+0x1e8/0x2f0
register_framebuffer+0x1e/0x40
__drm_fb_helper_initial_config_and_unlock+0x8e/0xc0 [drm_kms_helper]
intel_fbdev_initial_config+0x14/0x30 [i915]
async_run_entry_fn+0x39/0x160
process_one_work+0x1b6/0x350
worker_thread+0x4c/0x310
? process_one_work+0x350/0x350
kthread+0x11b/0x140
? __kthread_bind_mask+0x60/0x60
ret_from_fork+0x22/0x30
---[end trace b21f3588297b9341 ]---
[drm:drm_atomic_helper_wait_for_flip_done [drm_kms_helper]] ERROR [CRTC:45:pipe A] flip_done timed out
Console: switching to clour frame buffer device 170x84
[drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] ERROR [CRTC:45:pipe A] flip_done timed out
[drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] ERROR [CONNECTOR:76:LVDS-1] flip_done timed out
[drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] ERROR [PLANE:31:primary A] flip_done timed out
[drm:drm_atomic_helper_wait_for_flip_done [drm_kms_helper]] ERROR [CRTC:45:pipe A] flip_done timed out
[***] A start job is running for udev Wait for Complete Device Initialization


and after another (long) while


Starting Installer, one moment...
anaconda 32.24.5-3.fc32 for Qubes OS 20210424 (pre-release) started
(...)
[drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] ERROR [CRTC:45:pipe A] flip_done timed out
[drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] ERROR [CONNECTOR:76:LVDS-1] flip_done timed out
18:40:17 X startup failed, aborting installation
The instalation cannot continue and the system will be rebooted
Press ENTER to continue
[drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] ERROR [PLANE:31:primary A] flip_done timed out
[drm:drm_atomic_helper_wait_for_flip_done [drm_kms_helper]] ERROR [CRTC:45:pipe A] flip_done timed out


Posting this here only to give feedback, although I am not sure this is the right place (maybe Qubes github?), but I feel this maybe usefull.

If you fell this info is not relevant, feel free to remove it. Just want to help

Regards

@tlaurion
Copy link
Collaborator Author

There is no CircleCI build because older then 30 days.

user@x230-master:~/heads$ git fetch osresearch
user@x230-master:~/heads$ git checkout osresearch/master
user@x230-master:~/heads$ git reset --hard
user@x230-master:~/heads$ make BOARD=x230-hotp-maximized CPUS=2
2021-04-25 11:22:59-04:00 DONE coreboot
"/home/user/heads/build/coreboot-4.8.1/x230-hotp-maximized/cbfstool" "/home/user/heads/build/coreboot-4.8.1/x230-hotp-maximized/coreboot.rom" print
Name                           Offset     Type           Size   Comp
cbfs master header             0x0        cbfs header        32 none
fallback/romstage              0x80       stage           84772 none
cpu_microcode_blob.bin         0x14c40    microcode       25600 none
fallback/ramstage              0x1b0c0    stage           81106 none
config                         0x2ee00    raw               746 none
revision                       0x2f140    raw               582 none
cmos_layout.bin                0x2f3c0    cmos_layout      1804 none
fallback/dsdt.aml              0x2fb40    raw             13646 none
fallback/payload               0x33100    simple elf    7130564 none
(empty)                        0x6fff00   null          4585688 none
bootblock                      0xb5f800   bootblock        1968 none
2021-04-25 11:22:59-04:00 INSTALL   build/coreboot-4.8.1/x230-hotp-maximized/coreboot.rom => build/x230-hotp-maximized/heads-x230-hotp-maximized-v0.2.0-1034-gc3b0bd6.rom
0b6af0f57644acf012ee1d848d08ba17dc632aabd8d98e34c86c7ce9d2a4c4ce  build/x230-hotp-maximized/heads-x230-hotp-maximized-v0.2.0-1034-gc3b0bd6.rom
2021-04-25 11:22:59-04:00 DD 8MB build/x230-hotp-maximized/heads-x230-hotp-maximized-v0.2.0-1034-gc3b0bd6-bottom.rom
4e29e6e8d9faca67dca4150d422d26a1e5c0479c7fc237765ce1e9652aefe46f  /home/user/heads/build/x230-hotp-maximized/heads-x230-hotp-maximized-v0.2.0-1034-gc3b0bd6-bottom.rom
2021-04-25 11:22:59-04:00 DD 4MB build/x230-hotp-maximized/heads-x230-hotp-maximized-v0.2.0-1034-gc3b0bd6-top.rom
2eefe417bd76ec7d96f8ef757183713836c3d0428c24242104459e9845d60ffd  /home/user/heads/build/x230-hotp-maximized/heads-x230-hotp-maximized-v0.2.0-1034-gc3b0bd6-top.rom
4b3be2b552ab6b60df7291bfbd819d9b92f88641662472e0ebd8ca7fc27a4c63  /home/user/heads/build/gawk-4.2.1/gawk

Flashing build/x230-hotp-maximized/heads-x230-hotp-maximized-v0.2.0-1034-gc3b0bd6.rom internally

@tlaurion
Copy link
Collaborator Author

tlaurion commented Apr 25, 2021

Just to make sure I haven't corrupted blobs from past tests:

user@x230-master:~/heads$ cd blobs/xx30/
user@x230-master:~/heads/blobs/xx30$ ./download_clean_me.sh 
user@x230-master:~/heads/blobs/xx30$ cd -
user@x230-master:~/heads$ user@x230-master:~/heads$ make BOARD=x230-hotp-maximized CPUS=2

2021-04-25 11:30:39-04:00 DONE coreboot
"/home/user/heads/build/coreboot-4.8.1/x230-hotp-maximized/cbfstool" "/home/user/heads/build/coreboot-4.8.1/x230-hotp-maximized/coreboot.rom" print
Name                           Offset     Type           Size   Comp
cbfs master header             0x0        cbfs header        32 none
fallback/romstage              0x80       stage           84772 none
cpu_microcode_blob.bin         0x14c40    microcode       25600 none
fallback/ramstage              0x1b0c0    stage           81106 none
config                         0x2ee00    raw               746 none
revision                       0x2f140    raw               582 none
cmos_layout.bin                0x2f3c0    cmos_layout      1804 none
fallback/dsdt.aml              0x2fb40    raw             13646 none
fallback/payload               0x33100    simple elf    7130564 none
(empty)                        0x6fff00   null          4585688 none
bootblock                      0xb5f800   bootblock        1968 none
2021-04-25 11:30:39-04:00 INSTALL   build/coreboot-4.8.1/x230-hotp-maximized/coreboot.rom => build/x230-hotp-maximized/heads-x230-hotp-maximized-v0.2.0-1034-gc3b0bd6.rom
124b2e6e49eb892e8d52e98d03b454782aaf7de25508238d8d09ccbeaf890bdd  build/x230-hotp-maximized/heads-x230-hotp-maximized-v0.2.0-1034-gc3b0bd6.rom
2021-04-25 11:30:39-04:00 DD 8MB build/x230-hotp-maximized/heads-x230-hotp-maximized-v0.2.0-1034-gc3b0bd6-bottom.rom
7497f926718968d104994235229c4c7fc6d55cb0de8e3d2b2da9778934c5ea0f  /home/user/heads/build/x230-hotp-maximized/heads-x230-hotp-maximized-v0.2.0-1034-gc3b0bd6-bottom.rom
2021-04-25 11:30:39-04:00 DD 4MB build/x230-hotp-maximized/heads-x230-hotp-maximized-v0.2.0-1034-gc3b0bd6-top.rom
2eefe417bd76ec7d96f8ef757183713836c3d0428c24242104459e9845d60ffd  /home/user/heads/build/x230-hotp-maximized/heads-x230-hotp-maximized-v0.2.0-1034-gc3b0bd6-top.rom
4b3be2b552ab6b60df7291bfbd819d9b92f88641662472e0ebd8ca7fc27a4c63  /home/user/heads/build/gawk-4.2.1/gawk

Prior:
0b6af0f57644acf012ee1d848d08ba17dc632aabd8d98e34c86c7ce9d2a4c4ce build/x230-hotp-maximized/heads-x230-hotp-maximized-v0.2.0-1034-gc3b0bd6.rom
Now:
124b2e6e49eb892e8d52e98d03b454782aaf7de25508238d8d09ccbeaf890bdd build/x230-hotp-maximized/heads-x230-hotp-maximized-v0.2.0-1034-gc3b0bd6.rom

@tlaurion
Copy link
Collaborator Author

After importing public key in firmware and booting from USB (Options, USB boot, choosing QubesOS Install option)

  • I get screen corruption as before until QubesOS is kexec'ed
  • Typing Escape key gives some console output (will dig into that)
  • Waiting minutes with cursor on top left of the screen....
  • Then turns into 3 dots.... Then in recovery (Installation media searches from a framebuffer that it cannot find)

@tlaurion
Copy link
Collaborator Author

Same error reported by @qubicrm from i915 and drm_fb_helper

@tlaurion
Copy link
Collaborator Author

tlaurion commented Apr 25, 2021

https://bugzilla.redhat.com/show_bug.cgi?id=1792515
Not resolved.

https://gist.github.com/i0z0m/17b01ebe9a50db5c122edf06e892cdb6
Comments the issue in details... without proper fix in trials...

Looking and testing.

Let's remember that Heads always kexec the OS kernel by passing the additional following arguments to kexec when booting Xen:

	if [ "$kexectype" = "xen" ]; then
			# always use xen with custom arguments
			kexeccmd="$kexeccmd -l $filepath"
			kexeccmd="$kexeccmd --command-line \"$restval no-real-mode reboot=no vga=current\""
		elif [ "$kexectype" = "multiboot" ]; then
			kexeccmd="$kexeccmd -l $filepath"
			kexeccmd="$kexeccmd --command-line \"$restval\""
		else
			kexeccmd="$kexeccmd -l $filepath"
		fi

here:

  • Reusing vga initialized kernel driver and drm driver, created fb context, to be reinitialized by the kexec'ed kernel (vga=current)
  • no-real-mode is passed to Xen

Let's also remember that coreboot passes some arguments to Heads linux payload at boot and that additional, defined kernel arguments are defined under board config, which are passed to OS kernel at boot


Attempts:

1- Rebuilding with newer 5.10 kernel inside of Heads.

@Tonux599
Copy link
Contributor

My terminology might be off here. But couldn't we just avoid using modesetting modules? So remove i915 and have just the native graphics used. It wouldn't look as nice but we can set a close resolution with vga= in the kernel parameters. This way whatever graphics modules are used by targeted systems would not be interfered by heads.

@tlaurion
Copy link
Collaborator Author

tlaurion commented Apr 25, 2021

@Tonux599 : I can revisit this. But the reasoning behind this is the usage of FBWhiptail vs Whiptail(console based) UX requirements behind gui-init usage under heads, which passed vga=current to QubesOS without issues before.

If we do not have i915 and DRM defined, then FB is not initialized and whiptail codepath will pick on console based menus. That is not so bad for Heads. If no FB is initialized, we go into Whiptail mode, not FBWhiptail.

For what interests us here (QubesOS install), not having a FB defined is the reason why QubesOS installer fails under KGPE-D16 server if not activating VNC installer, since QubesOS have not implemented terminal based installer, and requires a working FB there.

From what I understand that is happening here under QubesOS 4.1 installer is exactly that now; no initialized FB so the Installer fails to switch to the graphical installer. The other KGPE-D16 server board just doesn't use neither FBWhiptail nor Whiptail and uses generic-init. Where KGPE-D16 workstation uses FBWhiptail with graphical cards supported in kernel, permitting QubesOS installer to boot.

This explains why QubesOS 4.1 booted successfully on KGPE-D16 workstation as reported here.

So basically, this doesn't seem to be a Xen problem as before anymore, but being platform specific with graphical cards init being in the way of success.

My terminology might be off here. But couldn't we just avoid using modesetting modules? So remove i915 and have just the native graphics used. It wouldn't look as nice but we can set a close resolution with vga= in the kernel parameters. This way whatever graphics modules are used by targeted systems would not be interfered by heads.

So sure all xx20 and xx30 and older librem owners would want to retrograde into console Whiptail. A bit more understanding of what is happening into i915+drm seems to be the way here.

@Tonux599
Copy link
Contributor

Tonux599 commented Apr 25, 2021

I would have to investigate more but from past experiences booting from Grub into, say debian, with nomodeset still allows for for X (along with gnome, xfce etc.) to still display graphics. Usually at a super low resolution but that can be fixed with vga=.

Unless the driver (i915, nouveau etc.) is still being used to allow that functionality.

Edit: my thinking being why wouldn't FBWhiptail work in the same way

@tlaurion
Copy link
Collaborator Author

@Tonux599 agreed, but then all the previous:

Let's remember that Heads always kexec the OS kernel by passing the additional following arguments to kexec when booting Xen:

	if [ "$kexectype" = "xen" ]; then
			# always use xen with custom arguments
			kexeccmd="$kexeccmd -l $filepath"
			kexeccmd="$kexeccmd --command-line \"$restval no-real-mode reboot=no vga=current\""
		elif [ "$kexectype" = "multiboot" ]; then
			kexeccmd="$kexeccmd -l $filepath"
			kexeccmd="$kexeccmd --command-line \"$restval\""
		else
			kexeccmd="$kexeccmd -l $filepath"
		fi

here:

  • Reusing vga initialized kernel driver and drm driver, created fb context, to be reinitialized by the kexec'ed kernel (vga=current)
  • no-real-mode is passed to Xen

Let's also remember that coreboot passes some arguments to Heads linux payload at boot and that additional, defined kernel arguments are defined under board config, which are passed to OS kernel at boot

Would not apply.
I tried removing vga=current above without success, tried adding multiple fixes suggested upstream....

@tlaurion
Copy link
Collaborator Author

Closest to this issue found: https://gitlab.freedesktop.org/drm/intel/-/issues/2414

@tlaurion
Copy link
Collaborator Author

@tlaurion
Copy link
Collaborator Author

So from my understanding of what is happening here, the timeout is happening while attempting to set the fb on non-existing output devices.

tried:

  • upgrae to other board used 5.x kernel. Still there.
  • reviewed code change regarding drm-kms_helper and i915 in 5.11.17. Nothing there.

Will try:

  • disabling LVDS-1, see if error is similar.

@tlaurion
Copy link
Collaborator Author

tlaurion commented Apr 28, 2021

@tlaurion
Copy link
Collaborator Author

tlaurion commented Apr 28, 2021

@Tonux599 : the problem here with kexec is that it is expected that the heads kernel already initialized the FB which is supposed to be reused. When there is difference between initialized FB, there is flickering. As shown here, when heads tries to boot xen, it passes vga=current to the kexec'ed kernel.

My intuition here is that the kernel drivers for drm, drm_kms_helper and or i915 are the culprits in QubesOS 4.1. There is probably a workaround that can be pushed in KERNEL_ADD board configurations for sandy/ivy bridges.

i915

[user@dom0 ~]$ sudo modinfo i915
filename:       /lib/modules/5.11.8-1.fc25.qubes.x86_64/kernel/drivers/gpu/drm/i915/i915.ko
license:        GPL and additional rights
description:    Intel Graphics
author:         Intel Corporation
author:         Tungsten Graphics, Inc.
firmware:       i915/skl_huc_2.0.0.bin
firmware:       i915/skl_guc_49.0.1.bin
firmware:       i915/bxt_huc_2.0.0.bin
firmware:       i915/bxt_guc_49.0.1.bin
firmware:       i915/kbl_huc_4.0.0.bin
firmware:       i915/kbl_guc_49.0.1.bin
firmware:       i915/glk_huc_4.0.0.bin
firmware:       i915/glk_guc_49.0.1.bin
firmware:       i915/kbl_huc_4.0.0.bin
firmware:       i915/kbl_guc_49.0.1.bin
firmware:       i915/kbl_huc_4.0.0.bin
firmware:       i915/kbl_guc_49.0.1.bin
firmware:       i915/cml_huc_4.0.0.bin
firmware:       i915/cml_guc_49.0.1.bin
firmware:       i915/icl_huc_9.0.0.bin
firmware:       i915/icl_guc_49.0.1.bin
firmware:       i915/ehl_huc_9.0.0.bin
firmware:       i915/ehl_guc_49.0.1.bin
firmware:       i915/ehl_huc_9.0.0.bin
firmware:       i915/ehl_guc_49.0.1.bin
firmware:       i915/tgl_huc_7.5.0.bin
firmware:       i915/tgl_guc_49.0.1.bin
firmware:       i915/tgl_huc_7.5.0.bin
firmware:       i915/tgl_guc_49.0.1.bin
firmware:       i915/bxt_dmc_ver1_07.bin
firmware:       i915/skl_dmc_ver1_27.bin
firmware:       i915/kbl_dmc_ver1_04.bin
firmware:       i915/glk_dmc_ver1_04.bin
firmware:       i915/cnl_dmc_ver1_07.bin
firmware:       i915/icl_dmc_ver1_09.bin
firmware:       i915/tgl_dmc_ver2_08.bin
firmware:       i915/rkl_dmc_ver2_02.bin
firmware:       i915/dg1_dmc_ver2_02.bin
alias:          pci:v00008086d00004C9Asv*sd*bc03sc*i*
alias:          pci:v00008086d00004C90sv*sd*bc03sc*i*
alias:          pci:v00008086d00004C8Csv*sd*bc03sc*i*
alias:          pci:v00008086d00004C8Bsv*sd*bc03sc*i*
alias:          pci:v00008086d00004C8Asv*sd*bc03sc*i*
alias:          pci:v00008086d00004C80sv*sd*bc03sc*i*
alias:          pci:v00008086d00009AF8sv*sd*bc03sc*i*
alias:          pci:v00008086d00009AD9sv*sd*bc03sc*i*
alias:          pci:v00008086d00009AC9sv*sd*bc03sc*i*
alias:          pci:v00008086d00009AC0sv*sd*bc03sc*i*
alias:          pci:v00008086d00009A78sv*sd*bc03sc*i*
alias:          pci:v00008086d00009A59sv*sd*bc03sc*i*
alias:          pci:v00008086d00009A49sv*sd*bc03sc*i*
alias:          pci:v00008086d00009A40sv*sd*bc03sc*i*
alias:          pci:v00008086d00009A70sv*sd*bc03sc*i*
alias:          pci:v00008086d00009A68sv*sd*bc03sc*i*
alias:          pci:v00008086d00009A60sv*sd*bc03sc*i*
alias:          pci:v00008086d00004E71sv*sd*bc03sc*i*
alias:          pci:v00008086d00004E61sv*sd*bc03sc*i*
alias:          pci:v00008086d00004E57sv*sd*bc03sc*i*
alias:          pci:v00008086d00004E55sv*sd*bc03sc*i*
alias:          pci:v00008086d00004E51sv*sd*bc03sc*i*
alias:          pci:v00008086d00004571sv*sd*bc03sc*i*
alias:          pci:v00008086d00004557sv*sd*bc03sc*i*
alias:          pci:v00008086d00004555sv*sd*bc03sc*i*
alias:          pci:v00008086d00004551sv*sd*bc03sc*i*
alias:          pci:v00008086d00004541sv*sd*bc03sc*i*
alias:          pci:v00008086d00008A5Dsv*sd*bc03sc*i*
alias:          pci:v00008086d00008A51sv*sd*bc03sc*i*
alias:          pci:v00008086d00008A71sv*sd*bc03sc*i*
alias:          pci:v00008086d00008A70sv*sd*bc03sc*i*
alias:          pci:v00008086d00008A5Csv*sd*bc03sc*i*
alias:          pci:v00008086d00008A5Bsv*sd*bc03sc*i*
alias:          pci:v00008086d00008A5Asv*sd*bc03sc*i*
alias:          pci:v00008086d00008A59sv*sd*bc03sc*i*
alias:          pci:v00008086d00008A58sv*sd*bc03sc*i*
alias:          pci:v00008086d00008A57sv*sd*bc03sc*i*
alias:          pci:v00008086d00008A56sv*sd*bc03sc*i*
alias:          pci:v00008086d00008A54sv*sd*bc03sc*i*
alias:          pci:v00008086d00008A53sv*sd*bc03sc*i*
alias:          pci:v00008086d00008A52sv*sd*bc03sc*i*
alias:          pci:v00008086d00008A50sv*sd*bc03sc*i*
alias:          pci:v00008086d00005A5Asv*sd*bc03sc*i*
alias:          pci:v00008086d00005A59sv*sd*bc03sc*i*
alias:          pci:v00008086d00005A52sv*sd*bc03sc*i*
alias:          pci:v00008086d00005A51sv*sd*bc03sc*i*
alias:          pci:v00008086d00005A50sv*sd*bc03sc*i*
alias:          pci:v00008086d00005A4Asv*sd*bc03sc*i*
alias:          pci:v00008086d00005A49sv*sd*bc03sc*i*
alias:          pci:v00008086d00005A42sv*sd*bc03sc*i*
alias:          pci:v00008086d00005A41sv*sd*bc03sc*i*
alias:          pci:v00008086d00005A40sv*sd*bc03sc*i*
alias:          pci:v00008086d00005A5Csv*sd*bc03sc*i*
alias:          pci:v00008086d00005A54sv*sd*bc03sc*i*
alias:          pci:v00008086d00005A4Csv*sd*bc03sc*i*
alias:          pci:v00008086d00005A44sv*sd*bc03sc*i*
alias:          pci:v00008086d00009BCCsv*sd*bc03sc*i*
alias:          pci:v00008086d00009BCAsv*sd*bc03sc*i*
alias:          pci:v00008086d00009B41sv*sd*bc03sc*i*
alias:          pci:v00008086d00009BACsv*sd*bc03sc*i*
alias:          pci:v00008086d00009BAAsv*sd*bc03sc*i*
alias:          pci:v00008086d00009B21sv*sd*bc03sc*i*
alias:          pci:v00008086d00009BF6sv*sd*bc03sc*i*
alias:          pci:v00008086d00009BE6sv*sd*bc03sc*i*
alias:          pci:v00008086d00009BC8sv*sd*bc03sc*i*
alias:          pci:v00008086d00009BC6sv*sd*bc03sc*i*
alias:          pci:v00008086d00009BC5sv*sd*bc03sc*i*
alias:          pci:v00008086d00009BC4sv*sd*bc03sc*i*
alias:          pci:v00008086d00009BC2sv*sd*bc03sc*i*
alias:          pci:v00008086d00009BA8sv*sd*bc03sc*i*
alias:          pci:v00008086d00009BA5sv*sd*bc03sc*i*
alias:          pci:v00008086d00009BA4sv*sd*bc03sc*i*
alias:          pci:v00008086d00009BA2sv*sd*bc03sc*i*
alias:          pci:v00008086d00003EA2sv*sd*bc03sc*i*
alias:          pci:v00008086d000087CAsv*sd*bc03sc*i*
alias:          pci:v00008086d00003EA3sv*sd*bc03sc*i*
alias:          pci:v00008086d00003EA0sv*sd*bc03sc*i*
alias:          pci:v00008086d00003EA4sv*sd*bc03sc*i*
alias:          pci:v00008086d00003EA1sv*sd*bc03sc*i*
alias:          pci:v00008086d00003EA8sv*sd*bc03sc*i*
alias:          pci:v00008086d00003EA7sv*sd*bc03sc*i*
alias:          pci:v00008086d00003EA6sv*sd*bc03sc*i*
alias:          pci:v00008086d00003EA5sv*sd*bc03sc*i*
alias:          pci:v00008086d00003EA9sv*sd*bc03sc*i*
alias:          pci:v00008086d00003E9Bsv*sd*bc03sc*i*
alias:          pci:v00008086d00003E94sv*sd*bc03sc*i*
alias:          pci:v00008086d00003E9Csv*sd*bc03sc*i*
alias:          pci:v00008086d00003E9Asv*sd*bc03sc*i*
alias:          pci:v00008086d00003E98sv*sd*bc03sc*i*
alias:          pci:v00008086d00003E96sv*sd*bc03sc*i*
alias:          pci:v00008086d00003E92sv*sd*bc03sc*i*
alias:          pci:v00008086d00003E91sv*sd*bc03sc*i*
alias:          pci:v00008086d00003E99sv*sd*bc03sc*i*
alias:          pci:v00008086d00003E93sv*sd*bc03sc*i*
alias:          pci:v00008086d00003E90sv*sd*bc03sc*i*
alias:          pci:v00008086d000087C0sv*sd*bc03sc*i*
alias:          pci:v00008086d0000591Csv*sd*bc03sc*i*
alias:          pci:v00008086d0000593Bsv*sd*bc03sc*i*
alias:          pci:v00008086d00005927sv*sd*bc03sc*i*
alias:          pci:v00008086d00005923sv*sd*bc03sc*i*
alias:          pci:v00008086d00005926sv*sd*bc03sc*i*
alias:          pci:v00008086d0000591Dsv*sd*bc03sc*i*
alias:          pci:v00008086d0000591Bsv*sd*bc03sc*i*
alias:          pci:v00008086d0000591Asv*sd*bc03sc*i*
alias:          pci:v00008086d00005917sv*sd*bc03sc*i*
alias:          pci:v00008086d00005912sv*sd*bc03sc*i*
alias:          pci:v00008086d0000591Esv*sd*bc03sc*i*
alias:          pci:v00008086d00005921sv*sd*bc03sc*i*
alias:          pci:v00008086d00005916sv*sd*bc03sc*i*
alias:          pci:v00008086d0000590Bsv*sd*bc03sc*i*
alias:          pci:v00008086d0000590Asv*sd*bc03sc*i*
alias:          pci:v00008086d00005908sv*sd*bc03sc*i*
alias:          pci:v00008086d00005902sv*sd*bc03sc*i*
alias:          pci:v00008086d00005915sv*sd*bc03sc*i*
alias:          pci:v00008086d0000590Esv*sd*bc03sc*i*
alias:          pci:v00008086d00005913sv*sd*bc03sc*i*
alias:          pci:v00008086d00005906sv*sd*bc03sc*i*
alias:          pci:v00008086d00003185sv*sd*bc03sc*i*
alias:          pci:v00008086d00003184sv*sd*bc03sc*i*
alias:          pci:v00008086d00005A85sv*sd*bc03sc*i*
alias:          pci:v00008086d00005A84sv*sd*bc03sc*i*
alias:          pci:v00008086d00001A85sv*sd*bc03sc*i*
alias:          pci:v00008086d00001A84sv*sd*bc03sc*i*
alias:          pci:v00008086d00000A84sv*sd*bc03sc*i*
alias:          pci:v00008086d0000193Dsv*sd*bc03sc*i*
alias:          pci:v00008086d0000193Bsv*sd*bc03sc*i*
alias:          pci:v00008086d0000193Asv*sd*bc03sc*i*
alias:          pci:v00008086d00001932sv*sd*bc03sc*i*
alias:          pci:v00008086d0000192Dsv*sd*bc03sc*i*
alias:          pci:v00008086d0000192Bsv*sd*bc03sc*i*
alias:          pci:v00008086d0000192Asv*sd*bc03sc*i*
alias:          pci:v00008086d00001927sv*sd*bc03sc*i*
alias:          pci:v00008086d00001926sv*sd*bc03sc*i*
alias:          pci:v00008086d00001923sv*sd*bc03sc*i*
alias:          pci:v00008086d0000191Dsv*sd*bc03sc*i*
alias:          pci:v00008086d0000191Bsv*sd*bc03sc*i*
alias:          pci:v00008086d0000191Asv*sd*bc03sc*i*
alias:          pci:v00008086d00001912sv*sd*bc03sc*i*
alias:          pci:v00008086d0000191Esv*sd*bc03sc*i*
alias:          pci:v00008086d00001921sv*sd*bc03sc*i*
alias:          pci:v00008086d00001916sv*sd*bc03sc*i*
alias:          pci:v00008086d00001917sv*sd*bc03sc*i*
alias:          pci:v00008086d0000190Bsv*sd*bc03sc*i*
alias:          pci:v00008086d0000190Asv*sd*bc03sc*i*
alias:          pci:v00008086d00001902sv*sd*bc03sc*i*
alias:          pci:v00008086d00001915sv*sd*bc03sc*i*
alias:          pci:v00008086d0000190Esv*sd*bc03sc*i*
alias:          pci:v00008086d00001913sv*sd*bc03sc*i*
alias:          pci:v00008086d00001906sv*sd*bc03sc*i*
alias:          pci:v00008086d000022B3sv*sd*bc03sc*i*
alias:          pci:v00008086d000022B2sv*sd*bc03sc*i*
alias:          pci:v00008086d000022B1sv*sd*bc03sc*i*
alias:          pci:v00008086d000022B0sv*sd*bc03sc*i*
alias:          pci:v00008086d0000163Dsv*sd*bc03sc*i*
alias:          pci:v00008086d0000163Asv*sd*bc03sc*i*
alias:          pci:v00008086d00001632sv*sd*bc03sc*i*
alias:          pci:v00008086d0000163Esv*sd*bc03sc*i*
alias:          pci:v00008086d0000163Bsv*sd*bc03sc*i*
alias:          pci:v00008086d00001636sv*sd*bc03sc*i*
alias:          pci:v00008086d0000162Dsv*sd*bc03sc*i*
alias:          pci:v00008086d0000162Asv*sd*bc03sc*i*
alias:          pci:v00008086d00001622sv*sd*bc03sc*i*
alias:          pci:v00008086d0000162Esv*sd*bc03sc*i*
alias:          pci:v00008086d0000162Bsv*sd*bc03sc*i*
alias:          pci:v00008086d00001626sv*sd*bc03sc*i*
alias:          pci:v00008086d0000161Dsv*sd*bc03sc*i*
alias:          pci:v00008086d0000161Asv*sd*bc03sc*i*
alias:          pci:v00008086d00001612sv*sd*bc03sc*i*
alias:          pci:v00008086d0000161Esv*sd*bc03sc*i*
alias:          pci:v00008086d0000161Bsv*sd*bc03sc*i*
alias:          pci:v00008086d00001616sv*sd*bc03sc*i*
alias:          pci:v00008086d0000160Dsv*sd*bc03sc*i*
alias:          pci:v00008086d0000160Asv*sd*bc03sc*i*
alias:          pci:v00008086d00001602sv*sd*bc03sc*i*
alias:          pci:v00008086d0000160Esv*sd*bc03sc*i*
alias:          pci:v00008086d0000160Bsv*sd*bc03sc*i*
alias:          pci:v00008086d00001606sv*sd*bc03sc*i*
alias:          pci:v00008086d00000F33sv*sd*bc03sc*i*
alias:          pci:v00008086d00000F32sv*sd*bc03sc*i*
alias:          pci:v00008086d00000F31sv*sd*bc03sc*i*
alias:          pci:v00008086d00000F30sv*sd*bc03sc*i*
alias:          pci:v00008086d00000D2Esv*sd*bc03sc*i*
alias:          pci:v00008086d00000D2Bsv*sd*bc03sc*i*
alias:          pci:v00008086d00000D2Asv*sd*bc03sc*i*
alias:          pci:v00008086d00000D26sv*sd*bc03sc*i*
alias:          pci:v00008086d00000D22sv*sd*bc03sc*i*
alias:          pci:v00008086d00000C2Esv*sd*bc03sc*i*
alias:          pci:v00008086d00000C2Bsv*sd*bc03sc*i*
alias:          pci:v00008086d00000C2Asv*sd*bc03sc*i*
alias:          pci:v00008086d00000C26sv*sd*bc03sc*i*
alias:          pci:v00008086d00000C22sv*sd*bc03sc*i*
alias:          pci:v00008086d0000042Esv*sd*bc03sc*i*
alias:          pci:v00008086d0000042Bsv*sd*bc03sc*i*
alias:          pci:v00008086d0000042Asv*sd*bc03sc*i*
alias:          pci:v00008086d00000426sv*sd*bc03sc*i*
alias:          pci:v00008086d00000422sv*sd*bc03sc*i*
alias:          pci:v00008086d00000A2Esv*sd*bc03sc*i*
alias:          pci:v00008086d00000A2Bsv*sd*bc03sc*i*
alias:          pci:v00008086d00000A2Asv*sd*bc03sc*i*
alias:          pci:v00008086d00000A26sv*sd*bc03sc*i*
alias:          pci:v00008086d00000A22sv*sd*bc03sc*i*
alias:          pci:v00008086d00000D1Esv*sd*bc03sc*i*
alias:          pci:v00008086d00000D1Bsv*sd*bc03sc*i*
alias:          pci:v00008086d00000D1Asv*sd*bc03sc*i*
alias:          pci:v00008086d00000D16sv*sd*bc03sc*i*
alias:          pci:v00008086d00000D12sv*sd*bc03sc*i*
alias:          pci:v00008086d00000C1Esv*sd*bc03sc*i*
alias:          pci:v00008086d00000C1Bsv*sd*bc03sc*i*
alias:          pci:v00008086d00000C1Asv*sd*bc03sc*i*
alias:          pci:v00008086d00000C16sv*sd*bc03sc*i*
alias:          pci:v00008086d00000C12sv*sd*bc03sc*i*
alias:          pci:v00008086d0000041Esv*sd*bc03sc*i*
alias:          pci:v00008086d0000041Bsv*sd*bc03sc*i*
alias:          pci:v00008086d0000041Asv*sd*bc03sc*i*
alias:          pci:v00008086d00000416sv*sd*bc03sc*i*
alias:          pci:v00008086d00000412sv*sd*bc03sc*i*
alias:          pci:v00008086d00000A1Esv*sd*bc03sc*i*
alias:          pci:v00008086d00000A1Bsv*sd*bc03sc*i*
alias:          pci:v00008086d00000A1Asv*sd*bc03sc*i*
alias:          pci:v00008086d00000A16sv*sd*bc03sc*i*
alias:          pci:v00008086d00000A12sv*sd*bc03sc*i*
alias:          pci:v00008086d00000D0Esv*sd*bc03sc*i*
alias:          pci:v00008086d00000D0Bsv*sd*bc03sc*i*
alias:          pci:v00008086d00000D0Asv*sd*bc03sc*i*
alias:          pci:v00008086d00000D06sv*sd*bc03sc*i*
alias:          pci:v00008086d00000D02sv*sd*bc03sc*i*
alias:          pci:v00008086d00000C0Esv*sd*bc03sc*i*
alias:          pci:v00008086d00000C0Bsv*sd*bc03sc*i*
alias:          pci:v00008086d00000C0Asv*sd*bc03sc*i*
alias:          pci:v00008086d00000C06sv*sd*bc03sc*i*
alias:          pci:v00008086d00000C02sv*sd*bc03sc*i*
alias:          pci:v00008086d0000040Esv*sd*bc03sc*i*
alias:          pci:v00008086d0000040Bsv*sd*bc03sc*i*
alias:          pci:v00008086d0000040Asv*sd*bc03sc*i*
alias:          pci:v00008086d00000406sv*sd*bc03sc*i*
alias:          pci:v00008086d00000402sv*sd*bc03sc*i*
alias:          pci:v00008086d00000A0Esv*sd*bc03sc*i*
alias:          pci:v00008086d00000A0Bsv*sd*bc03sc*i*
alias:          pci:v00008086d00000A0Asv*sd*bc03sc*i*
alias:          pci:v00008086d00000A06sv*sd*bc03sc*i*
alias:          pci:v00008086d00000A02sv*sd*bc03sc*i*
alias:          pci:v00008086d0000016Asv*sd*bc03sc*i*
alias:          pci:v00008086d00000162sv*sd*bc03sc*i*
alias:          pci:v00008086d0000015Asv*sd*bc03sc*i*
alias:          pci:v00008086d00000152sv*sd*bc03sc*i*
alias:          pci:v00008086d00000166sv*sd*bc03sc*i*
alias:          pci:v00008086d00000156sv*sd*bc03sc*i*
alias:          pci:v00008086d0000016Asv0000152Dsd00008990bc03sc*i*
alias:          pci:v00008086d00000126sv*sd*bc03sc*i*
alias:          pci:v00008086d00000116sv*sd*bc03sc*i*
alias:          pci:v00008086d00000106sv*sd*bc03sc*i*
alias:          pci:v00008086d00000122sv*sd*bc03sc*i*
alias:          pci:v00008086d00000112sv*sd*bc03sc*i*
alias:          pci:v00008086d0000010Asv*sd*bc03sc*i*
alias:          pci:v00008086d00000102sv*sd*bc03sc*i*
alias:          pci:v00008086d00000046sv*sd*bc03sc*i*
alias:          pci:v00008086d00000042sv*sd*bc03sc*i*
alias:          pci:v00008086d0000A011sv*sd*bc03sc*i*
alias:          pci:v00008086d0000A001sv*sd*bc03sc*i*
alias:          pci:v00008086d00002E92sv*sd*bc03sc*i*
alias:          pci:v00008086d00002E42sv*sd*bc03sc*i*
alias:          pci:v00008086d00002E32sv*sd*bc03sc*i*
alias:          pci:v00008086d00002E22sv*sd*bc03sc*i*
alias:          pci:v00008086d00002E12sv*sd*bc03sc*i*
alias:          pci:v00008086d00002E02sv*sd*bc03sc*i*
alias:          pci:v00008086d00002A42sv*sd*bc03sc*i*
alias:          pci:v00008086d00002A12sv*sd*bc03sc*i*
alias:          pci:v00008086d00002A02sv*sd*bc03sc*i*
alias:          pci:v00008086d000029D2sv*sd*bc03sc*i*
alias:          pci:v00008086d000029C2sv*sd*bc03sc*i*
alias:          pci:v00008086d000029B2sv*sd*bc03sc*i*
alias:          pci:v00008086d000029A2sv*sd*bc03sc*i*
alias:          pci:v00008086d00002992sv*sd*bc03sc*i*
alias:          pci:v00008086d00002982sv*sd*bc03sc*i*
alias:          pci:v00008086d00002972sv*sd*bc03sc*i*
alias:          pci:v00008086d000027AEsv*sd*bc03sc*i*
alias:          pci:v00008086d000027A2sv*sd*bc03sc*i*
alias:          pci:v00008086d00002772sv*sd*bc03sc*i*
alias:          pci:v00008086d00002592sv*sd*bc03sc*i*
alias:          pci:v00008086d0000258Asv*sd*bc03sc*i*
alias:          pci:v00008086d00002582sv*sd*bc03sc*i*
alias:          pci:v00008086d00002572sv*sd*bc03sc*i*
alias:          pci:v00008086d0000358Esv*sd*bc03sc*i*
alias:          pci:v00008086d00003582sv*sd*bc03sc*i*
alias:          pci:v00008086d00002562sv*sd*bc03sc*i*
alias:          pci:v00008086d00003577sv*sd*bc03sc*i*
depends:        drm_kms_helper,drm,cec,video,i2c-algo-bit
retpoline:      Y
intree:         Y
name:           i915
vermagic:       5.11.8-1.fc25.qubes.x86_64 SMP mod_unload 
signat:         PKCS#7
signer:         
sig_key:        
sig_hashalgo:   md4
parm:           modeset:Use kernel modesetting [KMS] (0=disable, 1=on, -1=force vga console preference [default]) (int)
parm:           enable_dc:Enable power-saving display C-states. (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6; 3=up to DC5 with DC3CO; 4=up to DC6 with DC3CO) (int)
parm:           enable_fbc:Enable frame buffer compression for power savings (default: -1 (use per-chip default)) (int)
parm:           lvds_channel_mode:Specify LVDS channel mode (0=probe BIOS [default], 1=single-channel, 2=dual-channel) (int)
parm:           panel_use_ssc:Use Spread Spectrum Clock with panels [LVDS/eDP] (default: auto from VBT) (int)
parm:           vbt_sdvo_panel_type:Override/Ignore selection of SDVO panel mode in the VBT (-2=ignore, -1=auto [default], index in VBT BIOS table) (int)
parm:           reset:Attempt GPU resets (0=disabled, 1=full gpu reset, 2=engine reset [default]) (uint)
parm:           vbt_firmware:Load VBT from specified file under /lib/firmware (charp)
parm:           error_capture:Record the GPU state following a hang. This information in /sys/class/drm/card<N>/error is vital for triaging and debugging hangs. (bool)
parm:           enable_hangcheck:Periodically check GPU activity for detecting hangs. WARNING: Disabling this can cause system wide hangs. (default: true) (bool)
parm:           enable_psr:Enable PSR (0=disabled, 1=enabled) Default: -1 (use per-chip default) (int)
parm:           psr_safest_params:Replace PSR VBT parameters by the safest and not optimal ones. This is helpful to detect if PSR issues are related to bad values set in  VBT. (0=use VBT parameters, 1=use safest parameters) (bool)
parm:           enable_psr2_sel_fetch:Enable PSR2 selective fetch (0=disabled, 1=enabled) Default: 0 (bool)
parm:           force_probe:Force probe the driver for specified devices. See CONFIG_DRM_I915_FORCE_PROBE for details. (charp)
parm:           disable_power_well:Disable display power wells when possible (-1=auto [default], 0=power wells always on, 1=power wells disabled when possible) (int)
parm:           enable_ips:Enable IPS (default: true) (int)
parm:           fastboot:Try to skip unnecessary mode sets at boot time (0=disabled, 1=enabled) Default: -1 (use per-chip default) (int)
parm:           load_detect_test:Force-enable the VGA load detect code for testing (default:false). For developers only. (bool)
parm:           force_reset_modeset_test:Force a modeset during gpu reset for testing (default:false). For developers only. (bool)
parm:           invert_brightness:Invert backlight brightness (-1 force normal, 0 machine defaults, 1 force inversion), please report PCI device ID, subsystem vendor and subsystem device ID to [email protected], if your machine needs it. It will then be included in an upcoming module version. (int)
parm:           disable_display:Disable display (default: false) (bool)
parm:           mmio_debug:Enable the MMIO debug code for the first N failures (default: off). This may negatively affect performance. (int)
parm:           verbose_state_checks:Enable verbose logs (ie. WARN_ON()) in case of unexpected hw state conditions. (bool)
parm:           nuclear_pageflip:Force enable atomic functionality on platforms that don't have full support yet. (bool)
parm:           edp_vswing:Ignore/Override vswing pre-emph table selection from VBT (0=use value from vbt [default], 1=low power swing(200mV),2=default swing(400mV)) (int)
parm:           enable_guc:Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto, 0=disable [default], 1=GuC submission, 2=HuC load) (int)
parm:           guc_log_level:GuC firmware logging level. Requires GuC to be loaded. (-1=auto [default], 0=disable, 1..4=enable with verbosity min..max) (int)
parm:           guc_firmware_path:GuC firmware path to use instead of the default one (charp)
parm:           huc_firmware_path:HuC firmware path to use instead of the default one (charp)
parm:           dmc_firmware_path:DMC firmware path to use instead of the default one (charp)
parm:           enable_dp_mst:Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true) (bool)
parm:           enable_dpcd_backlight:Enable support for DPCD backlight control(-1=use per-VBT LFP backlight type setting [default], 0=disabled, 1=enabled) (int)
parm:           enable_gvt:Enable support for Intel GVT-g graphics virtualization host support(default:false) (bool)
parm:           mitigations:Selectively enable security mitigations for all Intel® GPUs in the system.

  auto -- enables all mitigations required for the platform [default]
  off  -- disables all mitigations

Individual mitigations can be enabled by passing a comma-separated string,
e.g. mitigations=residuals to enable only clearing residuals or
mitigations=auto,noresiduals to disable only the clear residual mitigation.
Either '!' or 'no' may be used to switch from enabling the mitigation to
disabling it.

Active mitigations for Ivybridge, Baytrail, Haswell:
  residuals -- clear all thread-local registers between contexts

drm_kms_helper

[user@dom0 ~]$ sudo modinfo drm_kms_helper
filename:       /lib/modules/5.11.8-1.fc25.qubes.x86_64/kernel/drivers/gpu/drm/drm_kms_helper.ko
license:        GPL and additional rights
description:    DRM KMS helper
author:         David Airlie, Jesse Barnes
license:        GPL
depends:        drm,cec
retpoline:      Y
intree:         Y
name:           drm_kms_helper
vermagic:       5.11.8-1.fc25.qubes.x86_64 SMP mod_unload 
signat:         PKCS#7
signer:         
sig_key:        
sig_hashalgo:   md4
parm:           drm_dp_cec_unregister_delay:CEC unregister delay in seconds, 0: no delay, >= 1000: never unregister (uint)
parm:           fbdev_emulation:Enable legacy fbdev emulation [default=true] (bool)
parm:           drm_fbdev_overalloc:Overallocation of the fbdev buffer (%) [default=100] (int)
parm:           edid_firmware:DEPRECATED. Use drm.edid_firmware module parameter instead. (charp)
parm:           poll:bool
parm:           dp_aux_i2c_speed_khz:Assumed speed of the i2c bus in kHz, (1-400, default 10) (int)
parm:           dp_aux_i2c_transfer_size:Number of bytes to transfer in a single I2C over DP AUX CH message, (1-16, default 16) (int)

drm

[user@dom0 ~]$ sudo modinfo drm
filename:       /lib/modules/5.11.8-1.fc25.qubes.x86_64/kernel/drivers/gpu/drm/drm.ko
license:        GPL and additional rights
description:    DRM shared core routines
author:         Gareth Hughes, Leif Delgass, José Fonseca, Jon Smirl
license:        GPL and additional rights
description:    DRM bridge infrastructure
author:         Ajay Kumar <[email protected]>
license:        GPL and additional rights
description:    DRM panel infrastructure
author:         Thierry Reding <[email protected]>
depends:        
retpoline:      Y
intree:         Y
name:           drm
vermagic:       5.11.8-1.fc25.qubes.x86_64 SMP mod_unload 
signat:         PKCS#7
signer:         
sig_key:        
sig_hashalgo:   md4
parm:           edid_firmware:Do not probe monitor, use specified EDID blob from built-in data or /lib/firmware instead.  (string)
parm:           vblankoffdelay:Delay until vblank irq auto-disable [msecs] (0: never disable, <0: disable immediately) (int)
parm:           timestamp_precision_usec:Max. error on timestamps [usecs] (int)
parm:           debug:Enable debug output, where each bit enables a debug category.
		Bit 0 (0x01)  will enable CORE messages (drm core code)
		Bit 1 (0x02)  will enable DRIVER messages (drm controller code)
		Bit 2 (0x04)  will enable KMS messages (modesetting code)
		Bit 3 (0x08)  will enable PRIME messages (prime code)
		Bit 4 (0x10)  will enable ATOMIC messages (atomic code)
		Bit 5 (0x20)  will enable VBL messages (vblank code)
		Bit 7 (0x80)  will enable LEASE messages (leasing code)
		Bit 8 (0x100) will enable DP messages (displayport code) (int)
parm:           edid_fixup:Minimum number of valid EDID header bytes (0-8, default 6) (int)

tlaurion added a commit to tlaurion/heads that referenced this issue May 6, 2021
…eters, just upgrading kernel version, and removing heads kernel quiet option in the goal of troubleshooting linuxboot#789
@tlaurion tlaurion changed the title QubesOS 4.1 installer doesn't boot QubesOS 4.1 installer doesn't boot on sandy/ivy bridge (xx20/xx30) Jul 23, 2021
@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 19, 2021

Resolved with combination of QubesOS/qubes-issues#6792 (comment) and #1015.

Waiting on boards owners to test and report successes/failures under #1015.
Success on tested x230-maximized and x230-hotp-maximized boards.

@tlaurion
Copy link
Collaborator Author

tlaurion commented Oct 12, 2021

Not related to boot issue, but resume issue: QubesOS/qubes-issues#6066 (comment)

To be tested, but supposed to be fixed in Xen 4.14.3 which came with 4.1 RC1

@tlaurion
Copy link
Collaborator Author

Not related to boot issue, but resume issue: QubesOS/qubes-issues#6066 (comment)

To be tested, but supposed to be fixed in Xen 4.14.3 which came with 4.1 RC1

Resume issue fixed when running #1015 and QubesOS 4.1 RC1.

@no-sauce
Copy link

I just tryed to install Qubes 4.1.0 RC1 on my X230 doing a clean install and I still have the graphical glitch (same as above). The glitch goes away after a minute or so and then errors out when trying to load the installer "X startup failed".

@tlaurion
Copy link
Collaborator Author

@no-sauce booting qubesos 4.1 requires a ROM upgrade to #1015. Are you reporting that x230 (htop or not) from there doesn't work? You have a reprogrammer?

@no-sauce
Copy link

I currently have V0.2.1 from the release area so like you said I will have to upgrade it which is why it is not working I see. I do not have a reprogrammer. Do we have any roms made with this new upgrade yet?

@tlaurion
Copy link
Collaborator Author

I currently have V0.2.1 from the release area so like you said I will have to upgrade it which is why it is not working I see. I do not have a reprogrammer. Do we have any roms made with this new upgrade yet?

@no-sauce : Heads didn't receive any github releases since forever.
May I ask how you flashed the device initially? Is IFD unlocked per https://osresearch.net/Clean-the-ME-firmware/ instructions?

If IFD is unlocked: you can theoritically flash internally the whole 12mb opaque flash with maximized builds (hotp if you have Nitrokey pro/Librem Key), x230-maximized if not. If unsure, you would have to flash x230 internally, just flashing the BIOS region without taking advantage of fully neutered ME liberated space (if not completely neutered, you have 7.5MB BIOS region available. If IFD was unlocked, you can take advantage of 11.5Mb available).

This is why #1015 is pending still. I currently receive a lot of individual questions. I think it is time to create an upgrade guide.

A lot happened inside of Heads since release 0.2.1.

So:
1- Have you unlocked IFD at initial flash? How was your laptop initially flashed?

You can answer at #1015, that would be probably beneficial for the whole community.

@tlaurion
Copy link
Collaborator Author

tlaurion commented Dec 4, 2021

#1015 merged

@tlaurion tlaurion closed this as completed Dec 4, 2021
@tlaurion
Copy link
Collaborator Author

tlaurion commented May 9, 2023

Some notes on patches we keep for kexec: those are applied when kexec uses elf kexec loader, not xen (multiboot).
Note that kexec 2.0.26 replaces its default to boot in now into multiboot2 codepath.

So OP referring to q4.1 to fb corruption even though 116787f was merged was irrelevant. Conclusion here was that Xen had a regression. Kinda important here since Xen is dealt differently under kexec scripts and is still detected today as multiboot from kexec-parse related scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants