gnome_rr_output_is_builtin_display incorrectly returns false for Apple laptops with nvidia driver
@afn
Submitted by Tony Novak Assigned to Desktop Maintainers
Link to original bug (#777538)
Description
Created attachment 343907 Patch to fix apple built-in monitor detection
gnome_rr_output_is_builtin_display() uses the output name to determine whether or not a display is built-in. With the nouveau driver, the built-in display on an Apple Macbook Pro is named "eDP-1", and it's correctly detected as built-in. With the proprietary nvidia driver, however, the display is simply named "DP-2" and gnome_rr_output_is_builtin_display() returns false.
This causes issues with sleeping, because suspend is inhibited when the computer has an external display attached.
The attached patch changes gnome_rr_output_is_builtin_display() to include outputs whose vendor is "APP". I'm not sure if this would cause any issues with Apple-branded external monitors. If it would, then perhaps a better, though more far-reaching, change would be to change gnome-settings-daemon to inhibit suspend based on the number of monitors, rather than their type. (Is there a situation where a computer has a lid and no built-in monitor? If not, then we can safely assume that having 2 or more displays is equivalent to having 1 or more external display.)
Thanks! Tony
Patch 343907, "Patch to fix apple built-in monitor detection":
apple-builtin-monitor.patch
Version: git master