Ubuntu: TV-out with nVidia card

Step-by-Step descriptions of how to do things.
Post Reply
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

Ubuntu: TV-out with nVidia card

Post by ^rooker »

Here's a bash script that turns TV-output mode on/off using nvtv (a tool for nvidia based cards).
It's based on info from another nvtv HowTo, with minor modifications (Different overscan parameter - I prefer "Huge" instead of "Normal", since this utilizes my TV better by cutting some of the edges)

Code: Select all

#!/bin/bash
# Toggles TV-Out mode.
# Based on info from: http://wiki.ubuntuusers.de/NVtv

case "$1" in
on)     echo "Turning TV out $1..."
        xrandr -s 800x600
        nvtv -r 800,600 -s Huge -X -t
        ;;

off)    echo "Turning TV out $1..."
        nvtv -m
        sleep 1
        xrandr -s 0
        ;;

*)      echo "Syntax: $0 [on|off]"
esac



Some things I've learned:
- Switching your X server resolution using Ctrl+Alt+[+|-] will not work properly for fullscreen displaying of e.g. movies, since you will be able to scroll within a virtually bigger desktop.
(e.g. virtually it stays at 1280x1024, but you only see a range of 800x600)

- "xrandr" can be used to switch the resolution of your X server without the necessity to restart it. I was really amazed to find that it's really intuitive that it doesn't only offer explicit resolutions as parameter, but also accessing the indexed resolutions from xorg.conf. Example:

xrandr -s 1280x1024 -or- xrandr -s 0

Second syntax makes it possible to switch to your default resolution, no matter what it is.
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply