From 13b6bd20caaf1c4d2d13c688c18ac4ce31a8721f Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Thu, 30 Oct 2014 17:36:26 +0100 Subject: [PATCH] wayland: Don't check for hi-dpi on monitors with broken EDID If the monitor reports a width/height that looks suspiciously like an aspect ratio (16/9 or 16/10) don't check for hi-dpi. We can assume that makers of devices that do support hi-dpi aren't so careless. See http://cgit.freedesktop.org/~daniels/xserver/commit/?h=lodpi https://bugzilla.gnome.org/show_bug.cgi?id=734839 --- src/wayland/meta-wayland-outputs.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/wayland/meta-wayland-outputs.c b/src/wayland/meta-wayland-outputs.c index 90990e61f..7ed3ae16f 100644 --- a/src/wayland/meta-wayland-outputs.c +++ b/src/wayland/meta-wayland-outputs.c @@ -75,6 +75,14 @@ compute_scale (MetaOutput *output) output->crtc->rect.width >= SMALLEST_4K_WIDTH) goto out; + /* Somebody encoded the aspect ratio (16/9 or 16/10) + * instead of the physical size */ + if ((output->width_mm == 160 && output->height_mm == 90) || + (output->width_mm == 160 && output->height_mm == 100) || + (output->width_mm == 16 && output->height_mm == 9) || + (output->width_mm == 16 && output->height_mm == 10)) + goto out; + if (output->width_mm > 0 && output->height_mm > 0) { double dpi_x, dpi_y;