Clarification on splashimage usage??
msetzerii opened this issue · 20 comments
Have setup a flash image for my g4l project that includes legacy and uefi grub4dos as boot loader.
Had don't testing with booting both methods using Virtual Box and a few machines in Legacy mode, and a Dell computer that could boot in legacy or uefi mode and it worked fine.
Recently tried on an Acer Predator HELIOS 500 machine and ran into issue.
Using this at start of menu.lst the Acer shows the image, but menu text is not correct, and just entering fails to load options.
Removing the splashimage line has the menu display and work fine?
graphicsmode -1 800:600
splashimage /test.jpg
font /unifont.hex.gz
setmenu --auto-num-on
timeout 30
So, currently am creating flash image with legacy boot having splashscreen and uefi not..
Don't know if this is something with Acer graphics or what..
Did also notice on Acer dropping to command line and running help, it would sometimes cause screen to strange if running help multiple times to point it went beyond screen to roll. Doing clear and then help over and over had no issue.
Image isn't critical, but had tried to make it look like similar to previous syslinux boot setup.
Otherwise boot loader works great. Thanks.
Try removing the splash image. The motherboard may not support the GOP graphics output protocol, or the support is not good enough.
The thing is that if the splashimage line is there, it does correctly display the image, but the menu lines do not display correctly on the Acer Predator Helios 500 machine. Without the splashimage line it does display fine. In the virtualbox testing it works fine with both options. Not having the splashimage isn't a big deal, but was just wonder if there was more info on what might be causing it. Thanks for reply, and thanks for all the work.
What is the EXACT x and y dimensions of the splashimage you are using ?
800 x 600 27K size Just blue background with text in yellow near bottom.
https://sourceforge.net/projects/g4l Michael Setzer II
G4L mikes@guam.net
Displays with UEFI boot under Virtual Box
GRUB4DOS for_UEFI 2023-03-19 Mem: 530K/894M/0M, Free_mem_start: 0x0
Inside black box with blue line around it. Shows menu option
0 G4L - bz6x2.8 - Version 0.63 Deault Screen Resolution
1 G4L - bz6x3.rc3 - Releae Candiated Kernel Default Reolution
2 memtest 6.10
3 PreImage
4 Disclaim
5 Startup
6 Reboot
7 Switch Off
Under Virtual Box the menu displays fine with the splash image, and menu options work.
On Acer machine without splash screen menu option display and work, but with splashimage
Menu text doesn't show correct believe it shows same text but didn't copy it down. Can use arrow keys
and it is like moving thru options, but pressing enter or letting it time out to default option results in failure
message to load. So, corruption is happening on both the display of menu options and on what is passed to load.
Beginning of the uefi menu.lst is
graphicsmode -1 800:600
font /unifont.hex.gz
setmenu --auto-num-on
timeout 30
title G4L - bz6x2.8 - Version 0.63 Default Screen Resolution
find --set-root /linux/bz6x2.8
kernel /linux/bz6x2.8 root=/dev/ram0 telnetd=yes
initrd /linux/ramdisk.lzma
Next time I test on machine will have to note what graphic modes it goes into.
Thanks.
Can you test by converting the jpg to a .bmp file using MS Paint?
See if same issue or not (jpg will need to be decompressed in memory but bmp does not require it).
If the splash image is displayed it displays correctly, so decompression happens, but it might be it overwrites some menu used by text. The jpg is only 27K, but bmp would be 800 x 600 x 3 bytes per pixel so could be a much larger file.
1440054 bytes for bmp compared to 26983 bytes for jpg. Recall a version of the legacy grub4dos that didn't show image correctly, the update that corrected an offset got it working. Don't know if versions are completely different or have lots of overlaping code? Know when I added UEFI support for framebuffers versus the previous VGA only support it added 400 lines to .config file. but only about 400K to kernel build. In virtual box --info shows 257, but I think Acer shows 258??
Thanks for reply. Have made a bmp version, and will see.
Got more info, but not sure if it helps.
GRUB4DOS for_UEFI 2023-03-19, Mem: 632K/284M/15280M, Free_mem_start: 0x0
Shows menu with option 0 to 7 no issues if no splash screen
With splash image using graphics mode -1 800:600 (which gives 258)
Shows image, but Menu shows incorrect options.
First line show strange E1 character
Second line shows triangle pointing right
Third line shows $!
Lines 4 thru 8 show as blank then returns to top.
Entering or time does not work on any line.
Strangely found if I set option to -1 1280:800 It does show image and menu lines
somewhat correctly? Shows the 800:600 image correctly and menu lines show fine, but
space beyond 800 shows as random link colored dot patterns, as dos lines below 600.
Did also try using a bmp file instead of jpg file, but shows all 8 lines as blank,
and none still work. gives not found errors with a /27??
Again. I mode to 1280:800 it does image and options correctly, but stuff to right and
below is wierd.
Drop to Command and did graphicsmode --info and get.
GOP Video current_mode=258, physical_address=0x500000000, size=0x258000
MODE Resolution BitPixel RGBASize RGBAPos PixelScanline
266 1680x1050 32 8:8:8:8 16:08:00:24 2048
265 1400x1050 32 8:8:8:8 16:08:00:24 2048
264 1440x 900 32 8:8:8:8 16:08:00:24 2048
263 1366x 768 32 8:8:8:8 16:08:00:24 2048
262 1280x1024 32 8:8:8:8 16:08:00:24 2048
261 1280x 800 32 8:8:8:8 16:08:00:24 2048
260 1280x 720 32 8:8:8:8 16:08:00:24 2048
259 1024x 768 32 8:8:8:8 16:08:00:24 1024
258 800x 600 32 8:8:8:8 16:08:00:24 1024
257 640x 480 32 8:8:8:8 16:08:00:24 1024
256 1920x1080 32 8:8:8:8 16:08:00:24 2048
In Virtual Box it shows modes 274 to 256 and is similar, but
PixelScanlines always match with first number of Resolution??
Try to use 800 x 600, since not all systems have larger resolutions,
and since project uses Dialog to display no real advantage to having
higher value, and just makes text smaller.
So, why mode 260 doesn't scramble text but 258 does??
Perhaps someone would have a clue.
Under virtual box on another Acer machine it shows
GRUB4DOS for_UEFI 2023-03-19, Mem: 540K/894M/0M Free_mem_strt: 0x0
If you use a smaller graphics image then the unused video memory will be random.
All UEFI systems should support 1024 x 768
Only some old systems or those will small screens will need 800x600
You can perform a graphicsmode --info command first and see if 1024x768 is supported, before selecting graphics mode and bitmap.
If 800x600 and 1024x768 modes are not supported then use text mode.
graphicsmode --info > (md)0x300+10
set mode=800
cat --locate=1024x768 (md)0x300+10 && set mode=1024
(untested!)
P.S. I think your command 800:600 is incorrect. The colon specifies the allowed range
e.g. 800:1024 means a horizontal range of 800 up to 1024 is allowed (it will pick the highest available)
your 800:600 may not make much sense ???
I think you want to use
graphicsmode -1 800 600
This will pick the highest color mode (e.g. 32-bit) available in 800x600
graphicsmode -1 800 600 32
would set only 800x600x32
graphicsmode -1 800
would set highest res with 800 horizontal
The problem is basically positioned and needs to be addressed.
My Problem is I make and image file that is meant for anyone to download from the sourceforge page.
They then copy image to an usb flash and boot from it. Have no ideal what hardware they might have, so looking for best options. Right now looks like just dropping splashimage and using just text mode, but it seems to be using much larger than 800 600. Well have to do more testing. The virtual box video seems to give info that makes more sense, compared with the Acer that gives 2048 or 1024 for scanlines options.
Thanks again for all the comments and info.
have a try.
Still error, please take a screenshot.
BOOTX64.rar.txt
Did test making menu1.lst thru menu11.lst files
using graphicsmode -1 (first number of resolution)
except for multi-first numbers then graphicsmode -1 first second
MODE Resolution BitPixel RGBASize RGBAPos PixelScanline
1 266 1680x1050 32 8:8:8:8 16:08:00:24 2048
2 265 1400x1050 32 8:8:8:8 16:08:00:24 2048
3 264 1440x 900 32 8:8:8:8 16:08:00:24 2048
4 263 1366x 768 32 8:8:8:8 16:08:00:24 2048
5 262 1280x1024 32 8:8:8:8 16:08:00:24 2048
6 261 1280x 800 32 8:8:8:8 16:08:00:24 2048
7 260 1280x 720 32 8:8:8:8 16:08:00:24 2048
8 259 1024x 768 32 8:8:8:8 16:08:00:24 1024
9 258 800x 600 32 8:8:8:8 16:08:00:24 1024
10 257 640x 480 32 8:8:8:8 16:08:00:24 1024
11 256 1920x1080 32 8:8:8:8 16:08:00:24 2048
1,2,3,4,5,7,8 and 11 displayed image ok in top left corner of
screen but distorted graphics on right and lower lines.
Seems screen seems to show as PixelScanLines numbers?
6 and 9 shows image OK, but text is wierd, and no options work.
10 gave nothing but black screen with cursor in upper left corner.
On some modes had it run options that display a text file, but then
on return to menu background was distored text. But running another
option would display text ok, but back to distorted image.
Perhaps a clear command might work?
Retried test with the new BOOTX64.rar.txt extracted file.
All of the config files displayed image and text was not distorted on any of them.
The image was note shown as full screen on modes that had higher resolution,
But think that is because the PixelScanlines is comig with 2048.
But seems to fix the distorted text.
Screenshot! Or take a photo!
Your motherboard has a special display mode, which is difficult to encounter. No matter how detailed the text description is, it is not as clear as the photos.
With the new BOOTX64 above it displays image fine with graphicsmode -1 800
displays text screens and returns fine as well.
change the graphicsmode to just -1 with no size specified.
Attached screen is what came up first time. Did it another time, and it only showed the one image of menu in upper left?
Command line execution:
graphicsmode 259
Then return to the menu and take a picture.
Command line execution:
graphicsmode 257
Then return to the menu and take a picture.
Command line execution:
graphicsmode -1
Then enter the command line and execute
graphicsmode
Look at the number returned
“On some modes had it run options that display a text file, but then
on return to menu background was distored text. But running another
option would display text ok, but back to distorted image.
Perhaps a clear command might work?”
When there is a problem returning to the menu, take a picture.
What is the size of your background image?
That is all normal and expected.
If the image is not big enough then the graphics memory will not be written to and so whatever happens to be in the unwritten memory (from power up or from previous larger splashimage file or whatever) will be displayed in excess areas of screen.
So all is good :-)
Thanks