Comment 12 for bug 115220

Revision history for this message
Bryce Harrington (bryce) wrote :

Aha, I see that the relevant code for this is here, in ddcprobe.c:

        for(i = 0; i < 8; i++) {
                        ...
                        switch(edid_info->standard_timing[i].aspect) {
                                case 0: aspect = 1; break; /*undefined*/
                                case 1: aspect = 0.750; break;
                                case 2: aspect = 0.800; break;
                                case 3: aspect = 0.625; break;
                        }
                        x = (xres + 31) * 8;
                        y = x * aspect;
                        printf("ctiming: %dx%d@%d\n", x, y,
                               (vfreq & 0x3f) + 60);

So like pheeror says, the 1 aspect ratio is being returned in the case where EDID is failing.

I see in ddcprobe.sh, it has this code to check for a return value of 1:

...
  DDCPROBE="$(ddcprobe 2>/dev/null)"
...
if [ "$?" = "1" ]; then
  exit 1
fi

But I imagine there is some code somewhere (maybe in xserver postinst?) which is not properly checking for this?

Perhaps better logic would be to skip outputting the mode at all in this case? E.g. something like...

        for(i = 0; i < 8; i++) {
                       ...
                       switch(edid_info->standard_timing[i].aspect) {
                                case 0: continue; break; /*undefined*/
                                case 1: aspect = 0.750; break;
                                case 2: aspect = 0.800; break;
                                case 3: aspect = 0.625; break;
                        }