I have a projector that needs limited rgb range, but for some reason (maybe a faulty hdmi-vga dongle) the intel driver selects full range. I want to force the limited rgb range when I plug the projector, but I need it set to auto normally, because my usual monitor needs full range.

I read this guide that explains how to use proptest to switch mode when in wayland. The problem is that running the command when the gnome session is open doesn’t work and returns an error 243 (I can’t find it in errno.h, but google says its EACCESS). The guide deals with this by launching the command with systemd before gdm starts, but as I said, I only want to force the limited range when using the projector.

I noticed that I can switch to a tty, set the range, and switch back to gnome while everything is still running and it works, which is my current “workaround”, and I’d like to automate it. So I thought that there’s a moment when gnome “takes control” of a screen where this can be set. I tried to use a udev rule to switch as soon as a monitor is plugged, but it exits with 243 as usual. I suspect gdm has a way to automate such things that might possibly work, but I can’t find it, I only read about some xorg scripts.

Also, there’s this issue that’s being worked on. One of the commenters uses an udev rule as a work arount but it doesn’t work for me.