Package: grub-cloud-amd64
Version: 0.1.1
Severity: important
X-Debbugs-Cc: [email protected]

Dear Maintainer,

The default state of the debian cloud image results in a corrupted/garbled 
console if a VGA device is used.
The cloud kernel is compiled without DRM_BOCHS, but can still work with QEMU's 
standard VGA device via efifb.
However, the cloud GRUB package does include the video_bochs driver, which 
results in the following chain of events:

1. The virtual firmware (ovmf) initialises the display and sets the EFI GOP 
metadata.
2. GRUB decides to use video_bochs, bypasses the firmware and reconfigures the 
VGA device directly. This renders
   the GOP metadata stale.
3. Debian boots, and since it lacks DRM_BOCHS, it cannot reconcile with what 
GRUB did, trusts the stale GOP
   metadata, and treats the framebuffer as having different parameters to what 
GRUB configured. This results in
   a corrupted visual output on the VGA console.

Known quirks:
1. The cloud image defaults to GRUB_TERMINAL_OUTPUT="gfxterm serial". If the 
virtual hardware doesn't have a serial
   console where GRUB expects to find one, this fails, also skipping gfxterm 
and causing GRUB to remain in text mode.
   This bypasses the bug as a side-effect, as video_bochs is not loaded.

Known workarounds:
1. Use a different QEMU display device, e.g. ramfb.
2. Set GRUB_TERMINAL_OUTPUT="console" to prevent grub from configuring graphics 
at all.

It seems inconsistent to ship VGA/bochs drivers in GRUB but not in the kernel. 
Perhaps it would be best to
do one or more of the following?
1. Add DRM_BOCHS back into the cloud kernel.
2. Remove video_bochs from the cloud variant of GRUB, or otherwise force cloud 
GRUB to prefer its efi_gop driver.
3. Make the cloud image default to GRUB_TERMINAL_OUTPUT="console".

Thanks,
Chris


-- System Information:
Debian Release: 13.7
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.107+deb13-cloud-amd64 (SMP w/1 CPU thread; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages grub-cloud-amd64 depends on:
ii  grub-efi-amd64-bin     2.12-9+deb13u2
ii  grub-efi-amd64-signed  1+2.12+9+deb13u2
ii  grub-pc-bin            2.12-9+deb13u2
ii  grub2-common           2.12-9+deb13u2
ii  shim-signed            1.51~1+deb13u1+16.1-2~deb13u1

grub-cloud-amd64 recommends no packages.

grub-cloud-amd64 suggests no packages.

-- Configuration Files:
/etc/default/grub changed [not included]

-- no debconf information

Reply via email to