[mythtv-users] xrandr selecting invalid resolution/rate

Stephen Worthington stephen_agent at jsw.gen.nz
Wed Jan 2 12:53:14 UTC 2019


On Mon, 31 Dec 2018 23:43:52 -0500, you wrote:

>I'm seeing an issue where xrandr selects an invalid screen resolution/rate.
>It attempts to select 1920x1080 at 71 Hz, which my TV does not like.
>
>I don't know exactly when this problem arose, as this system has been going
>for 6 months since power cycle.
>This week, it got power cycled, and has been causing all sorts of problems.
>
>It have traced it down to the code thinking that 71 Hz is a valid refresh
>rate.  It seems to get this from xrandr.  I don't know how.
>
>xrandr gives me what appears to be reasonable:
>dragon at mythfe1:~$ DISPLAY=:0.0 xrandr -q
>Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
>DVI-D-0 disconnected (normal left inverted right x axis y axis)
>HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis)
>1872mm x 1053mm
>   3840x2160     60.00 +  59.94    50.00    29.97    25.00    23.98
>   4096x2160     59.94    50.00    29.97    25.00    24.00    23.98
>   2880x576      50.00
>   2880x480      59.94
>   1920x1080     60.00*   59.94    50.00    29.97    25.00    23.98
>60.00    50.04
>   1680x1050     59.95
>   1600x900      60.00
>   1440x900      59.89
>   1440x576      50.00
>   1440x480      59.94
>   1280x1024     75.02    60.02
>   1280x800      59.81
>   1280x720      60.00    59.94    50.00
>   1152x864      75.00
>   1024x768      75.03    70.07    60.00
>   800x600       75.00    72.19    60.32
>   720x576       50.00
>   720x480       59.94
>   640x480       75.00    72.81    59.94
>DP-0 disconnected (normal left inverted right x axis y axis)
>DP-1 disconnected (normal left inverted right x axis y axis)
>
>Here is the verbose output if anyone is interested:
>https://pastebin.com/qNYbjJg5
>
>If i try to select 1920x1080 at 60..  I get an error
>dragon at mythfe1:~$ DISPLAY=:0.0 xrandr -r 60
>Rate 60.00 Hz not available for this size
>
>Using the myth gui i was very surprised to see 50, 64,65,66,67,68,69,70,71
>as viable choices.. not 60 hz.. These didn't make any sense to me..
>I was able to figure out that they did infact from from xrandr... which i
>found (by accident), if i try to select 50 hz:
>
>dragon at mythfe1:~$ DISPLAY=:0.0 xrandr --verbose  -r 50
> SZ:    Pixels          Physical       Refresh
>**0   1920 x 1080   ( 487mm x 274mm )  *50   64   65   66   67   68   69
>70   71  *
> 1   4096 x 2160   (1040mm x 548mm )   51   52   53   54   55   56
> 2   3840 x 2160   ( 975mm x 548mm )   57   58   59   60   61
> 3   2880 x 576    ( 731mm x 146mm )   62
> 4   2880 x 480    ( 731mm x 121mm )   63
> 5   1680 x 1050   ( 426mm x 266mm )   72
> 6   1600 x 900    ( 406mm x 228mm )   73
> 7   1440 x 900    ( 365mm x 228mm )   74
> 8   1440 x 576    ( 365mm x 146mm )   75
> 9   1440 x 480    ( 365mm x 121mm )   76
> 10  1280 x 1024   ( 325mm x 260mm )   77   78
> 11  1280 x 800    ( 325mm x 203mm )   79
> 12  1280 x 720    ( 325mm x 182mm )   80   81   82
> 13  1152 x 864    ( 292mm x 219mm )   83
> 14  1024 x 768    ( 260mm x 195mm )   84   85   86
> 15   800 x 600    ( 203mm x 152mm )   87   88   89
> 16   720 x 576    ( 182mm x 146mm )   90
> 17   720 x 480    ( 182mm x 121mm )   91
> 18   640 x 480    ( 162mm x 121mm )   92   93   94
> 19  2560 x 1600   ( 650mm x 406mm )   95
> 20  2560 x 1440   ( 650mm x 365mm )   96
> 21  1920 x 1200   ( 487mm x 304mm )   97
> 22  1600 x 1200   ( 406mm x 304mm )   98
> 23  1366 x 768    ( 346mm x 195mm )   99
>Current rotation - normal
>Current reflection - none
>Rotations possible - normal left inverted right
>Reflections possible - X Axis Y Axis
>Setting size to 0, rotation to normal
>Setting reflection on neither axis
>
>Incidentally if i issue the -r 50 command to xrandr, the TV is happy, and
>the tv info displays 1920x1080 60p.
>
>So my options are to turn off xrandr support.. (not ideal, as I use it to
>change the resolution when watching 4k stuff [which works fine])..or
>manually change the rate with xrandr -r 50 (with an laptop - not WAF
>friendly!).
>
>TV is a Samsung 4k (from 2016), video card is nvidia 1050.
>I originally found this on ubuntu 16.04.5 with myth master from the
>summer.  I don't quite know what changed following the reboot.. maybe
>unapplied updates?
>I tested today with ubuntu 18.04 with latest myth master, same behavior.
>
>Any suggestions?

I believe that some of the xrandr mode numbers are representing modes
other than what the number suggests.  I think that comes about from
the mode numbers being integers, so exact matches to modes that would
need a floating point number are not possible.  I think the Nvidia
documentation (html normally installed somewhere under /usr/share I
think) has a list of the values for the Nvidia drivers.

I had a problem with my laptop (MSI GT70, Nvidia 670M) in 16.04 where
mythfrontend would start up and set the desktop to a window that was
about a third of the size of the screen.  I had to make sure that I
had a command prompt available that I could Alt-tab to and do an
xrandr --auto from there (blindly as I usually could not see the bit
of that window where the typing was happening).  The xrandr --auto
command always fixed the problem for me.  Now that I have upgraded to
18.04, that problem has gone away.  And it had been working fine in
14.04.

As part of the 18.04 upgrade, I believe I was updated to a later
version of the Nvidia drivers.  So you should check and see if there
are later drivers that support your 1050 card.


More information about the mythtv-users mailing list