Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] efifb - set resolution
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Marcih
Apprentice
Apprentice


Joined: 19 Feb 2018
Posts: 213

PostPosted: Sun Mar 31, 2019 11:04 am    Post subject: [SOLVED] efifb - set resolution Reply with quote

On my UEFI machine, I've switched from booting using GRUB2 to EFI stub kernel. Everything went swimmingly except for the console resolution. I'm using the proprietary nvidia-drivers, which don't set the console resolution automagically like nouveau does. When using GRUB2, I've worked around this using the GRUB config file.
In "/etc/default/grub":
Code:
# The resolution used on graphical terminal.
# Note that you can use only modes which your graphic card supports via VBE.
# You can see them in real GRUB with the command `vbeinfo'.
GRUB_GFXMODE=1920x1080x32,640x480x32,auto

If I understood correctly, this set the efifb resolution. Is there a way to achieve this without GRUB?
My current attempt:
Code:
$ dmesg | grep efifb
[    0.000000] Kernel command line: root=PARTUUID=[REDACTED] video=efifb:1920x1080x32
[    0.199859] efifb: probing for efifb
[    0.199867] efifb: framebuffer at 0xe0000000, mapped to 0xffffc90000400000, using 3072k, total 3072k
[    0.199871] efifb: mode is 1024x768x32, linelength=4096, pages=1
[    0.199944] efifb: scrolling: redraw
[    0.199947] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0

_________________
Bones McCracker wrote:
It wouldn't be so bad, if it didn't suck.

NeddySeagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.


Last edited by Marcih on Thu Nov 21, 2019 12:47 pm; edited 1 time in total
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5910

PostPosted: Sun Mar 31, 2019 5:03 pm    Post subject: Re: efifb - set resolution Reply with quote

Marcih wrote:
On my UEFI machine, I've switched from booting using GRUB2 to EFI stub kernel. Everything went swimmingly except for the console resolution. I'm using the proprietary nvidia-drivers, which don't set the console resolution automagically like nouveau does. When using GRUB2, I've worked around this using the GRUB config file.
In "/etc/default/grub":
Code:
# The resolution used on graphical terminal.
# Note that you can use only modes which your graphic card supports via VBE.
# You can see them in real GRUB with the command `vbeinfo'.
GRUB_GFXMODE=1920x1080x32,640x480x32,auto

If I understood correctly, this set the efifb resolution. Is there a way to achieve this without GRUB?
My current attempt:
Code:
$ dmesg | grep efifb
[    0.000000] Kernel command line: root=PARTUUID=[REDACTED] video=efifb:1920x1080x32
[    0.199859] efifb: probing for efifb
[    0.199867] efifb: framebuffer at 0xe0000000, mapped to 0xffffc90000400000, using 3072k, total 3072k
[    0.199871] efifb: mode is 1024x768x32, linelength=4096, pages=1
[    0.199944] efifb: scrolling: redraw
[    0.199947] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0

create an efi app that sets the proper mode you want and boot the kernel afterwards and use efibootmgr to set it as the first boot entry
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 548
Location: Hawaii

PostPosted: Sun Mar 31, 2019 10:33 pm    Post subject: Reply with quote

Or use the boot manager rEFInd which allows you set the efifb resolution via configuration file. I use it to select efi stub kernels or Windows.
_________________
MSI MAG B550 Tomahawk
Ryzen 3900x
32Gb Samsung B-die (16GB dual rank x2) DDR4 @ 3200MHz, cl14
Geforce RTX 2070S 8GB
Samsung m.2 NVME pcie-3.0
Etc....
Back to top
View user's profile Send private message
Marcih
Apprentice
Apprentice


Joined: 19 Feb 2018
Posts: 213

PostPosted: Thu Jun 06, 2019 7:17 pm    Post subject: Reply with quote

bammbamm808, you mention using rEFInd and DaggyStyle, you say to write an app. If a separate program is capable of doing this, how is it done?
I assume this is not a kernel command line option, what is it? Is it something I can do this in a simple manner (ideally without using extra applications, just booting the stub kernel)?
_________________
Bones McCracker wrote:
It wouldn't be so bad, if it didn't suck.

NeddySeagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5910

PostPosted: Fri Jun 07, 2019 5:58 am    Post subject: Reply with quote

Marcih wrote:
bammbamm808, you mention using rEFInd and DaggyStyle, you say to write an app. If a separate program is capable of doing this, how is it done?
I assume this is not a kernel command line option, what is it? Is it something I can do this in a simple manner (ideally without using extra applications, just booting the stub kernel)?

in general, each uefi bios has GOP defined, GOP stands for Graphical Output Protocol. there can be more than one.
it is assumed that there are at least one which is active, that is the one you seek.
the active GOP has resolution modes which can be set, that is bios dependent. if the bios supports more than 1024x768x32, you can change to it, if not, than that what you get.
you can use this uefi example: https://blog.fpmurphy.com/2015/05/check-available-text-and-graphics-modes-from-uefi-shell.html to find out what supported resolutions there are.

I'd recommend to try and run this example and see if there is higher resolution than 1024x768x32, if there is, look into rEFInd on how to set it
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Marcih
Apprentice
Apprentice


Joined: 19 Feb 2018
Posts: 213

PostPosted: Mon Nov 11, 2019 8:04 pm    Post subject: Reply with quote

