Bug 227967 - [usability] x11-servers/xorg-server ships with black background which makes debugging X hard
Summary: [usability] x11-servers/xorg-server ships with black background which makes d...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
Depends on:
Reported: 2018-05-04 08:42 UTC by Wojciech A. Koszek
Modified: 2020-03-25 10:58 UTC (History)
4 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Wojciech A. Koszek freebsd_committer 2018-05-04 08:42:53 UTC
Historically and even right now (e.g.: in OpenBSD) upon starting blank X server one would get black/white "mess". It's easy to see things are working right, because this non-blank, non-empty image means that the X started and it's OK.

On FreeBSD the default 'background' after starting X is black background.

It's very hard to tell if it's a bug and there's a problem with a display, especially on T410 with KMS where things don't work out-of-the-box, and X configuration requires fiddling.

It'd be good if X shipped with some non-blank non-black background.
Comment 1 Tobias Kortkamp freebsd_committer 2018-05-04 10:00:39 UTC
(In reply to Wojciech A. Koszek from comment #0)
You can start Xorg with the -retro option if you want to have the X pattern back:

X -retro
startx -- -retro
Comment 2 Wojciech A. Koszek freebsd_committer 2018-05-05 00:25:23 UTC
Can we make this or other non-black option the default?
Comment 3 Mateusz Piotrowski freebsd_committer 2018-05-06 19:59:54 UTC
(In reply to Wojciech A. Koszek from comment #2)

I think that Wojciech's suggestion is actually a pretty good idea. 

It would troubleshooting easier for newcomers, wouldn't it?
Comment 4 Chris Rees freebsd_committer 2020-01-17 20:06:36 UTC
I agree, but this is a bit of an intrusive change for a port.

How about we update the docs to point out the -retro option?  I didn't know about it either!


Comment 5 Alexey Dokuchaev freebsd_committer 2020-03-25 06:01:29 UTC
(In reply to Chris Rees from comment #4)
> I agree, but this is a bit of an intrusive change for a port.
Just was unpleasantly astonished by this myself and found this PR.

Personally I'd rather have "retro" pattern left by default and never touched (in accordance to "don't try to fix what ain't broken" rule), but then we'd have to do something about the "-retro" option (e.g. remove this bogosity) and *that* already becomes intrusive.

On the other hand, if upstream makes a stupid decision (and replacing traditional X pattern with black inconclusive blank vagueness is certainly stupid, if not idiotic) then we, downstream packagers, should correct it for the benefit of our end-users.

If upstream had decided to use solid color, why not make it the same as your favourite bikeshed?  Dark purple seems fine. :-)  This way, "-retro" option would still behave as expected, requiring no intrusive changes to the port other than simple s/black/$somecolor/ one-line patch.
Comment 6 Chris Rees freebsd_committer 2020-03-25 07:32:42 UTC
Hm, I'm not sure that 'black' is chosen as a 'wallpaper', but to be honest I'm not massively averse to forcing the -retro option by default, I just feel a bit uncomfortable with such a significant OS dependent change.

Unless you've found the code that chooses black?
Comment 7 Alexey Dokuchaev freebsd_committer 2020-03-25 10:49:34 UTC
(In reply to Chris Rees from comment #6)
> Hm, I'm not sure that 'black' is chosen as a 'wallpaper'...
> Unless you've found the code that chooses black?
I guess you're right, it's not that simple.  Basically, the logic goes like this:

>  if (party_like_its_1989) { // -retro
>      MakeRootTile(pWin);
>      backFlag |= CWBackPixmap;
>  }
>  else {
>      pWin->backgroundState = BackgroundPixel;
>      if (whiteRoot) // -wr
>          pWin->background.pixel = pScreen->whitePixel;
>      else
>          pWin->background.pixel = pScreen->blackPixel;
>      backFlag |= CWBackPixel;
>  }
So it's special "blackPixel" colormap entry, not simply "solid black".  I guess we're better off properly documenting how users can select 1989-style (-retro) or solid white (-wr) backgrounds.

Another option would be to look into how OpenBSD patches it, but I don't feel motivated enough.
Comment 8 commit-hook freebsd_committer 2020-03-25 10:57:55 UTC
A commit references this bug:

Author: crees
Date: Wed Mar 25 10:57:06 UTC 2020
New revision: 54014
URL: https://svnweb.freebsd.org/changeset/doc/54014

  Document the use of '-retro' to actually get a visible background.

  PR:		ports/227967

Comment 9 Chris Rees freebsd_committer 2020-03-25 10:58:13 UTC
Yeah, updating the docs seems the best idea.  I worry about diverging so that the Xorg docs might not match!

Thanks for the comments.