Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a safe(r) GRUB gfxmode #609

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Use a safe(r) GRUB gfxmode #609

wants to merge 3 commits into from

Conversation

carniz
Copy link
Sponsor

@carniz carniz commented Jan 30, 2022

This fixes 2 known symptoms/issues with the installer:

  1. The screen goes black after "Try or install" (see Odin installer goes black after 'try or install elementary' #546)
  2. Installer fails with "error: out of memory" (see Installer fails with "error: out of memory" installer#542)

These issues might be specific to systems using HiDPI/4K monitors. My laptop happens to be one of those, and I've experienced the installer failing in both of these ways with gfxmode=auto.

@davidmhewitt
Copy link
Member

I don't think this is a particularly good idea. It might solve those issues for you, but cause different issues for other people. auto is the default because it's supposed to set a sensible resolution for any computer. Either your hardware/firmware is not providing a sensible default to GRUB, or there's a bug with GRUB and/or its drivers on your hardware.

Can you confirm whether the latest Ubuntu 20.04 boots OK on your hardware? If it does, we may have to look at doing something similar to what that's doing, which is the following:

if loadfont /boot/grub/font.pf2 ; then
	set gfxmode=auto
	insmod efi_gop
	insmod efi_uga
	insmod gfxterm
	terminal_output gfxterm
fi

@carniz
Copy link
Sponsor Author

carniz commented Jan 30, 2022

Ubuntu 20.04.3 (ubuntu-20.04.3-desktop-amd64.iso) behaves the same way as elementaryOS 6.x: the monitor just goes black after the Grub screen. NB: Changing gfxmode to 800x600 fixes the issue also for the Ubuntu installer.

Apart from blocking the installer from booting, the auto gfxmode also makes the text on the Grub screen impossible to read on a 15" 4K monitor without a magnifying glass - so merging this PR would fix 2 different types of issues at once.

At least it seems evident to me that the Grub auto gfxmode breaks stuff on certain hardware, and I don't know what other options there are apart from using a "safe" resolution. Shouldn't 800x600 be supported by most (if not all) hardware by now?

@carniz
Copy link
Sponsor Author

carniz commented Jan 30, 2022

DSC_1585
DSC_1587

For reference: here's what the Grub screen looks like with gfxmode=auto and gfxmode=800x600 in the Ubuntu 20.04.3 installer on my Dell Precision 5510 (15" 3840x2160 monitor)

@carniz
Copy link
Sponsor Author

carniz commented Feb 12, 2022

DSC_1780
DSC_1781

Updated the PR with fallback to auto (see https://www.gnu.org/software/grub/manual/grub/html_node/gfxmode.html). Attaching photos of what the elementaryos-7.0-daily.20220127 Grub screen looks like with set gfxmode=800x600,auto on my 15" 4K 3840x2160 monitor.

@thel1ghtbr1nger
Copy link

Would love to see a final solution to this, works fine on my desktop at 1920x1080p but not on my laptop with a 13 inch 4k monitor. That being said, I'm curious if touch capabilities affect the matter?

@carniz
Copy link
Sponsor Author

carniz commented Dec 3, 2022

Would love to see a final solution to this, works fine on my desktop at 1920x1080p but not on my laptop with a 13 inch 4k monitor.

That's weird...is it a Dell XPS 13, perhaps? I tried this with elementaryos-7.0-daily.20221201.iso on my Dell Precision 5510 (4k monitor), and it worked as expected. Without the change I get the dreaded "Out of memory" error.

@thel1ghtbr1nger
Copy link

Would love to see a final solution to this, works fine on my desktop at 1920x1080p but not on my laptop with a 13 inch 4k monitor.

That's weird...is it a Dell XPS 13, perhaps? I tried this with elementaryos-7.0-daily.20221201.iso on my Dell Precision 5510 (4k monitor), and it worked as expected. Without the change I get the dreaded "Out of memory" error.

I’ve not managed to make the change as editing the iso has proven difficult and it seems I have static options that don’t include elementary os when I use use the method you mentioned previously to write the iso.

However I am using a Razer blade stealth 13 w/4K monitor so I imagine our issue is the same, I’m just getting hung up

@carniz
Copy link
Sponsor Author

carniz commented Dec 10, 2022

Would love to see a final solution to this, works fine on my desktop at 1920x1080p but not on my laptop with a 13 inch 4k monitor.

That's weird...is it a Dell XPS 13, perhaps? I tried this with elementaryos-7.0-daily.20221201.iso on my Dell Precision 5510 (4k monitor), and it worked as expected. Without the change I get the dreaded "Out of memory" error.

I’ve not managed to make the change as editing the iso has proven difficult and it seems I have static options that don’t include elementary os when I use use the method you mentioned previously to write the iso.

The secret is to use unetbootin for creating the bootable USB, since it becomes read-only otherwise. And based on my own experience it sometimes requires more than one try/boot before the firmware/BIOS detects the USB drive. So I'd say give it one more shot, persistence usually wins the game :)

@vjr
Copy link
Member

vjr commented Dec 10, 2022

As a workaround have you folks tried increasing the UEFI/BIOS setting for "initial video memory" size? It's called something similar or like "reserved graphics memory".

If available it's usually set to a low value but you could try bumping to the max and see if it makes a difference?

@thel1ghtbr1nger
Copy link

Would love to see a final solution to this, works fine on my desktop at 1920x1080p but not on my laptop with a 13 inch 4k monitor.

That's weird...is it a Dell XPS 13, perhaps? I tried this with elementaryos-7.0-daily.20221201.iso on my Dell Precision 5510 (4k monitor), and it worked as expected. Without the change I get the dreaded "Out of memory" error.

I’ve not managed to make the change as editing the iso has proven difficult and it seems I have static options that don’t include elementary os when I use use the method you mentioned previously to write the iso.

The secret is to use unetbootin for creating the bootable USB, since it becomes read-only otherwise. And based on my own experience it sometimes requires more than one try/boot before the firmware/BIOS detects the USB drive. So I'd say give it one more shot, persistence usually wins the game :)

When I try to write with unetbootin, elementary doesn’t show up in my writable options, total noob with unetbootin, does it need to be used from the cli to select a local iso?

@thel1ghtbr1nger
Copy link

As a workaround have you folks tried increasing the UEFI/BIOS setting for "initial video memory" size? It's called something similar or like "reserved graphics memory".

If available it's usually set to a low value but you could try bumping to the max and see if it makes a difference?

Will try when I get home

@carniz
Copy link
Sponsor Author

carniz commented Dec 12, 2022

Would love to see a final solution to this, works fine on my desktop at 1920x1080p but not on my laptop with a 13 inch 4k monitor.

That's weird...is it a Dell XPS 13, perhaps? I tried this with elementaryos-7.0-daily.20221201.iso on my Dell Precision 5510 (4k monitor), and it worked as expected. Without the change I get the dreaded "Out of memory" error.

I’ve not managed to make the change as editing the iso has proven difficult and it seems I have static options that don’t include elementary os when I use use the method you mentioned previously to write the iso.

The secret is to use unetbootin for creating the bootable USB, since it becomes read-only otherwise. And based on my own experience it sometimes requires more than one try/boot before the firmware/BIOS detects the USB drive. So I'd say give it one more shot, persistence usually wins the game :)

When I try to write with unetbootin, elementary doesn’t show up in my writable options, total noob with unetbootin, does it need to be used from the cli to select a local iso?

The unetbootin interface isn't very intuitive, but if you don't want to use one of the supported distributions from the "=== Select Distribution ===" drop-down, you can click the Diskimage radio-button (in the lower part of the interface) and then click the ". . ." button to browse to a local .iso file:
image

@peteruithoven
Copy link
Collaborator

I was experiencing the same issue on a Dell XPS 15 9550, building an ISO based on this PR fixed the issue for me. (More details on my issue).

@vjr I tried looking through the options in my BIOS screen, but couldn't find anything like "initial video memory". Could you clarify?

@thpang
Copy link

thpang commented Sep 11, 2023

Any progress here? This one has been out there for quite some time. With many work arounds trying to explain how to create ones own ISO when in reality if this PR was merged then folks could at least move forward. Thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants