! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
display mode and rate validity determination
Status:
RESOLVED: FIXED
Product:
Xfce4-settings
Component:
Settings Helper

Comments

Description Franz Brauße 2014-01-31 18:35:30 CET
Created attachment 5342 
Fix mode validity determination by checking display resolution dimensions instead of mode name and using 1/10 Hz precision for rate comparison

I've got a monitor that gets assigned an unsupported mode from EDID information by the X-Server (output from xrandr):

  1280x1024 (0x57)  108.0MHz +HSync +VSync
        h: width  1280 start 1328 end 1440 total 1688 skew    0 clock   64.0KHz
        v: height 1024 start 1025 end 1028 total 1066           clock   60.0Hz

So in xorg.conf I manually defined a working mode:

  1280x1024R (0x5d)   90.8MHz +HSync -VSync +preferred
        h: width  1280 start 1328 end 1360 total 1440 skew    0 clock   63.0KHz
        v: height 1024 start 1027 end 1034 total 1054           clock   59.8Hz

This mode I can set manually using xrandr:

  xrandr --output DVI-0 --mode 1280x1024R

But it is not possible to set this mode in the xfce4-display-settings (these modes can be distinguished by 60 Hz vs. 59.8 Hz), because the newly defined mode has a name '1280x1024R' that does not correspond to the pattern '<W>x<H>' which xfsettingsd implicitely assumes (xfsettingsd/displays.c:697):

            /* find the mode corresponding to the saved values */
            if (rint (rate) == rint (output_rate)
                && (g_strcmp0 (helper->resources->modes[m].name, str_value) == 0))
            {
                valid_mode = helper->resources->modes[m].id;
                break;
            }

So the attached patch changes the string-comparison to comparing the derived integer values for width/height. It also changes the precision of the rate comparison from 1 Hz to 1/10 Hz to match the precision that xfce4-display-settings offers in its rate-combobox.
Comment 1 Franz Brauße 2014-02-01 12:27:37 CET
Created attachment 5344 
Fix mode validity determination by checking display resolution dimensions instead of mode name and using 1/10 Hz precision for rate comparison v2

New version of the patch which also handles the error case (e.g. no resolution property has been set) properly.
Comment 2 Sean Davis editbugs 2015-01-31 18:20:19 CET
Thanks, I've merged bits and pieces of your patch and bug 11423 into master.  All issues defined in this bug report are now resolved.

Thanks again!
Comment 3 Franz Brauße 2015-02-05 18:54:09 CET
Confirmed, thank you!

Bug #10661

Reported by:
Franz Brauße
Reported on: 2014-01-31
Last modified on: 2015-02-05

People

Assignee:
Nick Schermer
CC List:
5 users

Version

Version:
4.11.0

Attachments

Additional information