16

I am trying to enable a HDMI connection to a monitor connected with a HDMI cable to my Lenovo laptop using the following commands.

> xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 1600 x 900, current 1600 x 900, maximum 1600 x 900
default connected primary 1600x900+0+0 0mm x 0mm
   1600x900       77.0* 
> cvt 1920 1080
# 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
> xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
xrandr: Failed to get size of gamma for output default
> xrandr --addmode VGA1  1920x1080_60.00
xrandr: Failed to get size of gamma for output default
xrandr: cannot find output "VGA1"

Is there something wrong with the commands? Is there something wrong with xrandr? Maybe I need to install additional packages?

0

5 Answers 5

13

First, you must know the name of your output devices. To do that execute this on the command line:

xrandr --listmonitors You will get something like this: Monitors: 2 0: +*HDMI-0 1920/510x1080/290+0+0 HDMI-0 1: +VGA-0 768/203x1024/271+1920+0 VGA-0

Then you run xrandr with the right name. In my case:

xrandr --addmode VGA-0 1656x900_60.00

3

Package firmware-linux-nonfree (or analog) installed?

I had the same problem on a laptop with and ATI video card and open source radeon driver (Debian Wheezy).

After installing firmware-linux-nonfree, xrandr works correctly.

2

You said that you were trying to connect a HDMI monitor, but how come that you tried to invoke xrandr on VGA output?

Either way...

xrandr: Failed to get size of gamma for output default
Screen 0: minimum 1600 x 900, current 1600 x 900, maximum 1600 x 900
default connected primary 1600x900+0+0 0mm x 0mm

The fact that your xrandr does not list any output except default and fails to acquire monitor dimension, shows that your system is running off a VESA (a la Super VGA) fallback driver.

In this state, you would have no hope on using any non-default output, or even set a proper resolution on default output; let alone adding custom video timings like you originally tried to do.

You will have to find and install a proper driver first; that's the hard part. Use lspci to find your graphics chip, and search the Internet for it. (Also see @n2h4's answer)

Once proper driver is up and running, xrandr will work correctly. And with that, once you plug your monitor, chances would be that it starts to display automatically without needing any special command.


P.S. Your system BIOS might support a provision for using non-default output even when you don't have a driver. All you have to do is plugging-in the HDMI or VGA cable while your system is booting up (while BIOS POST screen is displaying; doing this after Linux kernel started will not work). If it works, the main screen would turn off, and you would see your boot screen on the external display.

I had been taking advantage of this provision on my Samsung laptop for a year, before I could manage to upgrade the system to the one with proper driver for the Intel graphics chip I use.

1

You're specifying VGA1, but there isn't any such output.

Failed to get size of gamma for output default
                                ^^^^^^^^^^^^^^
default connected primary 1600x900+0+0 0mm x 0mm
^^^^^^^

So try:

xrandr --addmode default  1920x1080_60.00
                 ^^^^^^^
9
  • And how can I 'activate' this new mode? I have a monitor connected which still is black... Commented Dec 29, 2014 at 18:14
  • Looking at the man page, I think: xrandr --output default --mode 1920x1080_60.00. Commented Dec 29, 2014 at 18:24
  • This gives an error 'xrandr: Configure crtc 0 failed'. Commented Dec 29, 2014 at 18:25
  • Yeah, I just noticed the bit about "external monitor" (I think I have the specific answer to "cannot find output" correct though). There's then a problem, because you only have the one output showing when obviously there should be at least 2 -- if I run just xrandr (toshiba laptop) I get 4, 3 of which are shown as disconnected (including VGA1 and HDMI1). Commented Dec 29, 2014 at 18:31
  • So how to configure Ubtuntu so xrandr shows more than one output? I have put my output which only lists one 'default' output, and no VGA1 or HDMI1... Commented Dec 29, 2014 at 18:33
1

Try to type "VGA-1" instead of "VGA1".

I had the same problem with Ubuntu 16.04 LTS. Changing "VGA1" to "VGA-1" fixed the problem.

Actually you can see what is the name of the output you trying to find (and manage) by typing in the terminal: xrandr --listmonitors. In my case (also a Lenovo) its name was "VGA-1".

3
  • 2
    Why should this help? (Please edit your answer to explain this, for the benefit of future readers.) Commented Nov 26, 2017 at 20:49
  • @roaima, sorry, I am a noob. ^_^ Commented Nov 27, 2017 at 17:52
  • 2
    It doesn't matter what level you consider yourself to be. If you know an answer you're very welcome to share it. But "Do X because it works" type answers are generally less useful than those like "Do X because of reasons 1, 2, 3". Welcome to unix.SE. I hope you enjoy your time here! Commented Nov 27, 2017 at 20:11

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.