Announcement

Collapse
No announcement yet.

[solved] How to set grub2 graphics mode?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [solved] How to set grub2 graphics mode?

    OK, I give up. It's probably easy, but I can't find or figure it out:

    I can interrupt grub2 at the menu with the 'c' command, and run vbeinfo, which gives a bunch of hex numbers and corresponding video modes. But how do I actually get grub to use any of those modes, both from the grub cli, and from the grub.cfg generation process?

    Typing 'set vbe_mode=0x###' 'set gfxmode=0x###' or 'set gfxmode=1024x768' does nothing. So I am missing something very basic here.

    An example of something that works would be most helpful. Thanks.

    We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

    #2
    Re: How to set grub2 graphics mode?

    check /etc/default/grub and see if that helps.

    VINNY
    i7 4core HT 8MB L3 2.9GHz
    16GB RAM
    Nvidia GTX 860M 4GB RAM 1152 cuda cores

    Comment


      #3
      Re: How to set grub2 graphics mode?

      Have you looked at this:

      Reply #30 here:
      http://kubuntuforums.net/forums/inde...pic=3106368.30

      or this:
      http://members.iinet.net/%7Eherman54...ashimages.html
      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

      Comment


        #4
        Re: How to set grub2 graphics mode?

        Thanks for the info.

        check /etc/default/grub and see if that helps.
        Yes, that's where the setting for making grub.cfg is. Thanks for that.

        A very nice post for setting up background images, but...
        Code:
        * unless you know how to change the resolution in GRUB2, ( I don't know yet). 
        I tried a 1024x768 image and it worked but it cut off a lot of the bottom and right-hand 
        side of the picture.
        Oh well.

        The link to your howto is better, but the problem I have is this:
        When I run vbeinfo, I get output that looks like this (I am making these numbers up as an example only):
        Code:
        0x031   640x480x16 other stuff
        0x32   640x480x32 other stuff
        0x33   1024x796x8 other stuff
        0x43   1024x796x16 other stuff
        and so on.
        So how do I tell grub to run in 1024x796x16 mode (for example), when there does not appear to be an option for the hex number, or the color depth, in the GRUB_GFXMODE command? I can't find any more detailed documentation on how this setting works.


        We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

        Comment


          #5
          Re: How to set grub2 graphics mode?

          Sorry, I have no clue about any of the graphics stuff (with GRUB or with anything!). We'll have to wait for the Graphics Squad.
          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

          Comment


            #6
            Re: How to set grub2 graphics mode?

            I have a terrible feeling that it may not all be implemented yet.
            What I am really trying to accomplish is get smaller text size for the bootup process and CTRL-ALT-F# test screens. Changing the screen resolution in /etc/default/grub does in fact change the size of the boot screen, but it immediately reverts back to huge size after exiting the grub menu. I personally don't care much about usplash/splashy screens, but I would like the text screens to look somewhat better than crayon. Maybe this has to wait.
            We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

            Comment


              #7
              Re: How to set grub2 graphics mode?

              Originally posted by doctordruidphd
              So how do I tell grub to run in 1024x796x16 mode (for example), when there does not appear to be an option for the hex number, or the color depth, in the GRUB_GFXMODE command? I can't find any more detailed documentation on how this setting works.
              1. Edit /etc/default/grub
              Change
              #GRUB_GFXMODE=640x480
              to
              GRUB_GFXMODE=1024x796
              (uncomment, edit resolution)
              2. run update-grub

              (I have 1400x1050 grub on my laptop, and it works with just the resolution set, no need to define depth)

              Comment


                #8
                Re: How to set grub2 graphics mode?

                GRUB_GFXMODE=1024x796
                That works, as far as the gub menu is concerned, but it does not set any of the other vbe_mode parameters. And it does not set the size of the boot screen or text screens once grub exits (as legacy grub did). Maybe it's not supposed to?


                We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

                Comment


                  #9
                  Re: How to set grub2 graphics mode?

                  Originally posted by doctordruidphd
                  What I am really trying to accomplish is get smaller text size for the bootup process and CTRL-ALT-F# test screens. Changing the screen resolution in /etc/default/grub does in fact change the size of the boot screen, but it immediately reverts back to huge size after exiting the grub menu.
                  what graphics card do you have?

                  Full resolution consoles can usually be achieved with loading a video framebuffer module, or using the kernel modesetting that is available in some newer drivers (like radeon).

                  And you're right, grub resolution does not affect console resolution.

                  Comment


                    #10
                    Re: How to set grub2 graphics mode?

                    what graphics card do you have?
                    NVIDIA GeForce 9800 GT
                    Using NVIDIA-Linux-x86_64-190.36-pkg2.run driver (most recent beta)



                    We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

                    Comment


                      #11
                      Re: How to set grub2 graphics mode?

                      I don't have much experience with the propietary nvidia drivers, but first you could try putting the 'nvidiafb' module into /etc/modules (to test it), and after testing you could include the module in your initramfs to load it as early as possible (http://epsilonprecision.com/?option=...ials&Itemid=53)

                      Notes: For more information, good search keywords include "vesafb" "nvidiafb" "framebuffer" etc.

                      Comment


                        #12
                        Re: How to set grub2 graphics mode?

                        OK, I'll look into that.

                        Part of the answer is here:

                        http://forums.debian.net/viewtopic.php?f=5&t=41881

                        which discusses the use of the "set gfxpayload" command in grub.cfg

                        Now all I am getting when I use that is a blank screen (that's progress?) but I suspect that I need to add the framebuffer module for it to work. I will experiment and report back.

                        Edit:
                        I've been working on this, with enough reboots to fsck everything on my system at least 3 times. I've had no luck -- what happens when I use the gfxpayload command is I wind up with a black screen where text should be, and CTRL-ALT-F2 (etc) gives a graphic mess screen.

                        It is worth noting that this is exactly the same behavior I had with grub legacy, when I switched to the -.31 kernels. I noticed that if I set up grub.cfg with the gfxpayload=keep option mentioned in one of kubicle's links, I get the black screen, but if I load vesafb (not nvidiafb, which seems to do nothing), then I can get an improved resolution text screen AFTER the system is running, and during shutdown. But this does not work if either vesafb or nvidiafb are loaded into the initramfs. So I don't know, maybe there are some site-specific problems here. It would be interesting if someone else would try this, and see if it fixes the text screens for him/her. In the threads in the links, folks say it works, but they don't mention their kernel versions.

                        To test this, what one needs to do is this:
                        Disclaimer: Don't do any of this unless you are one of the "If it kills my system, I will become more powerful than you can imagine" types. And make backups of the relevant files, and you may want to make notes of what you change, so you can change it back, possibly from the recovery console.
                        1. From the grub2 boot menu, do a 'c' to escape to the command line. Then type 'vbeinfo'. This should show you what graphics modes are available. It goes by fast, so you may have a tough time finding them. See if something like 1024x796x16 is available.
                        An alternative to this process is to install the 'hwinfo' package, and run the command:
                        Code:
                        sudo hwinfo --framebuffer
                        2. Edit your /etc/grub.d/00_header file. Find the lines that look like this:
                        Code:
                        if loadfont `make_system_path_relative_to_its_root ${GRUB_FONT_PATH}` ; then
                         set gfxmode=${GRUB_GFXMODE}
                         insmod gfxterm
                         insmod ${GRUB_VIDEO_BACKEND}
                        and after the "set gfxmode" line add:
                        Code:
                        set gfxpayload=keep
                        What this does is keep the graphics mode you set for grub as the text mode for your consoles.

                        3. Edit your /etc/default/grub file. Change the line that contains "GRUB_GFXMODE" to one of the graphics modes you found in (1) above.

                        4. Edit your /etc/initramfs-tools/modules file. If you are running the proprietary NVIDIA driver, you can add the 'nvidiafb' module. Alternatively you could try the 'vesafb' module.

                        5. Run the following commands to lock in the changes you have made:
                        Code:
                        sudo initramfs-update -u
                        sudo update-grub
                        6. Hold your breath and reboot. If you get nothing but a black screen, tapping the enter key a couple of times might bring the kdm greeter up. If you can get in, then try CTRL-ALT-F2 and see if you can get a text console. You may need to experiment with different graphics resolutions in (3) above, running update-grub after each change.

                        Well, this didn't work for me, but it would be interesting to see if it works for anyone. It may be a kernel issue after all, or it may be a site-specific problem.
                        We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

                        Comment


                          #13
                          Re: How to set grub2 graphics mode?

                          Further comment:
                          What I really don't understand is that sidux uses -31 kernels, and high-res text screens work there. As I am booting off karmic's grub-pc, it has nothing to do with grub. I haven't figured out how to take their initramfs apart to see how they did it. I am also sure it has nothing to do with the NVIDIA proprietary driver, as this comes into play before that is loaded, and even if it isn't loaded. Could be a different kernel build, but I suspect a configuration issue is more likely.
                          We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

                          Comment


                            #14
                            Re: How to set grub2 graphics mode?

                            Hi all.
                            (This is my first post. Sorry my poor English, I'm Portuguese)

                            Have you tried startupmanager?

                            Perhaps it helps.

                            Comment


                              #15
                              Re: How to set grub2 graphics mode?

                              Have you tried startupmanager?
                              I just tried it, and it works. Thank You for the tip.

                              It works by adding a vga=791 command to the kernel line.
                              I was led to believe that this wasn't supposed to be done in the current grub/kernel configuration, but it works. So we'll leave it at that.

                              Now to try usplash...
                              We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

                              Comment

                              Working...
                              X