Bug 221695 - bad colours in console on powerpc systems (11.1-RELEASE at least)
Summary: bad colours in console on powerpc systems (11.1-RELEASE at least)
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.1-RELEASE
Hardware: powerpc Any
: --- Affects Some People
Assignee: freebsd-ppc mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-21 16:01 UTC by devel
Modified: 2020-02-04 16:11 UTC (History)
4 users (show)

See Also:


Attachments
Bad colours in console (969.99 KB, image/jpeg)
2017-08-21 16:01 UTC, devel
no flags Details
Output of nccolour.c on 13-CURRENT - POWERPC64 (630.23 KB, image/jpeg)
2020-02-01 13:11 UTC, Francis Little
no flags Details
Shell Script Colour output G5 (452.34 KB, image/jpeg)
2020-02-01 17:00 UTC, Francis Little
no flags Details
Shell Script Colour Output PowerMac 7.2 (919.55 KB, image/jpeg)
2020-02-03 08:19 UTC, Michael Tuexen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description devel 2017-08-21 16:01:25 UTC
Created attachment 185643 [details]
Bad colours in console

This problem mentioned in
https://lists.freebsd.org/pipermail/freebsd-ppc/2016-September/008433.html
It's not installer's problem, but system-related problem.

There is problem with color console application when running in ttyv* (xterm) lines.
Test with program from https://dev.yorhel.nl/dump/nccolour is a good example (see attachement). 
Blue instead red, cyan instead yellow, etc.
Some yellow artefacts on white text aren't related to this problem.

