You are not logged in.

#1 2019-02-28 05:19:54

Woolie Wool
Member
Registered: 2019-02-10
Posts: 15

[SOLVED]Bright and 256 colors unavailable in tty mode

In the tty environments, whatever value I set to $TERM, the terminal makes no distinction between bright and dark colors except when displaying bold characters--things like powerline, or vim confgurations that rely on distinctions between bright and dark colors are therefore broken in fullscreen tty mode. When I use a color script like:

(x=`tput op` y=`printf %76s`;for i in {0..256};do o=00$i;echo -e ${o:${#o}-3:3} `tput setaf $i;tput setab $i`${y// /=}$x;done)

It will only display the first 8 colors and the rest as black in the default linux environment, or the remaining colors as duplicates of the first 8 when $TERM is set to a 256-color environment like xterm-256color. I am assuming I must be using a framebuffer of some kind as KMS works (resolution changes to native halfway through boot process, switching from desktop to tty is instant), so I have no idea what its problem is.

/etc/default/grub if it matters:

# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=1024x768x32

# Uncomment to allow the kernel use the same resolution used by grub
# GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
GRUB_THEME="/boot/grub/themes/Archlinux/theme.txt"

# Uncomment to get a beep at GRUB start
GRUB_INIT_TUNE="480 440 1"
#GRUB_FONT="/etc/share/kbd/consolefonts/termboot.psf"

# Uncomment to make GRUB remember the last selection. This requires to
# set 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT="true"

EDIT: And I'm using a Lenovo ThinkPad T520 with the nVidia graphics disabled in BIOS (Intel graphics only), if that matters too.

Last edited by Woolie Wool (2019-03-01 06:44:48)

Offline

#2 2019-02-28 09:01:08

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: [SOLVED]Bright and 256 colors unavailable in tty mode

You sort of do it with  fbterm but I would just run X/wayland instead. Just randomly changing $TERM will do nothing but break the terminal even more.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#3 2019-02-28 14:04:39

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,531
Website

Re: [SOLVED]Bright and 256 colors unavailable in tty mode

In addition to fbterm, you may also want to check out yaft.  But I also find it easier to run a minimal X session (with just a light terminal emulator).

TERM tells you (and child processes) what kind of terminal you are running on much like /proc/cpuinfo gives information about the system's processor(s).  Trying to set TERM to get more colors is like trying to append new processor blocks to /proc/cpuinfo to get a faster computer.  Overwriting the readout of your hardware will not change your hardware.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2019-03-01 03:08:15

Woolie Wool
Member
Registered: 2019-02-10
Posts: 15

Re: [SOLVED]Bright and 256 colors unavailable in tty mode

yaft looked promising at first, but it prevented me from switching between it and X, and lacked systemd integration. However, by pointing me at fbterm and yaft, you enabled me to find the solution that does work for me--kmscon, which I am enabling on all ttys except tty1. It's got fancy colors and it appears to even support ttf/otf fonts so I can fully unify the look of my ttys with my X terminals. Thank you!

EDIT: This one doesn't like to switch between X and the terminal either, unless I switch to a standard terminal (I had it only enabled on tty2 for testing purposes) and then switch to the kmscons-enabled terminal. I will have to investigate this some more.

Last edited by Woolie Wool (2019-03-01 03:19:30)

Offline

#5 2019-03-01 03:43:52

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,531
Website

Re: [SOLVED]Bright and 256 colors unavailable in tty mode

I've never had problems switching between yaft in a tty and X.  What exactly is going wrong?  As for "systemd integration" what exactly are you looking for?  If you want to start it automatically on log in to a tty, that's pretty trivial, it doesn't need to be baked in to the package.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2019-03-01 04:13:40

Woolie Wool
Member
Registered: 2019-02-10
Posts: 15

Re: [SOLVED]Bright and 256 colors unavailable in tty mode

With both yaft and kmscon I get a black screen when I hit Ctrl+Alt+F* to select the console in question directly from X. The screen does not refresh and give me control until I switch back to the desktop or to another tty using the kernel terminal emulator. Switching the other way, from the userspace console to X, is not a problem.

edit: it did it last reboot, but now kmscon is behaving and I can switch between it and X freely. I'll chalk it up to gremlins.

E: it was because I ran it with hwaccel. Set that in the conf along with my preferred otf font and now it seems like my tty is just how I like it.

Last edited by Woolie Wool (2019-03-01 05:11:32)

Offline

Board footer

Powered by FluxBB