Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Grub2 and framebuffer

Linux Kernel, Network, and Services configuration.
Message
Author
User avatar
vortex7
Posts: 1
Joined: 2009-12-30 07:17
Location: Athens, Greece

Re: Grub2 and framebuffer

#16 Post by vortex7 »

In order not to have problems on upgrades, to set the console graphics mode,
I considered this as a customization and added the following lines at the end of
/etc/grub.d/40_custom

Code: Select all

# Set console mode (equivalent to kernel parameter vga=791)
  set gfxpayload=1024x768x16
and it works perfect [after an update_grub]

Other vga mode numbers mappings can be found in
http://en.wikipedia.org/wiki/VESA_BIOS_Extensions
under the "Linux video mode numbers" section.

My grub2 version is 1.98~20091229-1

Famelis George
Debian Sid ;-) with KDE 4

User avatar
dbbolton
Posts: 2129
Joined: 2007-06-20 08:17
Location: Iapetus

Re: Grub2 and framebuffer

#17 Post by dbbolton »

jheaton5 wrote:GFXPAYLOAD is supported by grub 1.97

Do not edit /boot/grub/grub.cfg.

In /etc/default/grub find the line:

Code: Select all

GRUB_GFXMODE=1440x900@32
underneath that line insert:

Code: Select all

GRUB_GFXPAYLOAD=1440x900x32
then in /etc/grub.d/00_header find the line:

Code: Select all

if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=1440x900x32 ; fi
then insert

Code: Select all

if [ "x${GRUB_GFXPAYLOAD}" = "x" ] ; then GRUB_GFXPAYLOAD=1440X900x32 ; fi
below it.
In the same file, but farther down the page, find the line:

Code: Select all

set gfxmode=${GRUB_GFXMODE}
insert below that line:

Code: Select all

set gfxpayload=${GRUB_GFXPAYLOAD}
Now run

Code: Select all

 # update-grub2
Substitute your own screen resolution for mine.
Thanks for sharing this. It worked perfectly with my laptop, but not on my desktop, due to my own negligence:

Code: Select all

 grep -n GFX /etc/grub.d/00_header 
38:if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=1440x900x32 ; fi
39:if [ "x${GRUB_GFXPAYLOAD}" = "x" ] ; then GRUB_GFXPAYLOAD=1440X900x32 ; fi
81:  set gfxmode=${GRUB_GFXMODE}
82:  set gfxpayload=${GRUB_GFXPAYLOAD}
 
It took me a minute or two to spot it.
GitHub | zsh docs in Letter PDF
Telemachus wrote:Put down the CGI.

Jack450
Posts: 6
Joined: 2010-01-16 18:33

Re: Grub2 and framebuffer

#18 Post by Jack450 »

Can anyone help me with this problem too I've follow the steps to getting the Virtual Console to change resolution but I'm still getting the same low resolution. My grub changed to 1440x900 but not the Console when I press Ctrl+Alt+F2, does anyone know what I'm doing wrong?

User avatar
dbbolton
Posts: 2129
Joined: 2007-06-20 08:17
Location: Iapetus

Re: Grub2 and framebuffer

#19 Post by dbbolton »

Jack450 wrote:Can anyone help me with this problem too I've follow the steps to getting the Virtual Console to change resolution but I'm still getting the same low resolution. My grub changed to 1440x900 but not the Console when I press Ctrl+Alt+F2, does anyone know what I'm doing wrong?
Look for errors like I did

Code: Select all

grep -n GFX /etc/default/grub

grep -n GFX /etc/grub.d/00_header
You should see something like

Code: Select all

16:GRUB_GFXMODE=1024x768x32
17:GRUB_GFXPAYLOAD=1024x768x32
and

Code: Select all

38:if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=1024x768x32 ; fi
39:if [ "x${GRUB_GFXPAYLOAD}" = "x" ] ; then GRUB_GFXPAYLOAD=1024x768x32 ; fi
81:  set gfxmode=${GRUB_GFXMODE}
82:  set gfxpayload=${GRUB_GFXPAYLOAD}
only "1440x900x32" in your case.
GitHub | zsh docs in Letter PDF
Telemachus wrote:Put down the CGI.

User avatar
Raffles10
Posts: 191
Joined: 2008-12-09 16:36
Location: London, UK

Re: Grub2 and framebuffer

#20 Post by Raffles10 »

