A couple of months ago, I was experimenting with the Blackmagic UltraStudio Recorder 3G, recording uncompressed 10-bit video from my MBP M1. At that time, I was already using Stillcolor (the application that disables dithering in macOS).
I also had Ubuntu 22.04, which I installed on a Parallels virtual machine in macOS. I decided to try recording and analyzing the desktop in Ubuntu. There was no dithering, neither in macOS nor in Ubuntu 22.04. When I enabled dithering in Stillcolor, dithering also appeared in Ubuntu. I don't remember exactly, but it seems Ubuntu was using Wayland, not X11.
My hypothesis is this: dithering is influenced only by a driver and a video adapter. In Parallels, the virtual video adapter driver is used, which does not dither, leading to no dithering in Ubuntu when it is run in the virtual machine. However, there's a question about the presence of hardware acceleration in this setup, which I can't yet comment on. But OpenGL is responsible for hardware acceleration. According to the documentation, OpenGL has the GL_DITHER option.
“GL_DITHER - If enabled, dither color components or indexes before they are written to the color buffer.”
I think it is possible to recompile the Linux OpenGL library with GL_DITHER forcibly set to false. At first glance, modifications need to be made only in two places in the library code:
- prohibit enabling dithering from outside: https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/mesa/main/enable.c#L519;
- find where ctx->Color.DitherFlag is initialized to set it to GL_FALSE.
In the kernel, dithering is enabled during the initialization stage of the video adapter (I'm only talking about UHD Intel here). As I understand it, this happens in this i915 module file: https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/i915/display/intel_display.c. I quickly went through the code, and it seems there is a possibility to force 8-bit and disable dithering.
The question of hardware acceleration directly in the browser remains. As far as I know, some browsers use WebGL. The question here is whether this library calls the system's OpenGL library or not.
I found information that Intel Arc also uses the i915 kernel module, and I'm interested in whether it's possible to disable dithering not only for UHD but also for ARCs.
I recently ordered a mini PC based on the i5-12450H processor. I want to set up an additional workspace using it. Since Windows is bad for my eyes, I want to try Linux and see if I can disable dithering for UHD / ARC.