I have a Thinkpad p14s G2 (AMD) that has a 4k screen.
I tried to change the grub resolution like this:
boot.loader.grub = {
extraConfig = ''
GRUB_CMDLINE_LINUX="amdgpu.backlight=0"
GRUB_GFXMODE=1024x768x32
GRUB_GFXPAYLOAD_LINUX=keep
GRUB_TERMINAL_OUTPUT="gfxterm"
'';
};
But it has no effect. I am missing something?
daf
March 20, 2022, 8:42pm
2
I have this in one of my configuarations:
boot.loader = {
grub = {
enable = true;
efiSupport = true;
device = "nodev";
fsIdentifier = "label";
efiInstallAsRemovable = true;
gfxmodeEfi = "3440x1440";
font = "${pkgs.hack-font}/share/fonts/hack/Hack-Regular.ttf";
fontSize = 36;
};
};
Be sure to run sudo nixos-rebuild switch
after making your changes.
daf
February 9, 2025, 7:20am
3
After upgrading to 24.11, that config stopped working
boot.loader.grub = {
enable = true;
efiSupport = true;
device = "nodev";
fsIdentifier = "label";
efiInstallAsRemovable = true;
gfxmodeEfi = "3440x1440";
font = "${pkgs.hack-font}/share/fonts/hack/Hack-Regular.ttf";
fontSize = 36;
};
Grub doesn’t set the screen resolution to 3440x1440, and it doesn’t load the default nixos splash.
1 Like
12-G
March 5, 2025, 8:34am
4
The same problem. Set gfxmodeEfi option but nothing works.
I think it’s unlikely that your BIOS would support such a large screen resolution.
I have laptop with a 200dpi screen and the highest mode supported is 1280x720.
To find which modes are supported you can use vbeinfo
(for BIOS) or videoinfo
(for EFI) in the GRUB shell. Then set:
boot.loader.grub.gfxmodeBios = "1280x720"; # for BIOS, or
boot.loader.grub.gfxmodeEfi = "1280x720"; # for EFI
boot.loader.grub.gfxpayloadBios = "keep";
I also to set gfxmodeBios
to the same value as gfxmodeEfi
. Both also have a ,auto
after the resolution.
And I also set:
extraConfig = ''
insmod gfxterm
insmod png
set icondir=($root)/theme/icons
'';
Don’t ask me why is set those because I don’t really remember and definitely got ther by try and error.
12-G
March 6, 2025, 1:32am
7
I seem to have found the problem, which seems to be the cause of the catppuccin theme. Might need to change its pkg.