1

Topic: Display resolution/framebuffer problem

I do use my own custom menu on a ISB drive boot (and also from an internal hard drive).  The newest version however is giving my a hard time displaying the way I want it to.  Just going to deal with the To RAM option (solve that I most likely have the answer to the rest).

The system is a build your own - Asus Strix Z27E Gaming Motherboard, Intel G7 CPU 32GB RAM, Nvidia Geforce GTX 1060 Video Card.

The menuentry (Grub) I have been using is:

menuentry "GParted Live to RAM mode"{
   gfxpayload=1280x1024
    search --no-floppy --fs-uuid --set=root 5f59ec53-00a7-4470-aa5a-ae3c984e3480
    set home=$root
  linux /live/vmlinuz live-media=/dev/sdb4 boot=live union=overlay username=user config components noswap  toram=filesystem.squashfs net.ifnames=0  nomodeset nosplash
  initrd /live/initrd.img
}


That now bombs out "Can not run in framebuffer mode"  now the point is to force and hold a display resolution of 1280x1024 - remove the nomodeset and yes it works, BUT the resolution is WAY to high to even read (4k TV as monitor).
Also have put in xorg-driver=vesa BUT with that once GParted starts, the resolution is 1024x768 so, just how do I set to 1280x1024 and keep it through boot Up right in to starting GParted?

2

Re: Display resolution/framebuffer problem

Well, still not EXACTLY the way I wanted it, but I got it to "work" as far as starting with the screen resolution I want.  For some reason xorg-resolution= did not do the trick either...

I ended up extracting (from the GParted live files) - /live/filesystem.squashfs

In the extracted files create ../usr/bin/SetRes

#!/bin/bash
#
# Set name of desplay device to use (change it if yours is differant).
scrname=HDMI-1
#
# Try to get screen resolution from boot parameters
res=$(cat /proc/cmdline)
res="${res##*resolution=}"
res="${res%% *}"
#
# If it is there, attempt to set it
if [ ! -z "$res" ]
then
    # Attempt to set specified resolution
    xrandr --output $scrname --mode $res
fi

Also in the extracted files edit ../usr/bin/startfluxbox

Find the line:

# Debian-local change:

and just before it add:

#
# Set screen resolution
SetRes &
#

Now re-make the GParted live filesystem.squashfs file frome the extracted and altered/added ones
Copy that to the GParted live disk under the /live folder (replacing the original one)

Now for the GRUB menu entry (as mentioned above)

menuentry "GParted Live to RAM mode"{
   gfxpayload=1280x1024
    search --no-floppy --fs-uuid --set=root 5f59ec53-00a7-4470-aa5a-ae3c984e3480
    set home=$root
  linux /live/vmlinuz live-media=/dev/sdb4 boot=live union=overlay username=user config components noswap  toram=filesystem.squashfs net.ifnames=0 gl_batch keyboard-layouts=us locales=en_US resolution=1280x1024 nosplash
  initrd /live/initrd.img
}

That DOSE work...

3

Re: Display resolution/framebuffer problem

Thank you for reporting back with how you worked around the issue.  This may be helpful to others searching for answers to a similar question.

4

Re: Display resolution/framebuffer problem

I will be updating the SetRes script soon to allow user to specify a display device from the boot options shortly.

Also, not sure yet (have to test it) - but might run that script from a different file.

5

Re: Display resolution/framebuffer problem

SetRes script has been updated!

There were some problems with it that I didn't notice until I started attempting to add to it (mostly just in too much of a rush I guess...)  The new one still holds a default display name, but that default can be changed with the boot argument screen=

The updated SetRes script is:

#!/bin/bash
#
# Set default screen name (to use if no screen is specified in the boot parameters).
scrndefault="HDMI-1"
#
# Get screen name to use from boot parameters
scrname=$(cat /proc/cmdline)
scrname="${scrname##*screen=}"
scrname="${scrname%% *}"
if [ "${scrname}" == 'BOOT_IMAGE=/live/vmlinuz' ]
then
    scrname=''
fi
#
# If no screen name was specified in boot options,
# use the default screen name.
if [ -z "$scrname" ]
then
    scrname="$scrndefault"
fi
#
# Get screen resolution from boot parameters
res=$(cat /proc/cmdline)
res="${res##*resolution=}"
res="${res%% *}"
if [ "${res}" == 'BOOT_IMAGE=/live/vmlinuz' ]
then
    res=''
fi
#
# If we have a screen name and resolution - try to set it,
# and make it the primary display..
# Otherwise do nothing...
if [ ! -z "$scrname" ] && [ ! -z "$res" ]
then
    xrandr --output $scrname --primary
    xrandr --output $scrname --mode $res
fi

And since my display is HDMI-1 the old grub entry will still work - be to specify a display using the grub entry example I have been it would be:

menuentry "GParted Live to RAM mode"{
   gfxpayload=1280x1024
    search --no-floppy --fs-uuid --set=root 5f59ec53-00a7-4470-aa5a-ae3c984e3480
    set home=$root
  linux /live/vmlinuz live-media=/dev/sdb4 boot=live union=overlay username=user config components noswap  toram=filesystem.squashfs net.ifnames=0 gl_batch keyboard-layouts=us locales=en_US screen=HDMI-1 resolution=1280x1024 nosplash
  initrd /live/initrd.img
}

6

Re: Display resolution/framebuffer problem

Thank you New_World_Man for the updated information.