How to reset the video mode of the Intel driver i915 for the kexec-ed kernel so I can see what kexec kernel is doing?
4
votes
1
answer
2978
views
I'm running Arch Linux and I've set up [kdump](https://wiki.archlinux.org/index.php/Kdump) so that when the current kernel panics(or I manually induce a crash via sysrq+c) then another kernel(the kexec kernel) starts up in order to create a crash dump so that I can later inspect it.
The problem is that whether this triggers from console or from within Xorg, the same screen remains on the display for the entire duration of the kexec-ed kernel and I thus cannot see what it's doing.
This isn't a problem on a non-i915 laptop that's using AMD/Radeon for example.
I've tried the following kernel args for the kexec kernel and they've had no effect on this issue:
1.
systemd.unit=kdump-save.service irqpoll nr_cpus=1 reset_devices ipv6.disable=1 loglevel=9
2. systemd.unit=kdump-save.service irqpoll nr_cpus=1 reset_devices ipv6.disable=1 loglevel=9 i915.fastboot=0 i915.reset=1 i915.modeset=-1 i915.force_reset_modeset_test=true i915.verbose_state_checks=1 i915.enable_hangcheck=1 i915.error_capture=1 zram.num_devices=3 zswap.enabled=0
The full ExecStart=
line that I'm currently using and has no effect is:
ExecStart=/usr/bin/kexec -p /boot/vmlinuz-linux-git --initrd=/boot/initramfs-linux-git.img --reuse-cmdline --reset-vga --console-vga "--append=root=UUID=2b8b9ab8-7ac5-4586-aa42-d7ffb12de92a systemd.unit=kdump-save.service irqpoll nr_cpus=1 reset_devices ipv6.disable=1 loglevel=9 i915.fastboot=0 i915.reset=1 i915.modeset=-1 i915.force_reset_modeset_test=true i915.verbose_state_checks=1 i915.enable_hangcheck=1 i915.error_capture=1 zram.num_devices=3 zswap.enabled=0"
So when kernel panics, the X or console screen that was present at panic time will remain on the screen until the kexec kernel is done saving the dump file and reboots.
When crashkernel=
arg for the primary kernel is too low, the kexec kernel can OOM during makedumpfile
and thus I've no idea why it didn't reboot after x minutes because I can't see its screen.
I guess I need some (working)way to switch to 80x25 mode or some way to tell kexec kernel to reset the i915 video card so it can re-init it again normally?
**EDIT:** not using EFI, using grub+MBR also some primary kernel info:
[ 0.275493] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux-git root=UUID=2b8b9ab8-7ac5-4586-aa42-d7ffb12de92a rw root_trim=yes rd.luks.allow-discards rd.luks.options=discard ipv6.disable=1 ipv6.disable_ipv6=1 ipv6.autoconf=0 loglevel=15 log_buf_len=16M ignore_loglevel printk.always_kmsg_dump=y printk.time=y printk.devkmsg=on mminit_loglevel=4 memory_corruption_check=1 fbcon=scrollback:4096k fbcon=font:ProFont6x11 net.ifnames=0 nolvm dobtrfs console=tty1 earlyprintk=vga audit=0 systemd.log_target=kmsg systemd.journald.forward_to_console=1 enforcing=0 udev.children-max=1256 rd.udev.children-max=1256 nohz=on oops=panic crashkernel=1024M panic=0 page_poison=1 psi=1 sysrq_always_enabled random.trust_cpu=off logo.nologo lpj=0 mce=bootlog reboot=force,cold noexec=on nohibernate scsi_mod.use_blk_mq=1 consoleblank=120 mitigations=off nospectre_v1 nospectre_v2 spectre_v2=off nospec_store_bypass_disable kvm-intel.vmentry_l1d_flush=never l1tf=off nopti pti=off no_stf_barrier noibrs noibpb ssbd=force-off spectre_v2_user=off noretpoline mds=off rd.log=all noefi cpuidle.governor=menu zram.num_devices=3 zswap.enabled=0 zswap.same_filled_pages_enabled=1 zswap.compressor=zstd zswap.max_pool_percent=40 zswap.zpool=z3fold vsyscall=none i915.enable_fbc=1 i915.verbose_state_checks=1 i915.enable_hangcheck=1 i915.error_capture=1
[ 0.845622] device: 'fbcon': device_add
[ 0.845626] PM: Adding info for No Bus:fbcon
...
[ 4.416734] fbcon: i915drmfb (fb0) is primary device
...
[ 4.494499] i915 0000:00:02.0: fb0: i915drmfb frame buffer device
Here's a cmdline word diff between primary and kexec kernel:
diff --git a/home/user/logs/pri_kernel.log b/home/user/logs/kexeckernel.log
index e6d2815..9b90a12 100644
--- a/home/user/logs/pri_kernel.log
+++ b/home/user/logs/kexeckernel.log
@@ -1,2 +1,2 @@
[ 0.000000] Command line:
-BOOT_IMAGE=/boot/vmlinuz-linux-git
root=UUID=2b8b9ab8-7ac5-4586-aa42-d7ffb12de92a rw root_trim=yes rd.luks.allow-discards rd.luks.options=discard ipv6.disable=1 ipv6.disable_ipv6=1 ipv6.autoconf=0 loglevel=15 log_buf_len=16M ignore_loglevel printk.always_kmsg_dump=y printk.time=y printk.devkmsg=on mminit_loglevel=4 memory_corruption_check=1 fbcon=scrollback:4096k fbcon=font:ProFont6x11 net.ifnames=0 nolvm dobtrfs console=tty1 earlyprintk=vga audit=0 systemd.log_target=kmsg systemd.journald.forward_to_console=1 enforcing=0 udev.children-max=1256 rd.udev.children-max=1256 nohz=on oops=panic
-crashkernel=1024M
panic=0 page_poison=1 psi=1 sysrq_always_enabled random.trust_cpu=off logo.nologo lpj=0 mce=bootlog reboot=force,cold noexec=on nohibernate scsi_mod.use_blk_mq=1 consoleblank=120 mitigations=off nospectre_v1 nospectre_v2 spectre_v2=off nospec_store_bypass_disable kvm-intel.vmentry_l1d_flush=never l1tf=off nopti pti=off no_stf_barrier noibrs noibpb ssbd=force-off spectre_v2_user=off noretpoline mds=off rd.log=all noefi cpuidle.governor=menu zram.num_devices=3 zswap.enabled=0 zswap.same_filled_pages_enabled=1 zswap.compressor=zstd zswap.max_pool_percent=40 zswap.zpool=z3fold vsyscall=none i915.enable_fbc=1 i915.verbose_state_checks=1 i915.enable_hangcheck=1 i915.error_capture=1
+root=UUID=2b8b9ab8-7ac5-4586-aa42-d7ffb12de92a systemd.unit=kdump-save.service irqpoll nr_cpus=1 reset_devices ipv6.disable=1 loglevel=9 i915.fastboot=0 i915.reset=1 i915.modeset=-1 i915.force_reset_modeset_test=true i915.verbose_state_checks=1 i915.enable_hangcheck=1 i915.error_capture=1 zram.num_devices=3 zswap.enabled=0 acpi_rsdp=0xf05b0 elfcorehdr=2588032K
~
~
There's no mention in kexec kernel dmesg of i915
except in cmdline.
Asked by user353741
Sep 10, 2019, 12:09 PM
Last activity: Sep 10, 2019, 02:21 PM
Last activity: Sep 10, 2019, 02:21 PM