Going Linux

   for computer users who just want to use Linux to get things done

How To Setup a 1080P HDTV as a Monitor Connected to a VGA Port

Updated: 12-Feb-2014
Display settings

I want a huge 1080P monitor for my notebook. That was the motivation that started me on the quest to find a way to make my 14” HP notebook, running Linux Mint, display it’s minty goodness on a high resolution, high definition television in my home office.

The justification

After repainting and rearranging my home office, I had the brilliant idea to occupy that empty wall across the room with a high definition television. I thought, “Nothing massive. A 40- or 42-inch model will do.” Retroactively justifying my decision, I told myself that I would be able use it to watch television, try out new devices with HDMI inputs and use it as a 1080P monitor for my computer. It would make me more productive, I thought. I could have show notes for the podcast and the Audacity audio editing program on either side of the screen, and still see each at almost the full resolution of my small 14” laptop screen. Realizing that, until Linux had better support for HDMI, I might need to connect to the new HDTV using a VGA cable. I searched high and low to find an HDTV with a VGA input. And I found one! It was an inexpensive off-brand model with both HDMI and VGA inputs. This bargain model did not have the best specs for use as a television, but my intended main use was as a monitor, so I made the purchase. I also bought an extra-long VGA cable and an extra-long HDMI cable so that I could make the connections on both sides of the office without having to stretch the cables across the center of the room.

The problem to be solved

With the HDTV tested for out-of-box failure and then mounted securely to the wall, I was ready to fiddle with the connections as a monitor. I had already verified that the cables would reach and that each was capable of producing an image on the television. With Linux Mint 15, the HDMI connection, as expected, did not perform all that well. So I turned my attention to the VGA connection.

Without any setup other than to connect one end of the VGA cable to the computer and the other to the television, I was able to produce only a 4:3 image on the television at a disturbingly low resolution of 1024x768. Now all that remained was to get the computer to take advantage of the increased screen real estate available on an HDMI display.

The setup

With the help of a couple of forum and blog posts (isn’t open source support wonderful?) I was able to make my computer’s VGA port output in full 16:9, 1920x1080 resolution. Here’s how I did it.

  1. Open terminal and run xrandr to find the names of your monitors and your available resolutions.
    xrandr -q
  2. If you are following along and don’t get a screen full of display resolution information, you will need to install xrandr first. With Linux Mint, it’s pre-installed. You should see something like this.
    Screen 0: minimum 320 x 200, current 2048 x 768, maximum 4096 x 4096
    LVDS1 connected primary 1024x768+1024+0 (normal left inverted right x axis y axis) 309mm x 173mm
    1366x768 60.1
    1360x768 59.8 60.0
    1024x768 60.0*+
    800x600 60.3 56.2
    640x480 59.9
    VGA1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
    1024x768 60.0*+
    800x600 60.3 56.2
    848x480 60.0
    640x480 59.9
    HDMI-1-0 disconnected (normal left inverted right x axis y axis)

    LVDS1 is my laptop’s screen. VGA1 is the VGA port. You can see that Mint has automatically chosen the highest common resolution between the two monitors, 1024x768.
  3. To add an undetected 1920 x 1080 (60Hz) resolution, I first used the cvt command to get the settings I needed.
    cvt 1920 1080 60
  4. This command produced the following output.
    #1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
    Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
  5. Before I made the setting permanent, I thought I would try it on for size. Using the “Modeline” part of the cvt output, I crafted and executed an xrandr command to tell my computer that the new resolution is available for use.
    xrandr --newmode "1920x1080" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
  6. Finally, I used this command to add this new resolution to the VGA port.
    xrandr --addmode VGA1 "1920x1080"

Next, opening the standard Display settings in Linux Mint, I selected the VGA display and was able to set the resolution to 1920x180 and the HDTV was now functioning as a high resolution monitor. Success!

Making the new resolution persistent after reboot

Since I used the xrandr command to make the new resolution available, I knew that I would have to execute that command again if I ever rebooted the computer. I chose to do this automatically at startup with a script. There are a number of ways to make the new resolution available at startup that don’t involve a script. Some are described in the forum and blog posts. I chose to write a shell script that runs xrandr when my computer starts that applies the missing resolution. I also added 3 more resolutions that I find handy. Here is that final script. I made it executable and placed it in a folder called “bin” in my home folder and added the script as a startup program.

xrandr --newmode "1920x1080" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr --newmode "1368x768" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync
xrandr --newmode "1280x720" 74.50 1280 1344 1472 1664 720 723 728 748 -hsync +vsync
xrandr --newmode "1440x1050" 125.25 1440 1528 1680 1920 1050 1053 1063 1089 -hsync +vsync
xrandr --addmode LVDS1 "1280x720"
xrandr --addmode VGA1 "1920x1080"
xrandr --addmode VGA1 "1440x1050"
xrandr --addmode VGA1 "1368x768"

Today, I am running Linux Mint 16 on that same screen, and Linux support for HDMI has improved to the point that using an HDMI cable functions perfectly. Somehow though, I prefer the slightly fuzzy, warm feeling that the analog VGA display provides to the crisp, pixel perfect screen afforded by that digital cable. VGA at 1920x1080 is perfect for me.


Site Created with theMaker for Linux

Theme music for the Going Linux podcast is generously provided by Mark Blasco. https://www.podcastthemes.com
Creative Commons License Going Linux Podcast by Larry Bushey is licensed under a Creative Commons Attribution 4.0 International License.