[Bug 778350] New: grub2 text difficult to read
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c0 Summary: grub2 text difficult to read Classification: openSUSE Product: openSUSE 12.2 Version: Final Platform: Other OS/Version: openSUSE 12.2 Status: NEW Severity: Normal Priority: P5 - None Component: Bootloader AssignedTo: jsrain@suse.com ReportedBy: alinm.elena@gmail.com QAContact: jsrain@suse.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1226.0 Safari/537.4 SUSE/22.0.1226.0 Hi, when grub2 is used with the opensuse branding, the console that appears after a boot option was selected uses a gray shade for font which on the green background of the theme is unreadable... * if things go as expected there is not too much to worry about... Unfortunately is an error appears makes reading the message difficult. * if one tries to edit the boot parameters of the selected option the opened console has the same issue... gray shadow on green, close to impossible to read. for the second issue a possible solution (found by Ilmentar on irc) is the branding package for grub2 to provide a file like. [alin@abbaton:~]: cat /etc/grub.d/42_openSUSE #!/bin/sh cat <<EOF set color_normal=white/black EOF Unfortunately this solves only the second issue.. Reproducible: Always Steps to Reproduce: 1. 2. 3. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c1 Stanley Miller <suse@stanmiller.info> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |suse@stanmiller.info --- Comment #1 from Stanley Miller <suse@stanmiller.info> 2012-09-01 17:47:46 MST --- Related possibly duplicate bug with photo: 776244 https://bugzilla.novell.com/show_bug.cgi?&id=776244 I tried the suggested solution but it did not work for me, I may have done something wrong though. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c2 --- Comment #2 from Alin M Elena <alinm.elena@gmail.com> 2012-09-02 08:13:20 UTC --- what did not work? Alin -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c3 --- Comment #3 from Stanley Miller <suse@stanmiller.info> 2012-09-02 07:37:28 MST --- As root I created the file: /etc/grub.d/42_openSUSE Inserted the text: #!/bin/sh cat <<EOF set color_normal=white/black EOF Changed the mode to match the other files in the directory. Rebooted and brought up the Grub2 edit screen, the text color did not change from gray to black. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c4 --- Comment #4 from Alin M Elena <alinm.elena@gmail.com> 2012-09-02 15:42:18 UTC --- of course you did not rebuild the cfg file... to rebuild the grub2 menu depending on which grub2 you use for example for me and efi is something like this grub2-efi-mk grub2-efi-mkconfig -o /boot/grub2-efi/grub.cfg for grub2 you may need to remove -efi the font will change from gray to white and only for the terminal... that means when you try to edit the options... Alin -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c Jiri Srain <jsrain@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|jsrain@suse.com |mchang@suse.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c5 --- Comment #5 from Michael Chang <mchang@suse.com> 2012-09-03 07:19:21 UTC --- Hi Alin, We revert the background to mono-colored black in GM release, at least user could read the characters in edit mode without difficulties. The problems remains is that people complains about it's ugly to use a black background. (However it's good to hear that you found a way to set the color of fonts .. I tried to do that but not worked :)) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c6 --- Comment #6 from Alin M Elena <alinm.elena@gmail.com> 2012-09-03 07:41:10 UTC --- Dear Michael? did you try to rebuild the cfg file after adding the 42_custom file? works perfectly for me. I find returning to mono... a bad idea... makes grub to look unpolished... and we had all this delay exactly for that. Alin -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c7 --- Comment #7 from Michael Chang <mchang@suse.com> 2012-09-03 08:16:45 UTC --- (In reply to comment #6)
Dear Michael?
did you try to rebuild the cfg file after adding the 42_custom file? works perfectly for me.
I've tried. By adding that line to /boot/grub2/custom.cfg simply works. :) I remembered tried that set color_normal= when investigating this but not worked. I was adding it to /boot/grub2/grub.cfg in the very first beginning. Probably it has to be set after the theme gets loaded.
I find returning to mono... a bad idea... makes grub to look unpolished... and we had all this delay exactly for that.
The reason that GRUB_BACKGROUND gets revert is not only this. The other potential issue is that the background is not really stretched or cropped as we would expect and though hard to get consistent view on difference resolution, if you change to use other background with centered logo you may notice the difference easily. It's not easy observe by our default background (and it's not obvious too to use it to set the gfx theme's background, not mentioned in doc nor elsewhere). Thanks, Michael
Alin
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c8 --- Comment #8 from Michael Chang <mchang@suse.com> 2012-09-03 08:29:27 UTC --- (In reply to comment #7)
The reason that GRUB_BACKGROUND gets revert is not only this.
To be clear I meant that GRUB_BACKGROUND used together with GRUB_THEME. In this case we suppose it applies to the editor window. (If GRUB_BACKGROUND alone works fine and it's supposed to apply to boot menu entirely). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c9 --- Comment #9 from Alin M Elena <alinm.elena@gmail.com> 2012-09-03 08:53:40 UTC --- Hi Michael, customizing elements and then letting some to default looks bad... I agree with you that from the accessibility point of view using an image a background for console like elements so what I propose is to get for the two elements in discussion... the window on which the echo messages are printed and the terminal... a solid greenish background that matches the theme... I know all this exercise is futile for 12.2 but we can learn the lessons for 12.3 you can find me in irc if you want to debug things on why 42_custom does not work. (opensuse-factory, -kde with alin) Alin -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c10 --- Comment #10 from Alin M Elena <alinm.elena@gmail.com> 2012-09-03 10:54:19 UTC --- ok.. I did a little bit more digging... I will summarise my findings... 1. the log console and the terminal shall have a solid background...consistent with the theme's colour scheme... to do that... change terminal-background.png to the solid colour you want... and then edit /etc/default/grub GRUB_BACKGROUND=/boot/grub2/themes/openSUSE/terminal-background.png 2. colour of the fonts. i) terminal... cat /etc/grub.d/42_openSUSE #!/bin/sh cat <<EOF set color_normal=yellow/black EOF grub2-mkconfig -o /boot/grub2/grub.cfg ii) colour for the log console... this is trickier... in the grub.cfg in the menuentry one needs to add set color_normal after set root.. in my case set root='hd0,msdos7' set color_normal=yellow/black unfortunately I did not find a way to make this persistent via /etc/grub.d/10_linux and it works as expected... I added the terminal-background.png too. Alin -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c11 --- Comment #11 from Alin M Elena <alinm.elena@gmail.com> 2012-09-03 10:55:23 UTC --- Created an attachment (id=504289) --> (http://bugzilla.novell.com/attachment.cgi?id=504289) terminal background solid colour -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c12 --- Comment #12 from Alin M Elena <alinm.elena@gmail.com> 2012-09-03 15:39:12 UTC --- I digged even more... I see in factory that 00_headers was changed to practically ignore the GRUB_BACKGROUND variable... I think that is wrong...and shall be reversed... if one does not want a background image for the terminal shall not specify one... GRUB_BACKGROUND affects only the log console and the terminal.. not the background of the window... which is specified in the theme... Alin -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c13 --- Comment #13 from Michael Chang <mchang@suse.com> 2012-09-04 07:55:10 UTC --- Hi Alin, First thank you for investigate this issue. That patch was reverted with reasons that we are not sure the usage is correct(original(upstream) scrip only allow you to set either theme or background at a time .. but not both), and the test result is not satisfactory(the background not scaled or stretched as expected, which is the major concern as the end result is not identical across all the resolution .. and we have to pick the background carefully to not easily expose the defect in the future we change branding). I just looked again the grub2's source. Use GRUB_BACKGROUND to set terminal's window may NOT be abuse .. The theme's init_terminal() eventually use redraw_screen_rect() to draw the terminal contents, which is a common function with gfxterm (and which in turn honors the settings of GRUB_BACKGROUND .. set color_normal=... and so on). However, the problem is obvious, at least two problem . 1. There's only one global instance of background image buffer (bitmap) which is scaled well to fit the "full screen" width and height. So when it displays on smaller terminal window, the background image get "cropped" with only part of the upper left area displayed and not pre-dict-able result (depends on you display size the actual area may change) 2. Theme defines the terminal-box "center" decoration image .. it would be scale well to the box's width and height, but it was re-paint over by the pixmap or default terminal background color. I'll try if I could resolve them (and not too hackish). Before we fix this I think reviving that patch is with concerns (we may have to do that .. but we have to aware of the problems it has) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c14 --- Comment #14 from Michael Chang <mchang@suse.com> 2012-09-06 10:53:13 UTC --- (In reply to comment #10)
ii) colour for the log console... this is trickier...
This is bug and the trick could be avoided. I have a patch for it and will attach it later. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c15 --- Comment #15 from Michael Chang <mchang@suse.com> 2012-09-06 11:26:51 UTC --- Created an attachment (id=504680) --> (http://bugzilla.novell.com/attachment.cgi?id=504680) patch to fix terminal-box's cernter image not corretly draw This patch fixes the terminal-box's center image (background) not draw|update when the terminal window's dirty area updates. This would cause a problem that a (ugly looked) black background [1] would be displayed, if GRUB_BACKGROUND not set an image background for it. The layer would look sth like this -- font's background (set by color_normal=while/black (black is transparent)) -- -- menu background (set by GRUB_BACKGROUND=) -- -- terminal-box's background (set in theme.txt, terminal-box: "terminal_*.png" ) In other words, terminal_c.png would be displayed on terminal window as background if not shadowed by menu's background and font's bg color is black. The result would be a better look and consistency view as the background are scaled correctly and seamless with it's decorations (compared with backgrounds set by GRUB_BACKGROUND=) [1] "black" is used as a transparent color (aka color key) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c16 --- Comment #16 from Alin M Elena <alinm.elena@gmail.com> 2012-09-06 11:39:46 UTC --- is the patch in factory? shall the theme supply an entry for color_normal, via the 42_x in my example? would that also change the font for the log console (log console is also used to display error messages so it is important to be easily read)? this shall be pushed as an update to 12.2? Alin -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c17 --- Comment #17 from Michael Chang <mchang@suse.com> 2012-09-06 11:43:09 UTC --- Created an attachment (id=504686) --> (http://bugzilla.novell.com/attachment.cgi?id=504686) fix the font color get erroneously reset The font color should not reset, instead it should be persist. This made user's setting not erroneously discarded. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c18 --- Comment #18 from Michael Chang <mchang@suse.com> 2012-09-06 11:51:33 UTC --- Hi Alin, No. The patch is not in factory. You could try the package in my home project. home:michael-chang:bnc778350/grub2 You could use osc getbinaries or download from the repo (just make it published, so may need some time to sync) Sorry a bit late in my time zone, I must head to home, and if you have any questions/problems please leave comment here. :) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c19 --- Comment #19 from Michael Chang <mchang@suse.com> 2012-09-06 11:57:03 UTC --- (In reply to comment #16)
shall the theme supply an entry for color_normal, via the 42_x in my example?
Yes. But I think it should be part of -branding ..
would that also change the font for the log console (log console is also used to display error messages so it is important to be easily read)?
Yes. (but don't need the trick anymore) ;)
this shall be pushed as an update to 12.2?
If the test went positive .. why not. :) Please also try copy background.png to terminal_c.png and see any difference ? (You could on|off the GRUB_BACKGROUND at the same time to compare the result) Thanks.
Alin
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c20 Michael Chang <mchang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |alinm.elena@gmail.com --- Comment #20 from Michael Chang <mchang@suse.com> 2012-09-06 11:57:47 UTC --- Alin, Set needinfo to you, thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c21 Alin M Elena <alinm.elena@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|alinm.elena@gmail.com | --- Comment #21 from Alin M Elena <alinm.elena@gmail.com> 2012-09-10 12:31:01 UTC --- Hi Michael, Sorry for the delay finally I got the time to test it. Unfortunately no success... I use grub2-efi maybe that is the problem... Did you apply your patches to both grub2 and grub2-efi? Alin -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c22 --- Comment #22 from Alin M Elena <alinm.elena@gmail.com> 2012-09-10 12:31:33 UTC --- and by the way I do the testing on factory. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c23 --- Comment #23 from Alin M Elena <alinm.elena@gmail.com> 2012-09-11 08:49:01 UTC --- once 779534 was solved things are working now... I have tested your patch and seems to work... This is great it will permit more creative freedom to the branding team. Alin -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c24 --- Comment #24 from Michael Chang <mchang@suse.com> 2012-09-11 09:17:38 UTC --- Alin, Yes, the patch should work on both grub and grub2-efi. The repo URL with above two patch is below http://download.opensuse.org/repositories/home:/michael-chang:/bnc778350/sna... Maybe you done the testing by manually apply the patch and build the package on your own. Many thanks. Meanwhile, I sent the patches to upstream but they don't have response yet. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c25 --- Comment #25 from Stanley Miller <suse@stanmiller.info> 2012-09-13 09:30:01 MST --- I tried Michael Chang's suggestion in bug # 776244 comment # 7 and it was both simple to do and is readable for me. https://bugzilla.novell.com/show_bug.cgi?id=776244#c7 -------------- Michael Chang 2012-09-11 21:47:56 MST Hi As a temporarily fix, please set text foreground to white instead of default light-gray $ echo "set color_normal=white/black" >> /boot/grub2/custom.cfg Thanks. --------------- -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c26 --- Comment #26 from Andrey Borzenkov <arvidjaar@gmail.com> 2012-10-01 18:14:06 UTC --- (In reply to comment #7)
I remembered tried that set color_normal= when investigating this but not worked. I was adding it to /boot/grub2/grub.cfg in the very first beginning. Probably it has to be set after the theme gets loaded.
Yes, that's a bug I mentioned - value of color_normal/color_highlight is ignored when terminal module is loaded, and default values in module are always taken. When these variables are set, it is applied to all currently loaded terminal modules, but not to any in the future again. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=778350 https://bugzilla.novell.com/show_bug.cgi?id=778350#c27 Torsten Duwe <duwe@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |duwe@suse.com Resolution| |DUPLICATE --- Comment #27 from Torsten Duwe <duwe@suse.com> 2012-10-11 13:17:22 UTC --- basically a dup of bnc#776244, see c25. Please reopen if it's not. *** This bug has been marked as a duplicate of bug 776244 *** http://bugzilla.novell.com/show_bug.cgi?id=776244 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com