To switch to 6 or 8 bits, I used the xrandr utility (it works with X11).
Running
xrandr --verbose
will print a list of outputs and settings for each of them. You can also see the active output there (usually, the EDID field is filled in for it, indicating that a monitor is connected).
You can set 8 bits with the command:
xrandr --output HDMI-1 --set "max bpc" 8
HDMI-1 in this command is just an example; you might have a different output.
For HDMI, the minimum value is 8 bits.
For Display Port, the minimum available value is 6 bits.