Hello,

When using a `grub-theme` record with a `gfxmode` list in
`bootloader-configuration`, Guix generates a `set gfxmode=` line in
/boot/grub/grub.cfg that uses semicolons as separators between resolution
values. However, semicolons are statement separators in GRUB scripting
syntax, so only the first value is actually assigned to `gfxmode`. The
remaining values are treated as separate statements and fail with errors
like:

  error: script/function.c:grub_script_function_find:119:can't find command
'1280x720x32'.
  error: script/function.c:grub_script_function_find:119:can't find command
'1024x768x32'.
  error: script/function.c:grub_script_function_find:119:can't find command
'auto'.

The relevant portion of my config.scm:

  (bootloader
   (bootloader-configuration
    (bootloader grub-efi-bootloader)
    (targets (list "/boot/efi"))
    (theme (grub-theme
            (gfxmode '("1920x1080x32"
                       "1280x720x32"
                       "1024x768x32" "1024x768x16"
                       "800x600x32" "800x600x16"
                       "auto"))))))

The generated line in /boot/grub/grub.cfg:

  set
gfxmode=1920x1080x32;1280x720x32;1024x768x32;1024x768x16;800x600x32;800x600x16;auto

The GRUB manual documents both commas and semicolons as valid separators
for gfxmode values, but semicolons require the entire value to be quoted to
prevent the script tokenizer from splitting on them. The fix is either to
use commas as the separator (which pass through unquoted safely), or to
quote the entire value string.

Manually editing grub.cfg to use commas:

  set
gfxmode=1920x1080x32,1280x720x32,1024x768x32,1024x768x16,800x600x32,800x600x16,auto

...eliminates the startup errors.

I think the change would be made at gnu/bootloader/grub.scm near line 199
on a recent git pull of guix.

Guix version (from `guix describe`):

  Generation 6  Mar 22 2026 18:08:16  (current)
    nonguix 7b33ad4
      repository URL: https://gitlab.com/nonguix/nonguix
      branch: master
      commit: 7b33ad4f6854277480816dbf0f0734b74c83a127
    guix fd30837
      repository URL: https://git.guix.gnu.org/guix.git
      branch: master
      commit: fd30837acb87417a97d86aeafa7f457fd206226f

Thanks,
Martin Flack

Reply via email to