9

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?

5

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

| improve this answer | |
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.

| improve this answer | |
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".

| improve this answer | |
  • 2
    Why should this help? (Please edit your answer to explain this, for the benefit of future readers.) – roaima Nov 26 '17 at 20:49
  • @roaima, sorry, I am a noob. ^_^ – Anton Markov Nov 27 '17 at 17:52
  • 1
    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! – roaima Nov 27 '17 at 20:11
1

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.

| improve this answer | |
0

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
                 ^^^^^^^
| improve this answer | |
  • And how can I 'activate' this new mode? I have a monitor connected which still is black... – Alex Dec 29 '14 at 18:14
  • Looking at the man page, I think: xrandr --output default --mode 1920x1080_60.00. – goldilocks Dec 29 '14 at 18:24
  • This gives an error 'xrandr: Configure crtc 0 failed'. – Alex Dec 29 '14 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). – goldilocks Dec 29 '14 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... – Alex Dec 29 '14 at 18:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.