There is no error when applications running from remote (ssh, lines pts/*).
Comment 1 Francis Little 2020-02-01 13:07:02 UTC
Have tested running https://dev.yorhel.nl/download/code/nccolour.c on my PowerMac G5 Quad, running 13-CURRENT.

All colours looked fine on the screen attached to the system, and comparing to the screenshot on the web site, all looks good.

Was this related to the newcons switch over? This looks like its no longer and issue.

Have attached a picture of the screen.
Comment 2 Francis Little 2020-02-01 13:11:48 UTC
Created attachment 211249 [details]
Output of nccolour.c on 13-CURRENT - POWERPC64
Comment 3 Alexey Dokuchaev freebsd_committer 2020-02-01 15:19:36 UTC
(In reply to Francis Little from comment #1)
> This looks like its no longer and issue.
This (or very similar) problem had been recently reported* on the mailing list again, so perhaps a little more data points are needed before it can be declared as truly fixed.

*) https://lists.freebsd.org/pipermail/freebsd-ppc/2019-December/010951.html
Comment 4 Francis Little 2020-02-01 16:59:41 UTC
(In reply to Alexey Dokuchaev from comment #3)

I have tested the issue in: https://lists.freebsd.org/pipermail/freebsd-ppc/2019-December/010951.html

Running the following shell script on my G5 running 13-CURRENT

printf "\033[30m%15s\033[0m\n" "BLACK   #000000"
printf "\033[31m%15s\033[0m\n" "RED     #FF0000"
printf "\033[32m%15s\033[0m\n" "GREEN   #00FF00"
printf "\033[33m%15s\033[0m\n" "YELLOW  #FFFF00"
printf "\033[34m%15s\033[0m\n" "BLUE    #0000FF"
printf "\033[35m%15s\033[0m\n" "MEGENTA #FF00FF"
printf "\033[36m%15s\033[0m\n" "CYAN    #00FFFF"
printf "\033[37m%15s\033[0m\n" "WHITE   #FFFFFF"

The output to the console looks correct.

I will attach a photo of the screen.
Comment 5 Francis Little 2020-02-01 17:00:07 UTC
Created attachment 211257 [details]
Shell Script Colour output G5
Comment 6 Michael Tuexen freebsd_committer 2020-02-01 19:47:17 UTC
It wasn't working on mid December. Will re-test on Monday on a Dual CPU G5 in my lab and report.
Comment 7 Michael Tuexen freebsd_committer 2020-02-03 08:19:18 UTC
Created attachment 211312 [details]
Shell Script Colour Output PowerMac 7.2
Comment 8 Michael Tuexen freebsd_committer 2020-02-03 08:20:32 UTC
OK, just tested the output of the Shell Script on a PowerMac 7.2. The bug is still there. So it seems to be that the bug is not present on all models...
Comment 9 Michael Tuexen freebsd_committer 2020-02-03 08:49:49 UTC
Just to be clear: I'm using
VT(ofwfb): resolution 1280x1024
on the PowerMac7,2, where the colours are not shown correctly.
Comment 10 Alfredo Dal'Ava Junior freebsd_committer 2020-02-03 11:44:30 UTC
(In reply to Michael Tuexen from comment #8)

Michael, I think PowerMac 7.2 is 64 bit, but "uname" output shows you are running a 32 bit kernel. Was is it intentional?

Anyway I was able to reproduce the wrong colors on my PowerBook G4 on FreeBSD 13-CURRENT. It may indicate the issue is on the 32 bit builds...
Comment 11 Michael Tuexen freebsd_committer 2020-02-03 14:21:36 UTC
Yes, the machine is capable of doing 64 bit. How should I compile a 64-bit kernel?
I'm using the following kernel config:

include		GENERIC64-NODEBUG
ident	 	TCP-NODEBUG

makeoptions     WITH_EXTRA_TCP_STACKS=1
options		TCPHPTS
options		IPFIREWALL
options		IPFIREWALL_VERBOSE
options		IPFIREWALL_VERBOSE_LIMIT=5
options		IPFIREWALL_DEFAULT_TO_ACCEPT

Since I'm including GENERIC64-NEDEBUG, I'm assuming that it is a 64-bit kernel...
Comment 12 Michael Tuexen freebsd_committer 2020-02-03 14:25:02 UTC
sysctl reports:

tuexen@bsd4:~/head/sys/powerpc/conf % sysctl hw.machine_arch
hw.machine_arch: powerpc64
Comment 13 Alfredo Dal'Ava Junior freebsd_committer 2020-02-03 15:58:10 UTC
ah, you're probably on 64 bit kernel already: try 'uname -ap', it should append "powerpc64" to the output. I'll try to investigate this on my G4@home.
Comment 14 Michael Tuexen freebsd_committer 2020-02-03 18:29:05 UTC
(In reply to Alfredo Dal'Ava Júnior from comment #13)
tuexen@bsd4:~ % uname -ap
FreeBSD bsd4.fh-muenster.de 13.0-CURRENT FreeBSD 13.0-CURRENT #27 r357426: Mon Feb  3 09:38:12 CET 2020     tuexen@bsd4.fh-muenster.de:/usr/home/tuexen/head/sys/powerpc/compile/TCP-NODEBUG  powerpc powerpc64

So I think this is not a 32-bit versus a 64-bit issue. I also see the issue on a 32-bit G4 Powerbook.
Comment 15 Alexey Dokuchaev freebsd_committer 2020-02-04 10:37:03 UTC
(In reply to Michael Tuexen from comment #14)
> I also see the issue on a 32-bit G4 Powerbook.

I'd like to test it on Mac mini G4 (also ppc32), but still waiting for Justin's (or anyone's, FWIW) reply to my question about upgrading*.

If anyone can share their numbers that'd be great!

*) https://lists.freebsd.org/pipermail/freebsd-ppc/2019-December/011046.html
Comment 16 Michael Tuexen freebsd_committer 2020-02-04 14:50:55 UTC
(In reply to Alexey Dokuchaev from comment #15)
I installed the clang based builds on a PowerMac7,2, PowerMac7,2 and a G4 Powerbook by a fresh install using a snapshot from the ftp servers. Building world and kernel took about 2 days on a PowerMac7,2 with SMP disabled.
Comment 17 Francis Little 2020-02-04 16:11:48 UTC
(In reply to Alexey Dokuchaev from comment #15)

Probably just quicker to reinstall with one of the 13-CURRENT snapshots:

http://ftp.freebsd.org/pub/FreeBSD/snapshots/ISO-IMAGES/13.0/