Kirsle.net logo Kirsle.net

Linux S-Video Nightmares

February 27, 2010 by Noah
Several months ago I decided to convert my old Acer Aspire 5050 laptop into a media center PC, because it's the only computer in the apartment that has an S-video port, and that's the only input my TV will accept.

The laptop has an ATI Radeon Xpress 1100 (a.k.a. Xpress 200M), and it seems that just months after I bought this laptop a couple years ago, ATI obsoleted that card. So, I've been using just Windows XP on the laptop since converting it to a media center PC, because getting the S-video to work in Linux with the obsolete/unsupported drivers was a nightmare.

Windows, however, annoys me. I'm using the VLC Player for my DVD-playing needs, because it's pretty much the only program I can get to actually play DVD's. But it's annoying, and half the time when I start up Windows and tell VLC to play my DVD, VLC starts crashing the whole system really hard and forcing a reboot. I'd much rather have Linux around for situations like this.

Today I installed Ubuntu 9.10 on the laptop. I would've installed Fedora 12, but I don't have any LiveCD's handy at the moment. I installed it in a dual-boot way so that Windows XP is still there if things blow up.

So far, I'm pretty sure I'm using the default drivers Ubuntu picked for my video card, unless me installing "atitvout" accidentally pulled in the fglrx drivers or something. So it's either radeon or fglrx right now; I dunno which.

Anyway, the S-video port doesn't detect the TV at all without some manual fscking around with it. I eventually found a collection of xrandr commands I can run to force it to detect the S-video port and add an 800x600 mode to it and a couple other things.

I wound up writing this small shell script, so after I log on to the desktop I run this in the terminal and pray that the TV will get a signal from the laptop, and display a second desktop on it without it being all scrambled:

#!/bin/bash

xrandr
xrandr --output S-video --set load_detection 1
xrandr --output S-video --set tv_standard ntsc
xrandr --addmode S-video 800x600
xrandr --output S-video --right-of LVDS --mode 800x600
Here, LVDS is the built-in LCD screen on the laptop. Line 2 forces xrandr to detect S-video, line 3 sets it to use NTSC standards (PAL for outside the US), line 4 adds an 800x600 mode to it (which is pretty much standard for dinosaur TV's like the one I have), and line 5... might actually activate the second monitor and extend my desktop to it.

The last line there is hit-or-miss. It seems to have an 80% chance of showing a scrambled output on my TV, a 10% chance of sending no signal at all (TV goes to a black screen), and finally a 10% chance of doing what I want it to do: actually show my extended desktop clearly.

So, I copied that very last line into a separate shell script called "tv-retry.sh", so after running "tv-out.sh" (the first script) I run this second one for however many times it takes for my TV to show a clear picture.

Here's my terminal output from the last time I got the TV to work:

kirsle@ubuntu:~$ sh tv-out.sh
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 2560 x 800
VGA-0 disconnected (normal left inverted right x axis y axis)
LVDS connected 1280x800+0+0 (normal left inverted right x axis y axis) 304mm x 190mm
1280x800       59.9*+
1280x720       59.9
1152x768       59.8
1024x768       59.9
800x600        59.9
640x480        59.4
S-video disconnected (normal left inverted right x axis y axis)
xrandr: cannot find mode 800x600
kirsle@ubuntu:~$ sh tv-out.sh
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 2560 x 800
VGA-0 disconnected (normal left inverted right x axis y axis)
LVDS connected 1280x800+0+0 (normal left inverted right x axis y axis) 304mm x 190mm
1280x800       59.9*+
1280x720       59.9
1152x768       59.8
1024x768       59.9
800x600        59.9
640x480        59.4
S-video disconnected (normal left inverted right x axis y axis)
kirsle@ubuntu:~$
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
xrandr: cannot find mode 800x600
kirsle@ubuntu:~$ sh tv-retry.sh
xrandr: cannot find mode 800x600
kirsle@ubuntu:~$ sh tv-retry.sh
xrandr: cannot find mode 800x600
kirsle@ubuntu:~$ sh tv-out.sh
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 2560 x 800
VGA-0 disconnected (normal left inverted right x axis y axis)
LVDS connected 1280x800+0+0 (normal left inverted right x axis y axis) 304mm x 190mm
1280x800       59.9*+
1280x720       59.9
1152x768       59.8
1024x768       59.9
800x600        59.9
640x480        59.4
S-video disconnected (normal left inverted right x axis y axis)
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-out.sh
Screen 0: minimum 320 x 200, current 2080 x 800, maximum 2560 x 800
VGA-0 disconnected (normal left inverted right x axis y axis)
LVDS connected 1280x800+0+0 (normal left inverted right x axis y axis) 304mm x 190mm
1280x800       59.9*+
1280x720       59.9
1152x768       59.8
1024x768       59.9
800x600        59.9
640x480        59.4
S-video connected 800x600+1280+0 (normal left inverted right x axis y axis) 0mm x 0mm
800x600        59.9*+   59.9*
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
kirsle@ubuntu:~$ sh tv-retry.sh
It would've been much easier if this video card wasn't made obsolete right after I bought this laptop. Stupid ATI! This is why I like Nvidia more, just in case you were wondering; Nvidia works better in Linux, and they at least support their old unsupported cards (or somebody does, at least).
Tags:

Comments

There are 6 comments on this page. Add yours.

Avatar image
sturmey posted on June 7, 2010 @ 19:40 UTC

hi, great article, found one or two things wrong at least with "lucid" commands were out of order. should be xrandr xrandr --addmode S-video 800x600 xrandr --output S-video --set "tv standard" ntsc xrandr --output S-video --set "load detection" 1 xrandr --output S-video --right-of VGA-0 --mode 800x600 I had to ad a S-video mode before any other commands worked. the variables "load detection" and "tv standard" have spaces in them, and not underscores. (this may be a version issue)

Avatar image
Rajesh G posted on September 8, 2010 @ 10:36 UTC

Hi, Good article !!, It would be great help if you could help with my issue. When I run xrandr, I couldn't line, similar to, "S-video disconnected (normal ...." So I guess, my S-video itself is not detected.. Any idea how to enable it?

Thanks, Rajesh (garyrajesh@gmail.com)

Avatar image
edmond posted on January 13, 2011 @ 13:46 UTC

hi,

like you, i also took an old laptop and enabled it to watch videos via vlc on a 4:3 tv. my problem is that the color is much redder than on the screen of the laptop. what is the best way to adjust the color on the tv via ubuntu? thanks.

Avatar image
jon posted on October 1, 2012 @ 00:50 UTC

@sturmey thanx the code helped with debian

Avatar image
Freddy Vulto posted on December 24, 2012 @ 22:57 UTC

I'm having the same problem with an ATi Radeon 9250 PCI video card. I can get output on both DVI-0 and S-video following this workaround/procedure:

  1. downgrade desktop to tv resolution (800x600) and output S-video:

xrandr --addmode S-video 800x600 xrandr --output DVI-0 --mode 800x600 --output S-video --same-as DVI-0 --mode 800x600

  1. after xrandr commands, switch between terminal (CTRL-ALT-F1) and desktop (CTRL-ALT-F7) twice(!) with 5 second pauses between switches.

Freddy Vulto http://fvue.nl/wiki/Linux:_S-video_output

Avatar image
Freddie Ortega posted on November 14, 2014 @ 06:29 UTC

I'm only doing the S-Video port to try and see if i can use it to record console gameplay

Add a Comment

Used for your Gravatar and optional thread subscription. Privacy policy.
You may format your message using GitHub Flavored Markdown syntax.