Software & AppsOperating SystemLinux

How To Fix 16:9 Aspect Ratio Display Issue on Ubuntu with VGA Connection to TV

Ubuntu 8

In this article, we will delve into the steps required to fix the 16:9 aspect ratio display issue on Ubuntu when connected to a TV via a VGA connection. This guide will be helpful for those who are experiencing difficulties in getting the correct aspect ratio when connecting their Ubuntu system to a TV.

Understanding the Problem

Before we dive into the solution, it’s important to understand the problem. The aspect ratio is the ratio between the width and height of the screen. The most common aspect ratio for TVs is 16:9, which is ideal for most movies and TV shows. However, when connecting your Ubuntu system to your TV via VGA, you may encounter issues with the display not correctly filling the screen or not maintaining the correct aspect ratio.


Before we begin, please ensure that you have the following:

  • Ubuntu system with a VGA output
  • TV with a VGA input
  • VGA cable

Step-by-Step Guide to Fixing the Aspect Ratio

Step 1: Open Terminal

The terminal is where we’ll be entering the commands to fix the aspect ratio. You can open it by pressing Ctrl + Alt + T on your keyboard.

Step 2: Generate a Modeline

In the terminal, type the following command:

sudo cvt 1366 768

Replace 1366 and 768 with the desired resolution. This command generates a modeline, which is a configuration line that defines a display mode for the X server.

Step 3: Create a New Mode

Copy everything after “Modeline” from the terminal output. Then, paste the copied text into the following command:

sudo xrandr --newmode "1366x768_60.00" 74.50 1280 1344 1472 1664 720 723 728 748 -hsync +vsync

Replace the numbers with the values from the copied text. This command creates a new mode with the desired resolution.

Step 4: Add the New Mode

Add the new resolution to the VGA1 output by running the following command:

sudo xrandr --addmode VGA1 1366x768_60.00

Replace VGA1 with the correct output name if needed. This command adds the new mode to the specified output.

Step 5: Test the New Mode

At this point, you should have the desired resolution for your TV. However, if your TV only accepts 1080p from some sources, you can try changing the resolution to 720p.

Step 6: Save the Settings

To keep the settings after a restart, you can add the above commands to your .bashrc file. This file is a script that is executed whenever you open a new terminal window. You can edit this file with a text editor like nano:

nano ~/.bashrc

Then, add the commands at the end of the file, save it, and exit.


By following these steps, you should be able to fix the 16:9 aspect ratio display issue on Ubuntu with a VGA connection to a TV. Remember to adjust the commands and resolutions according to your requirements and the capabilities of your TV. If you’re still experiencing issues, it may be worth checking the model of your TV and searching for specific instructions or recommendations for setting the resolution.

What if my TV does not have a VGA input?

If your TV does not have a VGA input, you will need to use an adapter or converter to connect your Ubuntu system to your TV. There are various adapters available, such as VGA to HDMI or VGA to DVI, depending on the available input ports on your TV. Make sure to choose the appropriate adapter for your specific situation.

Can I use a different resolution than 1366×768?

Yes, you can use a different resolution than 1366×768. In Step 2, when generating the modeline, replace "1366" and "768" with the desired resolution. However, make sure that your TV supports the chosen resolution. It’s recommended to consult your TV’s manual or specifications to determine the supported resolutions.

How do I find the correct output name for my VGA connection?

To find the correct output name for your VGA connection, you can use the xrandr command without any arguments. In the terminal, type xrandr and press Enter. It will display a list of available outputs, including your VGA connection. Look for the output name that corresponds to your VGA connection, such as VGA1 or VGA-0.

Can I undo the changes if something goes wrong?

Yes, you can undo the changes if something goes wrong. To revert back to the previous settings, you can remove the added mode by running the command sudo xrandr --delmode VGA1 1366x768_60.00 (replace VGA1 with the correct output name if needed). Additionally, you can remove the created mode by running the command sudo xrandr --rmmode 1366x768_60.00. These commands will remove the added mode and the created mode, respectively.

What should I do if the aspect ratio issue persists after following the steps?

If the aspect ratio issue persists after following the steps, it’s possible that your TV has limitations or compatibility issues with the VGA connection. In such cases, it may be helpful to consult the user manual or support resources for your TV to see if there are specific recommendations or troubleshooting steps for connecting via VGA. Additionally, you can try using different cables or adapters, or consider alternative connection methods like HDMI or DVI if available.

Leave a Comment

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