Wrong resolution, "Unknown monitor", on Ubuntu 16.04

5,961

The answer was originally posted in Revision #4 of the question. For more details, see revision history.

Problem solved. Here's what I did: I went to the NVIDIA website and downloaded the latex Linux driver. To install the driver you cannot have X running. I couldn't figure out how to kill X without it auto-restarting again, so I rebooted and at the GRUB menu I chose to go into failsafe mode (and made sure that the disk was mounted as re-write). Once there, I just ran the NVIDIA-supplied installer. The NVIDIA installer did a hardware test and offered to write me a new xorg.conf file. I accepted the offer and when I rebooted my screen was working perfectly. when I go to "Displays", now Ubuntu knows the exact brand of my monitor (no more "Unknown Display") and defaults to the correct resolution. So in the end, the NVIDIA installer changed two things:

  • It gave me a new driver, newer than the one available with Ubuntu.
  • It gave me a new xorg.conf file.

I don't know which of the two is responsible for fixing my computer, but right now all I care about is that my screen is not giving me head ache anymore.

Share:
5,961

Related videos on Youtube

DanielC
Author by

DanielC

Updated on September 18, 2022

Comments

  • DanielC
    DanielC over 1 year

    After some updates and a recent reboot, my screen resolution went bonkers. My problem is similar to this one and also this one, but the solutions presented there do not fix my problem. The correct setting for my monitor is 1920:1200 (i.e. 8:5 aspect ratio) at 60 Hz, but Ubuntu only offers 1600x1200 and says "Unknown display". So not only is the resolution wrong, but everything on my screen looks stretched horizontally. This is what I have done:

     % cvt 1920 1200 60
     # 1920x1200 59.88 Hz (CVT 2.30MA) hsync: 74.56 kHz; pclk: 193.25 MHz
     Modeline "1920x1200_60.00"  193.25  1920 2056 2256 2592  1200 1203
     1209 1245 -hsync +vsync
     
     % xrandr --newmode "1920x1200_60" 193.25  1920 2056 2256 2592  1200 
     1203 1209 1245 -hsync +vsync
     xrandr: Failed to get size of gamma for output default
     
     % xrandr --addmode default 1920x1200_60
     xrandr: Failed to get size of gamma for output default
    
     % xrandr --output default --mode 1920x1200_60
     xrandr: Failed to get size of gamma for output default
     xrandr: Configure crtc 0 failed
    
     % xrandr -s 1920x1200
     Failed to change the screen configuration!
    
     % xrandr
     xrandr: Failed to get size of gamma for output default
     Screen 0: minimum 1600 x 1200, current 1600 x 1200, maximum 1920 x 1200
     default connected primary 1600x1200+0+0 0mm x 0mm
        1600x1200     77.00* 
        1920x1200_60  59.88
    

    At this point, if I go to "Displays" in the GUI, my display is still called "Unknown Display", but at least "1920x1200 (16:10)" shows up as one of the resolutions. But when I select that and click "Apply", Ubuntu doesn't actually change the resolution (but it asks me if I want to keep my "new" resolution).

    Btw, notice my use of "default" where most advice comments put "VGA" or "HDMI" or similar... xrand does not recognize any of those things. It really has no idea what my display is and the only way I seem to be able to refer to it as as "default".

    I don't know what else to do. I have been trying to fix this since yesterday and nothing seems to work. My attempts to write an xorg.conf file just gave me a black screen (and I and to boot in "failsafe" mode to remove xorg.conf).

    I have been able to make an xorg.conf file that doesn't make my computer go bonkers. In fact, though it doesn't fix my problem, it does add more resolutions to the list. So clearly it's doing "something". This is the xorg.conf file:

    Section "Device"
            Identifier      "Configured Video Device"
            Driver          "vesa"
    EndSection
    
    Section "Monitor"
            Identifier      "Configured Monitor"
            Modeline        "1920x1200"  193.25  1920 2056 2256 2592  1200 1203 1209 1245 -hsync +vsync
    EndSection
    
    Section "Screen"
            Identifier      "Default Screen"
            Monitor         "Configured Monitor"
            Device          "Configured Video Device"
            SubSection "Display"
                    Modes "1920x1200_60"
            EndSubSection
    EndSection
    

    The result of using this file is that when I boot into Ubuntu and go to "Displays", I actually see a list of options:

    • 1600x1200 (4:3)
    • 1280x1024 (5:4)
    • 1024x768 (4:3)
    • 800x600 (4:3)

    So... the new options aren't any good, and it's still "Unknown Display". But this is the first time I got an xorg.conf file that didn't completely hose the system. I hope that a clever mind can turn this into a solution.

    Output of lspci

    % lspci|grep -i vga
    0f:00.0 VGA compatible controller: NVIDIA Corporation GF106GL
    [Quadro 2000] (rev a1)
    

    So Ubuntu knows that I have an Nvidia graphics card. Right now I am using the open source X.Org Nouveau driver, but I have tried the binary drivers from NVidia too. When I go to the "Software and Updates" program and go to the "Additional Drivers" tab, Ubuntu offers me the open source driver and various binary drivers. The most recent binary driver it offers is 367.57 and that one doesn't fix the issue, nor does it get Ubuntu to call my display anything other than "Unknown Display".

    • negusp
      negusp over 7 years
      May you please add the output of lscpi | grep vga?
    • DanielC
      DanielC over 7 years
      Sure. I just added the lspci output to the original post. The summary is that I have an Nvidia card that Ubuntu can detect correctly.
    • sinekonata
      sinekonata almost 5 years
      You are a hero. This installing of 340.107 solved all my problem and created no further problems. It's probably the xorg.conf file that was the problem because I had this problem of yours with the Nouveau driver as well.