Presentation mode broken with nvidia X driver
Many laptops like Asus UX550GE have a "presentation mode" hotkey (KEY_SWITCHVIDEOMODE) for which the standard behaviour is to cycle through 4 configurations:
- Laptop panel on, external display off
- Extended mode
- Mirror mode
- External display on, laptop panel off
This code was previously implemented in gnome-settings-daemon and it was working with Asus UX550GE with the proprietary nvidia driver under X11.
But the code was then removed: https://github.com/endlessm/gnome-settings-daemon/commit/cbf313e689f5853b85c6f7c08ac233688408c8e8
It was moved into mutter (commit 3f9c5823), but the mutter version doesn't work right. It only cycles through 2 configurations:
- Mirror mode
- Extended mode
The implementation that was removed from gnome-settings-daemon was relatively self contained, easy to understand, and had a fantastic debugging method ("gsd-debug-randr"). The new version in mutter seems to span multiple layers and doesn't seem to have a single comment or debug message. What do you recommend for debugging this?
I suspect this bug will reproduce on all systems where both displays are driven through the proprietary nvidia graphics driver. We can't reproduce it on systems with other configurations.