Jack450 wrote:Can anyone help me with this problem too I've follow the steps to getting the Virtual Console to change resolution but I'm still getting the same low resolution. My grub changed to 1440x900 but not the Console when I press Ctrl+Alt+F2, does anyone know what I'm doing wrong?
All I had to do was:

edit: /etc/grub.d/00_header

From line 81 you need to add 'set gfxpayload=keep' to show:

if loadfont `make_system_path_relative_to_its_root ${GRUB_FONT_PATH}` ; then
set gfxmode=${GRUB_GFXMODE}
set gfxpayload=keep
insmod gfxterm

Then edit: /etc/default/grub

# 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=1440x900x32

and then:

Code: Select all

$ sudo update-grub
Debian Squeeze + KDE 4.4.4 + AMD Athlon™ 64 X2 Dual Core Processor 6000 + nVidia GeForce 8600

Jack450
Posts: 6
Joined: 2010-01-16 18:33

Re: Grub2 and framebuffer

#21 Post by Jack450 »

Wow that was quick, don't go anymore I'm going to test this XD

Jack450
Posts: 6
Joined: 2010-01-16 18:33

Re: Grub2 and framebuffer

#22 Post by Jack450 »

Damn, it didn't change anything I'm still getting the same result.

Jack450
Posts: 6
Joined: 2010-01-16 18:33

Re: Grub2 and framebuffer

#23 Post by Jack450 »

dbbolton wrote:
Jack450 wrote:Can anyone help me with this problem too I've follow the steps to getting the Virtual Console to change resolution but I'm still getting the same low resolution. My grub changed to 1440x900 but not the Console when I press Ctrl+Alt+F2, does anyone know what I'm doing wrong?
Look for errors like I did

Code: Select all

grep -n GFX /etc/default/grub

grep -n GFX /etc/grub.d/00_header
You should see something like

Code: Select all

16:GRUB_GFXMODE=1024x768x32
17:GRUB_GFXPAYLOAD=1024x768x32
and

Code: Select all

38:if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=1024x768x32 ; fi
39:if [ "x${GRUB_GFXPAYLOAD}" = "x" ] ; then GRUB_GFXPAYLOAD=1024x768x32 ; fi
81:  set gfxmode=${GRUB_GFXMODE}
82:  set gfxpayload=${GRUB_GFXPAYLOAD}
only "1440x900x32" in your case.
Hmm When I type "grep -n GFX /etc/grub.d/00_header" I'm missing "82: set gfxpayload=${GRUB_GFXPAYLOAD}".

User avatar
dbbolton
Posts: 2129
Joined: 2007-06-20 08:17
Location: Iapetus

Re: Grub2 and framebuffer

#24 Post by dbbolton »

Jack450 wrote:Hmm When I type "grep -n GFX /etc/grub.d/00_header" I'm missing "82: set gfxpayload=${GRUB_GFXPAYLOAD}".
Then that's your problem.
jheaton5 wrote:then in /etc/grub.d/00_header find the line:

Code: Select all

if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=1440x900x32 ; fi
then insert

Code: Select all

if [ "x${GRUB_GFXPAYLOAD}" = "x" ] ; then GRUB_GFXPAYLOAD=1440X900x32 ; fi
below it.
In the same file, but farther down the page, find the line:

Code: Select all

set gfxmode=${GRUB_GFXMODE}
insert below that line:

Code: Select all

set gfxpayload=${GRUB_GFXPAYLOAD}
GitHub | zsh docs in Letter PDF
Telemachus wrote:Put down the CGI.

Jack450
Posts: 6
Joined: 2010-01-16 18:33

Re: Grub2 and framebuffer

#25 Post by Jack450 »

dbbolton wrote:
Jack450 wrote:Hmm When I type "grep -n GFX /etc/grub.d/00_header" I'm missing "82: set gfxpayload=${GRUB_GFXPAYLOAD}".
Then that's your problem.
jheaton5 wrote:then in /etc/grub.d/00_header find the line:

Code: Select all

if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=1440x900x32 ; fi
then insert

Code: Select all

if [ "x${GRUB_GFXPAYLOAD}" = "x" ] ; then GRUB_GFXPAYLOAD=1440X900x32 ; fi
below it.
In the same file, but farther down the page, find the line:

Code: Select all

set gfxmode=${GRUB_GFXMODE}
insert below that line:

Code: Select all