Odd, I tried rEFInd and I still don't get the results I get with GRUB2. I've set "resolution 1920 1080 " in refind.conf, the graphics menu displays in the correct resolution, but a) Linux's console is still in the wrong resolution and b) rEFInd's "textmode" is in a low resolution too...
Advice? :?
_________________
Bones McCracker wrote:
It wouldn't be so bad, if it didn't suck.

NeddySeagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3668

PostPosted: Tue Nov 12, 2019 7:23 am    Post subject: Re: efifb - set resolution Reply with quote

Marcih wrote:
My current attempt:
Code:
$ dmesg | grep efifb
[    0.000000] Kernel command line: root=PARTUUID=[REDACTED] video=efifb:1920x1080x32
[    0.199859] efifb: probing for efifb
[    0.199867] efifb: framebuffer at 0xe0000000, mapped to 0xffffc90000400000, using 3072k, total 3072k
[    0.199871] efifb: mode is 1024x768x32, linelength=4096, pages=1
[    0.199944] efifb: scrolling: redraw
[    0.199947] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0

For comparison:
Quote:
$ dmesg | grep efifb
[ 0.253444] pci 0000:00:02.0: BAR 2: assigned to efifb
[ 0.370145] efifb: probing for efifb
[ 0.370161] efifb: framebuffer at 0xd0000000, using 8100k, total 8100k
[ 0.370163] efifb: mode is 1920x1080x32, linelength=7680, pages=1
[ 0.370165] efifb: scrolling: redraw
[ 0.370167] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
Quote:
$ lspci | grep 00:02.0
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
Back to top
View user's profile Send private message
Marcih
Apprentice
Apprentice


Joined: 19 Feb 2018
Posts: 213

PostPosted: Wed Nov 13, 2019 6:02 pm    Post subject: Re: efifb - set resolution Reply with quote

charles17 wrote:
Marcih wrote:
My current attempt:
Code:
$ dmesg | grep efifb
[    0.000000] Kernel command line: root=PARTUUID=[REDACTED] video=efifb:1920x1080x32
[    0.199859] efifb: probing for efifb
[    0.199867] efifb: framebuffer at 0xe0000000, mapped to 0xffffc90000400000, using 3072k, total 3072k
[    0.199871] efifb: mode is 1024x768x32, linelength=4096, pages=1
[    0.199944] efifb: scrolling: redraw
[    0.199947] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0

For comparison:
Quote:
$ dmesg | grep efifb
[ 0.253444] pci 0000:00:02.0: BAR 2: assigned to efifb
[ 0.370145] efifb: probing for efifb
[ 0.370161] efifb: framebuffer at 0xd0000000, using 8100k, total 8100k
[ 0.370163] efifb: mode is 1920x1080x32, linelength=7680, pages=1
[ 0.370165] efifb: scrolling: redraw
[ 0.370167] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
Quote:
$ lspci | grep 00:02.0
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)

Bah, dead end! :(
Code:
$ dmesg | grep efifb

EFI stub only and rEFInd
[    0.190760] efifb: probing for efifb
[    0.190769] efifb: framebuffer at 0xe0000000, mapped to 0xffffc90000400000, using 3072k, total 3072k
[    0.190773] efifb: mode is 1024x768x32, linelength=4096, pages=1
[    0.190776] efifb: scrolling: redraw
[    0.190778] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0

GRUB2
[    0.197737] efifb: probing for efifb
[    0.197745] efifb: framebuffer at 0xe0000000, mapped to 0xffffc90001000000, using 8640k, total 8640k
[    0.197750] efifb: mode is 1920x1080x32, linelength=8192, pages=1
[    0.197752] efifb: scrolling: redraw
[    0.197755] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0

_________________
Bones McCracker wrote:
It wouldn't be so bad, if it didn't suck.

NeddySeagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.
Back to top
View user's profile Send private message
Marcih
Apprentice
Apprentice


Joined: 19 Feb 2018
Posts: 213

PostPosted: Thu Nov 21, 2019 12:46 pm    Post subject: Reply with quote

Found the solution. I have an ASUS motherboard, which has the usual splash screen with "Press Del to enter setup" kind of thing. This seems to be somehow tied to the EFI FB - most of the time it displays in an ugly, stretched 1024x768.

In older firmware revisions, the way to get it set to the (I assume) native resolution of the screen would be to disable CSM and set the "Boot logo" setting (in "Boot options") to "Full Screen" (default is "Auto"). This changed in the most recent firmware update; you now need to leave it at "Auto", "Full Screen" sets the FB's resolution to 1024x768, which carries over when Linux boots.
I can now boot an EFI stub kernel and have the Linux console's resolution be full HD. Thanks for everybody's suggestions! :)
_________________
Bones McCracker wrote:
It wouldn't be so bad, if it didn't suck.

NeddySeagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.
Back to top
View user's profile Send private message
dantrell
l33t
l33t


Joined: 01 Jun 2007
Posts: 915
Location: Earth

PostPosted: Sun Jan 01, 2023 6:27 pm    Post subject: Reply with quote

Marcih wrote:
I have an ASUS motherboard [...]

I have two generations of ASUS motherboards.

In addition to almost everything here, I had to enable Above 4G Decoding which is off by default on the older one but enabled by default on the newer one with a recent BIOS update.

Without that, I was capped to 1024x768x32.
_________________
Dantrell B.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum