How to configure 10-bit colour depth?

There’s an option, but it doesn’t seem to do anything; grep --ignore-case --recursive depth /etc/X11/xorg.conf.d finds nothing, and

$ grep 'Using .* bits' ~/.local/share/xorg/Xorg.0.log
[  2544.878] (II) AMDGPU(0): Using 8 bits per RGB (8 bit DAC)

The X server parts of my configuration:

xserver = {
  defaultDepth = 30;
  desktopManager = {
    gnome.enable = true;
    plasma5.enable = true;
  displayManager = {
    defaultSession = "gnome";
    gdm = {
      autoSuspend = false;
      enable = true;
  enable = true;
  layout = "us";
  libinput.enable = true;
  xkbOptions = "compose:caps,terminate:ctrl_alt_bksp";
  xkbVariant = "dvorak-alt-intl";

If you set certain options (e.g. services.xserver.config) that one will be overridden, afaict.

That said, the main xorg.conf file is not placed in /etc/X11/xorg.conf if you don’t set services.xserver.exportConfiguration.

You can alternatively find the file by looking at what systemd actually starts, the config file location is set with the CLI.

As for whether your user configuration overrides that, no idea. Probably depends on your display manager/xsession script. Ah, that was your log o\

Where is it set then? I should be able to review the configuration somewhere on disk, right? If it’s set by a service, which one? There’s no “xserver”, “desktop”, or “gnome” service.

In a cinch ps aux | grep xserver.conf should work (and will work for any similar case where you don’t know what started your service).

systemctl status display-manager.service should contain the process as well, since it’s your display manager that is in charge of launching the actual X binary.

1 Like

ps aux | grep xserver.conf doesn’t find anything, and sudo lsof -p PID_OF_GDM doesn’t show any conf files.

Interesting! This is what I get with lightdm:

root        2211  0.5  0.1 25362444 54520 tty7   Ssl+ 11:33   0:02 /nix/store/40im6jrhxphm71k79dm0mf5083kl5jlz-xorg-server-1.20.14/bin/X -config /nix/store/jmz1mwf6rcj72cwmg6r5pa5alympfvfg-xserver.conf -xkbdir /nix/store/lvr0zhzw3zvsxnhsx98pkf726qygb9xc-xkeyboard-config-2.33/etc/X11/xkb -logfile /dev/null -verbose 3 -nolisten tcp -terminate -logfile /var/log/X.0.log :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
tlater      4394  0.0  0.0 222456  2736 pts/1    S+   11:41   0:00 grep xserver.conf

And this is what the service gives me (note the CGroup):

● display-manager.service - X11 Server
     Loaded: loaded (/etc/systemd/system/display-manager.service; linked; preset: enabled)
     Active: active (running) since Thu 2023-01-05 11:33:35 GMT; 12min ago
    Process: 2199 ExecStartPre=/nix/store/6vdpxrf29hsayyif50j1n7l61h5ll6jq-unit-script-display-manager-pre-start/bin/display-manager-pre-start (code=exited, status=0/SUCCESS)
   Main PID: 2203 (lightdm)
         IP: 0B in, 0B out
         IO: 95.5M read, 96.0K written
      Tasks: 5 (limit: 38432)
     Memory: 54.6M
        CPU: 3.684s
     CGroup: /system.slice/display-manager.service
             ├─2203 /nix/store/wmfhw12hwk43xpkjjf7khx6d2sxlk3xq-lightdm-1.32.0/sbin/lightdm
             └─2211 /nix/store/40im6jrhxphm71k79dm0mf5083kl5jlz-xorg-server-1.20.14/bin/X -config /nix/store/jmz1mwf6rcj72cwmg6r5pa5alympfvfg-xserver.conf -xkbdir /nix/store/lvr0zhzw3zvsxnhsx98pkf726qygb9xc-xkeyboard-config-2.33/etc/X11/xkb -logfile /dev/null -verbose 3 -nolisten tcp -terminate -logfile /var/log/X.0.log :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch

Jan 05 11:33:35 yui systemd[1]: Starting X11 Server...
Jan 05 11:33:35 yui display-manager[2210]: error: unexpectedly disconnected from boot status daemon
Jan 05 11:33:35 yui systemd[1]: Started X11 Server.
Jan 05 11:33:49 yui lightdm[2285]: pam_unix(lightdm:session): session opened for user tlater(uid=1000) by (uid=0)

Are you sure you’re not running Xwayland? Gnome/gdm default to wayland these days afaik.

1 Like

I’m running Wayland (XWayland according to xrandr), but all these settings are under Is the xserver part of that name simply misleading?

The difference is that I don’t know how X11 is launched when it goes through the wayland layer. With a “normal” X11 setup the display manager launches X11 with the -config flag to pass the correct configuration file through the xsession scripts, which is what services.xserver largely configures (though it’s not a very cleanly encapsulated module, it configures some kernel module settings and such too).

Obviously, this does not happen with wayland. I believe the compositor is responsible for launching however much of X11 it actually runs? If so, to set X configuration, you would need a gnome configuration option.

That said, I’ve not made my foray into wayland yet, so sorry, I don’t know how xwayland is configured. Maybe look through your ps list to see if you can spot an xwayland process and the gnome/gdm session scripts to see how this is concocted?

Hosted by Flying Circus.