Comment 16 for bug 480220

Revision history for this message
In , Xake (xake-rymdraket) wrote :

Today I had some time to invest into this.
I got the latest git source from linus kernel tree (commit 7c9abfb884b8737f0afdc8a88bcea77526f0da87), compiled it and started it.
This has all to do with my startup scripts first setting "xrandr --set mode PAL" (since there is no other way) and then a application sets "xrandr --mode 1024x768". If I never do set the mode to PAL everything (except for the picture flashing a bit brigther) works correctly. Below I have documented how I found a way to reproduce using xrandr and glxgears (and xterm as a non-3d reference window).

starting computer to console. Logging in using ssh as your favorite user. ## prefixes comments about what I am about to do, $ prefixes commands of what I did:

## Start X and wait for it to settle
$ X &
## To make life easier
$ export DISPLAY=":0"
## Starting xterm to have a non-3d window open as reference
$ xterm &
## I will only post info about TV1 as all else is disconnected
## note that the display is setup for NTSC-M and 1024x768
$ xrandr --verbose
TV1 connected 1024x768+0+0 (0x44) normal (normal left inverted right x axis y axis) 0mm x 0mm
 Identifier: 0x43
 Timestamp: 118579
 Subpixel: unknown
 Clones:
 CRTC: 0
 CRTCs: 0 1
 Transform: 1.000000 0.000000 0.000000
             0.000000 1.000000 0.000000
             0.000000 0.000000 1.000000
            filter:
 bottom margin: 37 (0x00000025) range: (0,100)
 right margin: 46 (0x0000002e) range: (0,100)
 top margin: 36 (0x00000024) range: (0,100)
 left margin: 54 (0x00000036) range: (0,100)
 mode: NTSC-M
  supported: NTSC-M NTSC-443 NTSC-J PAL-M
             PAL-N PAL 480p@59.94Hz 480p@60Hz
             576p 720p@60Hz 720p@59.94Hz 720p@50Hz
             1080i@50Hz 1080i@60Hz 1080i@59.94H
  1024x768 (0x44) 26.9MHz *current +preferred
        h: width 1024 start 1025 end 1088 total 1120 skew 0 clock 24.0KHz
        v: height 768 start 769 end 800 total 801 clock 30.0Hz
  848x480 (0x45) 14.5MHz +preferred
        h: width 848 start 849 end 912 total 944 skew 0 clock 15.4KHz
        v: height 480 start 481 end 512 total 513 clock 30.0Hz
  640x480 (0x46) 11.3MHz +preferred
        h: width 640 start 641 end 704 total 736 skew 0 clock 15.4KHz
        v: height 480 start 481 end 512 total 513 clock 30.0Hz
  800x600 (0x47) 17.0MHz
        h: width 800 start 801 end 864 total 896 skew 0 clock 19.0KHz
        v: height 600 start 601 end 632 total 633 clock 30.0Hz

## Start glxgears and see if it displays properly
$ glxgears
## For me it does, and after killing it with Ctrl-C I proceed
## Becouse that my TV is a PAL tv I ofcourse want it to use it
$ xrandr --output TV1 --set mode PAL
## Starting glxgears again and visually confirm it works
$ glxgears
## It still displays properly
## Looking at xrandr --verbose I discovers that is does not any longer has *current for 1024x768
$ xrandr --verbose
TV1 connected 1024x768+0+0 (0x44) normal (normal left inverted right x axis y axis) 0mm x 0mm
 Identifier: 0x43
 Timestamp: 490284
 Subpixel: unknown
 Clones:
 CRTC: 0
 CRTCs: 0 1
 Transform: 1.000000 0.000000 0.000000
             0.000000 1.000000 0.000000
             0.000000 0.000000 1.000000
            filter:
 bottom margin: 37 (0x00000025) range: (0,100)
 right margin: 46 (0x0000002e) range: (0,100)
 top margin: 36 (0x00000024) range: (0,100)
 left margin: 54 (0x00000036) range: (0,100)
 mode: PAL
  supported: NTSC-M NTSC-443 NTSC-J PAL-M
             PAL-N PAL 480p@59.94Hz 480p@60Hz
             576p 720p@60Hz 720p@59.94Hz 720p@50Hz
             1080i@50Hz 1080i@60Hz 1080i@59.94H
  1024x768 (0x106) 22.4MHz +preferred
        h: width 1024 start 1025 end 1088 total 1120 skew 0 clock 20.0KHz
        v: height 768 start 769 end 800 total 801 clock 25.0Hz
  848x480 (0x107) 12.1MHz +preferred
        h: width 848 start 849 end 912 total 944 skew 0 clock 12.8KHz
        v: height 480 start 481 end 512 total 513 clock 25.0Hz
  640x480 (0x108) 9.4MHz +preferred
        h: width 640 start 641 end 704 total 736 skew 0 clock 12.8KHz
        v: height 480 start 481 end 512 total 513 clock 25.0Hz
  800x600 (0x109) 14.2MHz
        h: width 800 start 801 end 864 total 896 skew 0 clock 15.8KHz
        v: height 600 start 601 end 632 total 633 clock 25.0Hz
  1024x768 (0x44) 26.9MHz
        h: width 1024 start 1025 end 1088 total 1120 skew 0 clock 24.0KHz
        v: height 768 start 769 end 800 total 801 clock 30.0Hz
## What will happend if I reset it to 1024x768?
$ xrandr --output TV1 --mode 1024x768
## xterm still looks fine and has done all the time, what about glxgears?
$ glxgears
## And here the whole screen starts to spin vertically...
## Killing glxgears and xterm displays fine again.