How to reduce grub resolution?

On my 4k laptop, I have 2 problems: 1) the grub boot menu is in 4k - so it's all super tiny. 2) If I have TPM and secure boot enabled, it actually runs out of memory, and I've heard you can lower the resolution to fix that. So how do I do that on Bazzite? Most of the stuff the AIs tell me is bunk, and doens't work.
Solution:
I added this to /etc/default/grub:
GRUB_GFXMODE="1920x1080x32,1280x720x32,1024x768x32,800x600x32,640x480x32,auto"
GRUB_GFXMODE="1920x1080x32,1280x720x32,1024x768x32,800x600x32,640x480x32,auto"
Then ran the generate command:...
Jump to solution
17 Replies
CaptainN
CaptainNOP2mo ago
There are so many notes all over the grub files about what NOT to edit, but nothing about how to actually get any custom settings in to the darned runtime config. NOTHING I do makes it in. It's like trying to send a signal from the event horizon of a black hole.
CaptainN
CaptainNOP2mo ago
That is one of the many things I've tried, 36 different times lol Nothing has any impact at all - it just always renderes at 4k I think it's because the way the grub.cfg is generated, it doesn't load any of the custom stuff until all the way at the end - after the video mode is already initialized. For me, changing it back won't actually solve the problem - I need it to never try to run in 4k at all And there doesn't appear to be any way to actually override that early enough with custom configs (And changing the mode after the fact just doesn't work - ever.) grub's terminal is also missing commands like videoinfo
biebel
biebel2mo ago
Not sure how it works in current linux, but I used to do some nomodset kernel argument thing a long time ago. This was in crt times though. I'll see if I can dig sth up
CaptainN
CaptainNOP2mo ago
I also tried changing kernal args, that also has no impact whatsoever It's definitely probable I've done it wrong It looks equally probable, that there just isn't a way to override the mode setting (on silverblue/ostree base)
biebel
biebel2mo ago
You can set a manual resolution for sure. Helped someone with that before. You need to use rpm-ostree kargs for kernel arguments. Not sure how it applies to an internal monitor though. They used a manual resolution from here: https://wiki.archlinux.org/title/Kernel_mode_setting#Troubleshooting
CaptainN
CaptainNOP2mo ago
The grub template system sets the display mode in it's 00 file:
### BEGIN /etc/grub.d/00_header ###
set pager=1

if [ -f ${config_directory}/grubenv ]; then
load_env -f ${config_directory}/grubenv
elif [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}

function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}

if loadfont unicode ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/00_header ###
set pager=1

if [ -f ${config_directory}/grubenv ]; then
load_env -f ${config_directory}/grubenv
elif [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}

function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}

if loadfont unicode ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
hmm, if loadfont unicode - how do I change that conditional? I wonder if I can just edit the 00_header file?
biebel
biebel2mo ago
You should be able to as it's on /etc
CaptainN
CaptainNOP2mo ago
BTW, I tried setting kargs 100 different ways - nothing had any impact also, hwinfo --framebuffer doesn't work on bazzite and in grub cli, neither videoinfo and vbeinfo aren't there either It's like everything that might be somewhat standard in the linux world is simply unavailable here
biebel
biebel2mo ago
I've never bothered to figure out the complete grub chain, but all kernel parameters that I tried with kargs worked. The person I helped setting a manual reolution for their tv with a karg had success too.
CaptainN
CaptainNOP2mo ago
It looks like the 00_header file actually sets the mode from a variable can I just enter this in grubenv maybe?
CaptainN
CaptainNOP2mo ago
Cool thanks! I don't know what I did differently this time, but it worked!
Solution
CaptainN
CaptainN2mo ago
I added this to /etc/default/grub:
GRUB_GFXMODE="1920x1080x32,1280x720x32,1024x768x32,800x600x32,640x480x32,auto"
GRUB_GFXMODE="1920x1080x32,1280x720x32,1024x768x32,800x600x32,640x480x32,auto"
Then ran the generate command:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
CaptainN
CaptainNOP2mo ago
I think the mistake I made earlier, was that I didn't include x32 in the mode list Anyway - this works!
CaptainN
CaptainNOP2mo ago
It did NOT solve the out of memory problem lol - I'll try other things later
biebel
biebel4w ago
Universal Blue
Stuck on Bazzite build, can't boot into update - grub memory error,...
I seem to be stuck on bazzite-nvidia:stable 41.20250127, and as I am researching I am finding more and more people who seem to be in the same boat. If I remember correctly I was hit by the bad update a few weeks ago, and was able to roll back and update from there just fine. I didn’t do a full shut down for a while, and once I did, I am exper...

Did you find this page helpful?