Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dark/Blank/Default color schemes - How to fix dark mode not working #359

Open
mdcato opened this issue Nov 6, 2021 · 15 comments
Open

Dark/Blank/Default color schemes - How to fix dark mode not working #359

mdcato opened this issue Nov 6, 2021 · 15 comments

Comments

@mdcato
Copy link

mdcato commented Nov 6, 2021

On an i5-8400 internal graphics system (not a separate graphics card), the Dark mode is the same as Blank (i.e. text is not visible rather than gray) UNLESS there is an error which is red text on white background. I realize the Dark mode is intended for LCD/TFT displays, but it would be nice if it also worked on a normal display. I've attached screenshots of the three color modes plus the log of the nwipe run for the system info it contains. If there hadn't been an error, I would have assumed Blank==Dark. Happy to provide any other info that might be needed.
nwipe-log-20211030.log

Screenshot from 2021-11-02 19-33-33-nwipe-0 32-blank
Screenshot from 2021-11-02 19-33-27-nwipe-0 32-dark
Screenshot from 2021-11-02 19-33-15-nwipe-0 32-blue

.

@PartialVolume
Copy link
Collaborator

Interesting, I don't see that problem on my system. When you say non LCD, do you mean CRT? Not that I would have thought that would matter. Looks like your booting UEFI which is what I'm booting.

Let me have a look at the code and have a think about it.

@PartialVolume
Copy link
Collaborator

To achieve grey text on black background you have to use the intensity setting. It's a fudge because there is no grey as such in the color table. I switch the color pair from init_pair( 4, COLOR_BLUE, COLOR_WHITE ); to init_pair( 4, COLOR_BLACK, COLOR_BLACK ); then set the intensity bit which gives you grey text on black. If you are using a CRT can you turn the contrast and brightness up as high as they go and see if the text starts to appear?

@PartialVolume
Copy link
Collaborator

Are you able to plug a TFT monitor into your system and see if it works properly? That would tell me whether its a graphics card issue or not.

@mdcato
Copy link
Author

mdcato commented Nov 7, 2021 via email

@PartialVolume
Copy link
Collaborator

What terminal are you using? I don't recognise it. Could be the terminal emulation. I may be useful if I install the same thing and see if I can reproduce it.

@PartialVolume
Copy link
Collaborator

PartialVolume commented Nov 7, 2021

I've just tried with the 'terminator' terminal and I can reproduce the problem with that. Initially I thought it was because 'terminator' doesn't recognise the intensity bit. So I ran a demo in both Konsole (top) and Terminator (bottom) and all colors are displayed although terminator looks a bit washed out.

Works ok in Xterm and Konsole and I'm assuming the related consoles that are based on the qmltermwidget code such as Cool retro term.

Screenshot_20211107_011357

@PartialVolume
Copy link
Collaborator

Here's nwipe running in cool retro which uses the same terminal engine as konsole, shown switching between blue (overwritten with retro amber) then dark then blank.

retro.mp4

.

@PartialVolume
Copy link
Collaborator

PartialVolume commented Nov 7, 2021

Table of terminals that support dark mode in nwipe, if you know more that work/don't work please let me know below. These terminals were tested on KDE Neon ( Ubuntu 20.04LTS )

Terminal Name Works Does not work ! Version Mitigation
alacrity FAIL 0.8.0
cool-retro-term PASS 1.1.1
gnome-terminal PASS* 3.36.2 *Enable 'Show Bold Text in Bright Colors' if dark mode is blank.
guake PASS** 3.6.3 **WORKS, if tickbox in preferences 'Bold text is also bright (VTE>=0.52)' is ticked
kitty FAIL 0.15.0
konsole PASS 21.08.3
putty terminal (pterm) PASS unknown
qterminal PASS 0.14.1
rxvt PASS 9.22
screen PASS 4.08.00
ShredOS 2020 PASS All ok
st (stterm) PASS 0.8.2
terminator PASS*** 1.91 ***Works on more recent options when optional 'Bold text is bright' is selected. Bold is bright option committed 25/APR/2020 terminator/pull/39 Fails on older versions or if 'bold is bright' is not selected.
terminology PASS 1.6.0
tmux PASS 3.0a
Ubuntu Virtual Terminal ALT-F2 PASS unknown
Urxvt PASS 9.22
Xfce terminal PASS 0.8.9.1 (Xfce 4.14)
Xterm PASS XTerm(353)
yakuake PASS 21.08.3

@PartialVolume PartialVolume changed the title Dark/Blank/Default color schemes on non-LCD monitor Dark/Blank/Default color schemes in various terminals Nov 7, 2021
@PartialVolume
Copy link
Collaborator

There is a workaround for the guake and possibly the others that don't work, especially if they are VTE based.

In guake, click right on the terminal and select preferences, then from the preferences dialog box select 'Appearance' from the option down the left hand side. There's a tickbox with the label 'Bold text is also bright (VTE>=0.52). Tick that box and you will now find nwipe's dark mode now works.

@mdcato Possibly your terminal is VTE based and there is a similar option?

@PartialVolume
Copy link
Collaborator

Looks like the 'terminator' has had the same option added as guake, so should also be fine if you select this option. gnome-terminator/terminator#38

@mdcato
Copy link
Author

mdcato commented Nov 7, 2021 via email

@PartialVolume
Copy link
Collaborator

PartialVolume commented Nov 7, 2021

@mdcato gnome-terminal is also VTE based. If you look at this thread about this same issue in terminator Bold is bright or not as the case may be, they talk about the following setting

One of the ways forward (for me) is to change PS1 and LS_COLORS. On the other hand, just switching the option back to its previous value is easier. The issue is that Terminator does not provide the checkbox that gnome-terminal has.

Terminator currently does not touch this setting, VTE therefore uses the default. However, by adding self.vte.set_bold_is_bright(True) after the following line, I can revert VTE to the old behaviour.

So according to that comment, gnome-terminal has that 'bold is bright' setting that you can change.

Looks like somebody just switched off Bold is Bright in VTE and unless the terminal has the option to switch it back on your out of luck. I can't find any 'bold is bright' option in my version of gnome-terminal, which is older than yours, but maybe that option is available in your version.

@mdcato
Copy link
Author

mdcato commented Nov 7, 2021 via email

@PartialVolume
Copy link
Collaborator

Excellent ! :-) #

@PartialVolume
Copy link
Collaborator

PartialVolume commented Nov 7, 2021

My version of gnome-terminal (3.36.2) does indeed have the setting 'Show Bold Text in Bright Colors', I wasn't looking for that previously, as gnome-terminal wasn't showing the problem. Toggling that setting does cause dark mode to work or not.

I also found that my version of gnome-terminal was working with dark mode previously, because at some point I'd switched it to 'Use colors from system theme', which allowed dark mode to work in nwipe even with 'Show Bold Text in Bright Colors' un-ticked. But switching 'Use colors from system theme' off meant I needed ' 'Show Bold Text in Bright Colors' enabled.

@PartialVolume PartialVolume changed the title Dark/Blank/Default color schemes in various terminals Dark/Blank/Default color schemes - How to fix dark mode not working Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants