xrandr client truncates pixel clock freq. [Lucid]

Bug #835817 reported by Kevin Atkinson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
x11-xserver-utils (Ubuntu)
Triaged
Medium
Unassigned
Lucid
Won't Fix
Undecided
Unassigned

Bug Description

In Ubuntu 10.04 when adding new modes using "--newmode" the pixel clock is truncated, for example 119.9 will become 119. This is due to check_strtod in xrandr.c returning an int when it should be returning in double. This bug is already fixed upstream. Please consider adding the following patch to either -updates or -backports, which every is more appropriate.

Thank You.

[IMPACT] Unable to get the required pixel clock and hence potential for difficulty in getting some video systems to operate correctly. Probably fairly rare.

[Development Fix] It's working in current development versions, but hasn't been explicitly tracked.

[Stable Fix] Original reporter reports that the patch at http://cgit.freedesktop.org/xorg/app/xrandr/commit/?id=27f86db064a5ea60b942fd3d3ddeb462d980df9b is the required fix.

[Test Case] From comment #3:"It's easy to reproduce, for example:

  xrandr --newmode "640x480_75.00" 30.75 640 664 728 816 480 483 487 504 -hsync +vsync"
  xrandr

The output will be:
   ...
    640x480_75.00 (0x115) 30.0MHz
          h: width 640 start 664 end 728 total 816 skew 0 clock 36.8KHz
          v: height 480 start 483 end 487 total 504 clock 72.9Hz

Notice how the pixel clock freq. was truncated to 30.00 and the refresh rate is 72.9 instead of 75.0 like it should be."

[Regression Potential] Apparently small; although one has to worry about changing something like xrandr.

Revision history for this message
Kevin Atkinson (kevin-ubuntu) wrote :
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Hi Kevin,
  Do you have a reference to the upstream bug that this patch came from?

Dave

Revision history for this message
Kevin Atkinson (kevin-ubuntu) wrote :

I not sure a bug report was ever filed on this specific issue, but here is the reference to the git commit which fixes this bug:

http://cgit.freedesktop.org/xorg/app/xrandr/commit/?id=27f86db064a5ea60b942fd3d3ddeb462d980df9b

It's easy to reproduce, for example:

  xrandr --newmode "640x480_75.00" 30.75 640 664 728 816 480 483 487 504 -hsync +vsync"
  xrandr

The output will be:
   ...
    640x480_75.00 (0x115) 30.0MHz
          h: width 640 start 664 end 728 total 816 skew 0 clock 36.8KHz
          v: height 480 start 483 end 487 total 504 clock 72.9Hz

Notice how the pixel clock freq. was truncated to 30.00 and the refresh rate is 72.9 instead of 75.0 like it should be.

Revision history for this message
Kevin Atkinson (kevin-ubuntu) wrote :

Sorry the bug system wrapped the output badly, the last part of the command should be "-hsync +vsync" and the extra quote character should't be there.

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Hi Kevin,
  Interesting - I've just tried this in an Oneiric vm and it's not done a straight truncation - it seems to have done a bit of a round though, which makes me wonder if your original bug is present or not;

dg@kdedev:~$ xrandr --newmode "640x480_75.00" 30.75 640 664 728 816 480 483 487 504 -hsync +vsync
xrandr: Failed to get size of gamma for output default
dg@kdedev:~$ xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 480, current 1024 x 768, maximum 1024 x 768
default connected 1024x768+0+0 0mm x 0mm
   1024x768 60.0*
   800x600 60.0 56.0
   640x480 60.0
  640x480_75.00 (0x11b) 30.8MHz
        h: width 640 start 664 end 728 total 816 skew 0 clock 37.7KHz
        v: height 480 start 483 end 487 total 504 clock 74.8Hz

so, is that bug present or not?

Dave

Revision history for this message
Kevin Atkinson (kevin-ubuntu) wrote :

Like I said its fixed upstream, so naturally it should work correctly with Oneiric. The refresh rate it correct at 74.8 (really 74.77). This modeline should give you exactly 75:
  "640x480x75.00" 30.906000 640 664 728 816 480 484 488 505 -HSync +VSync
when the bug is not present.

This bug is filed against Lucid, or any still supported version of Ubuntu that use older version of xrandr that don't contain commit 27f86db.

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Medium->Moderate impact on core app

Changed in x11-xserver-utils (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
tags: added: patch-accepted-upstream
description: updated
Bryce Harrington (bryce)
summary: - xrandr client truncates pixel clock freq.
+ xrandr client truncates pixel clock freq. [Lucid]
Bryce Harrington (bryce)
tags: added: lucid
Revision history for this message
Rolf Leggewie (r0lf) wrote :

lucid has seen the end of its life and is no longer receiving any updates. Marking the lucid task for this ticket as "Won't Fix".

Changed in x11-xserver-utils (Ubuntu Lucid):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.