set gfxpayload=${GRUB_GFXPAYLOAD}
I switched it out but it didn't work either.

User avatar
dbbolton
Posts: 2129
Joined: 2007-06-20 08:17
Location: Iapetus

Re: Grub2 and framebuffer

#26 Post by dbbolton »

Jack450 wrote:I switched it out but it didn't work either.
You don't need to switch anything. You need to add the line.
GitHub | zsh docs in Letter PDF
Telemachus wrote:Put down the CGI.

Jack450
Posts: 6
Joined: 2010-01-16 18:33

Re: Grub2 and framebuffer

#27 Post by Jack450 »

dbbolton wrote:
Jack450 wrote:I switched it out but it didn't work either.
You don't need to switch anything. You need to add the line.
It was first "set gfxpayload=${GRUB_GFXPAYLOAD}"
but I followed what Raffles10 said and switched it to
"set gfxpayload=keep" either way both do not change the resolution on the Virtual Console.

User avatar
un1xer
Posts: 76
Joined: 2007-03-14 22:03
Location: 127.0.0.1

Re: Grub2 and framebuffer

#28 Post by un1xer »

Hi, sorry for waking this old thread but it seemed there was no point in starting a new one.
So, unfortunately none of the above works for me, I used to set my FB resolution by editing
/boo/grub/grub.cfg with:

Code: Select all

set gfxpayload=1680x1050x32
now it does't seem to work any more.
The changelog of the latest update v1.98-1 of grub-pc says that it now has support GRUB_GFXPAYLOAD_LINUX, how is one supposed to use this?
Thanks for any help you can provide on this.
Debian Squeeze/Sid mixed system
2.6.32 amd64

User avatar
llivv
Posts: 5340
Joined: 2007-02-14 18:10
Location: cold storage

#29 Post by llivv »

.
Last edited by llivv on 2019-04-27 13:17, edited 1 time in total.
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.

User avatar
un1xer
Posts: 76
Joined: 2007-03-14 22:03
Location: 127.0.0.1

Re: Grub2 and framebuffer

#30 Post by un1xer »

All I get is a black screen, after gdm starts and doing Ctrl+Alt+F1 gets me a also a black screen, sometimes there is the Debian boot loader logo all distorted.
So, X starts fine, is just the frame buffer that gets unusable.
If I set al to defaults I get the normal 640x480 frame buffer. :(
Debian Squeeze/Sid mixed system
2.6.32 amd64

User avatar
llivv
Posts: 5340
Joined: 2007-02-14 18:10
Location: cold storage

#31 Post by llivv »

.
Last edited by llivv on 2019-04-27 13:17, edited 1 time in total.
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.

User avatar
un1xer
Posts: 76
Joined: 2007-03-14 22:03
Location: 127.0.0.1

Re: Grub2 and framebuffer

#32 Post by un1xer »

Are you using them your self?
My graphics card is an nvidia 9300gs on a laptop.
Debian Squeeze/Sid mixed system
2.6.32 amd64

User avatar
llivv
Posts: 5340
Joined: 2007-02-14 18:10
Location: cold storage

#33 Post by llivv »

.
Last edited by llivv on 2019-04-27 13:17, edited 1 time in total.
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.

User avatar
m_l
Posts: 58
Joined: 2008-04-27 11:28

Re: Grub2 and framebuffer

#34 Post by m_l »

After a recent update to grub-pc [1.98-1] you can set the framebuffer resolution with the following option in:

/etc/default/grub:

Code: Select all

GRUB_GFXPAYLOAD_LINUX=tty/console-resolution
Just use the resolution you will like to use of course, for example:

Code: Select all

 # Set the framebuffer resolution; used on tty/console [text consoles]
GRUB_GFXPAYLOAD_LINUX=1920x1200
After editing, make sure to create a new /boot/grub/grub.cfg to use the option above:

Code: Select all

# update-grub2
So if you are using this version or newer, the previous steps are not needed any more. Just do the above.

User avatar
m_l
Posts: 58
Joined: 2008-04-27 11:28

Re: Grub2 and framebuffer

#35 Post by m_l »

When I used the nvidia driver, installed using the wiki instructions. I had to add the following to /etc/modules for framebuffer to work right:

Code: Select all

nvidiafb
I now use the nv driver and the above is still there, not sure if it's needed with nv. But I still have nvidiafb there and all works fine.

Post Reply