More fun with URandR

Yesterday I passed the oral English exam (which went great, by the way) and now I’m so stressed that I have decided to take a day off before to start studying for the oral Spanish exam. I messed with my laptop and replaced Fedora 7 with Ubuntu Gutsy, which seems to work great.

A few days ago I discovered that I could solve the problem with RandR 1.2 and the black & white screen on my television. I had to use an S-Video cable and a S-Video to CART adapter (since a S-Video to Composite adapter doesn’t solve the problem). Then I only had to set my TV to the S2 mode (so that it can use an S-Video cable). This method works fine on both Debian Sid and Ubuntu Gutsy however the TV is seen as supporting only a 30Hz refresh rate. Compiling and installing the latest release of RandR from GIT solved the problem (I can use it at 60Hz now). I can also switch between PAL, NTSC, NTSC-J, etc. and, if my TV were a HDTV, I would also be able to choose 720p, 1080p, etc.

Unfortunately the latest version of RandR is not available in Ubuntu Gutsy or in Debian Sid but I hope it will make it to Ubuntu’s stable release. I’ll implement these new features in URandR ASAP.

Enough talk. My adapter looks like the following:

Here are some screenshots of URandR in action (you can save these photos on your hard disk so as to see them in 1024×768):

Here is a photo of URandR on my laptop (in this photo my TV is stuck in
30Hz):

P.S. I would like to thank Keith Packard for taking the time to reply to my emails on RandR.

18 thoughts on “More fun with URandR

  1. Heya Alberto, that’s looking really good. I’d like to offer a small item of constructive criticism, however: values aren’t meaningful without units. The resolution and refresh rate fields currently only display numeric values. No doubt we both know that they are measured in px and Hz, but not everyone does, and for the sake of context and a meaningful presentation of data, it seems worthwhile to include the units.

    Regards,
    Bnonn

  2. Just for the record – since you’re living in Europe, your TV will probably be a native PAL TV (unless your TV can also manage NTSC signals), which means it displays images at 50Hz interlaced. Since you’re mentioning 60Hz, you should probably know that this is probably incorrect and your TV will still receive a 50Hz signal. Also, 30Hz should really flip your TV out completely, since a TV isn’t a multisync monitor like your average VGA monitor is. My guess is that the values displayed by URandR simply don’t match the actual refreshrates being generated by the TV output on your display adapter.
    It might very well be possible that the chip responsible for TV output supports just the official NTSC/PAL schemes being used throughout the world (actually, I expect every TV-output chip to work like this) and when put into PAL mode, re-syncs every inputsignal back to 50Hz. The creators of URandR probably live in an area where NTSC is the standard (US, Canada?), which operates at 60Hz interlaced. I’ve seen this ‘error’ dozens of times with tv-output related applications.

  3. @albertomilone

    All of the solutions you mention are really nasty nasty hacks! The whole point of the circuit I pointed you to was so you don’t loose a large portion of image clarity and colour definition. 470pF may not seem like much, but it does make the world of difference!

  4. @Matthijs
    my TV supports both 50Hz and 60Hz (at least as far as my xbox and PS2 say) while the other tvs I have at home don’t.

    The latest Xrandr code allows me to choose between 60Hz and 50Hz (which is great).

    I think the creator of XRandR and RandR lives in North America.

    @Karl
    I’m not an expert as regards cables and solders 😉
    I took those links from Wikipedia (look up S-Video there and you’ll find the whole article).

  5. I’ve already installed urandr but can’t set PAL through it.
    I have an intel GPU and randr –verbose output is as follow:

    TV connected 1024×768+0+0 (0x55) normal (normal left inverted right) 0mm x 0mm
    Identifier: 0x4e
    Timestamp: 1490408221
    Subpixel: unknown
    Clones:
    CRTC: 0
    CRTCs: 0 1
    BOTTOM: 37 (0x00000025) range: (0,100)
    RIGHT: 46 (0x0000002e) range: (0,100)
    TOP: 36 (0x00000024) range: (0,100)
    LEFT: 54 (0x00000036) range: (0,100)
    TV_FORMAT: 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
    1024×768 (0x55) 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
    800×600 (0x56) 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
    848×480 (0x57) 14.5MHz
    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
    640×480 (0x58) 11.3MHz
    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

    I’m reporting PAL problem with Intel GPUs here:
    https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/109934

  6. I’ve tried with a composite2scart converter with no success.
    However if TV_FORMAT were PAL instead of NTSC-M I’d probably solve the problem.
    What about command “xrandr –output S-video –set tv_standard pal” which is suggested in http://wiki.debian.org/XStrikeForce/HowToRandR12 ?
    I corrected it with “xrandr –output TV –auto –set tv-format PAL” with no success.
    Is it mispelled or not yet implemented in xrandr?

  7. Sorry. The command I’m trying is:
    $ xrandr –output TV –auto –set tv_standard pal
    X Error of failed request: BadName (named color or font does not exist)
    Major opcode of failed request: 155 (RANDR)
    Minor opcode of failed request: 11 ()
    Serial number of failed request: 18
    Current serial number in output stream: 18

  8. There’s no need to correct it. S-video stands for TV.

    Doesn’t this command work?
    xrandr –output S-video –set tv_standard pal

  9. Unfortunately no.
    neither “xrandr –output S-video –set tv_standard pal”
    nor “xrandr –output TV –set tv_standard pal”

    error is:
    X Error of failed request: 173
    Major opcode of failed request: 155 (RANDR)
    Minor opcode of failed request: 15 ()
    Serial number of failed request: 17
    Current serial number in output stream: 1

  10. I found this thread http://lwn.net/Articles/238156/ then I’d like to compile xrandr from GIT.
    I know that post is old (Jun 14, 2007) and xrandr shipped with gutsy should be newer then the git version the thread speaks about, but I’d like to try anyway.
    I downloaded xrandr git version but when I try ./autogen.sh I got this error “./autogen.sh: 9: autoreconf: not found”
    Any idea?

  11. found this http://readlist.com/lists/lists.freedesktop.org/xorg/2/11711.html
    where it suggests to use the option TV_FORMAT instead of tv_standard and it apparently works with PAL-M.

    $ xrandr –output TV –set TV_FORMAT PAL-M
    $ xrandr –verbose

    TV connected 1024×768+0+0 (0x55) normal (normal left inverted right) 0mm x 0mm
    Identifier: 0x4e
    Timestamp: 1649424084
    Subpixel: unknown
    Clones:
    CRTC: 0
    CRTCs: 0 1
    BOTTOM: 37 (0x00000025) range: (0,100)
    RIGHT: 46 (0x0000002e) range: (0,100)
    TOP: 36 (0x00000024) range: (0,100)
    LEFT: 54 (0x00000036) range: (0,100)
    TV_FORMAT: PAL-M
    supported: NTSC-M NTSC-443 NTSC-J PAL-M PAL-N PAL

    However nothing happens on the TV where image is still B/W.
    Moreover, when I restart X, TV_FORMAT reverts to NTSC-M

  12. Hey, when i tried to put: xrandr –output TV1 –set mode PAL-M
    it worked like a charm! 😉

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.