Can't set 2560x1440 resolution on Ubuntu 20.04 with Intel Graphics Card

5,024

Solution 1

According to the log you posted, your HDMI output is limited to a 250 MHz pixel clock:

(--) modeset(0): HDMI max TMDS frequency 250000KHz

This may be a limitation of your screen, your cable and/or video chip. Anyway, you have to work within this limit.

The cvt tool, used without specific option, produces standard VESA CVT modelines with "comfortable" blanking times, suitable for most displays at the time the standard was created.

Running it with your desired resolution and refresh rate (like you did) gives the following modeline:

# 2560x1440 59.96 Hz (CVT 3.69M9) hsync: 89.52 kHz; pclk: 312.25 MHz
Modeline "2560x1440_60.00"  312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync

This modeline requires a 312.25 MHz pixel clock, which is more than what your HDMI output can provide.

Having "comfortable" blanking times is not necessary nor relevant to an HDMI output, so "reduced" blanking times can be used. cvt has a --reduced option for that purpose. Running cvt --reduced 2560 1440 60 gives the following modeline:

# 2560x1440 59.95 Hz (CVT 3.69M9-R) hsync: 88.79 kHz; pclk: 241.50 MHz
Modeline "2560x1440R"  241.50  2560 2608 2640 2720  1440 1443 1448 1481 +hsync -vsync

This one has a 241.50 MHz pixel clock, which should work with your HDMI output.

Actually, decoding your EDID output at http://www.edidreader.com/ gives exactly the timing given by the cvt --reduced command. Since the information in the EDID is what your screen believes you should use, the generated modeline above has all the chances to work on your system.

One mystery remains: why it did not work straight out of the box. I am using a 2560x1440 display and had no such issue.

Solution 2

I had the same issue, in Windows it works with 2k resolution but not in PopOs.

You can also run at 60 Hz which you can do as follows:

In Windows get the EDID using "monitor asset manager" software. From this copy the modeline for 2560x1440 resolution (preferred resolution in Windows), from realtime EDID or from the Windows registry option choice (both will be mostly the same).

Then you can you use these modeline values in xrandr --newmode and then xrandr --addmode <interface> <resolution>(check names by xrandr).

This approach worked for me. I tried using cvt tool to generate modeline but that didn't work. Here since Windows can use those modelines then it is possible that Linux will also works, since monitor is same.

Solution 3

Do you have a second HDMI cable you could try? I know it sounds silly, but I ran into a very similar problem in the past (monitor would only do 1920x1080 instead of 2560x1080) and the solution was to simply replace the cable.

Share:
5,024

Related videos on Youtube

cpederson
Author by

cpederson

Updated on September 18, 2022

Comments

  • cpederson
    cpederson over 1 year

    So I have an HP monitor attached to my laptop as an external monitor. The documentation for the monitor says that the optimum resolution using their supplied HDMI cable is 2560x1440 @ 60 Hz. When I boot into Windows, I can get that resolution. But no matter what I try, I can't get that resolution in Ubuntu 20.04.

    I do not have a DisplayPort connection on my laptop, so I am using the supplied HDMI cable.

    I've tried to set the resolution using xrandr --admode, but the new mode fails:

    $ cvt 2560 1440 60
    # 2560x1440 59.96 Hz (CVT 3.69M9) hsync: 89.52 kHz; pclk: 312.25 MHz
    Modeline "2560x1440_60.00"  312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync
    $ xrandr --newmode "2560x1440" 312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync
    $ xrandr --addmode XWAYLAND1 2560x1440
    $ xrandr --output XWAYLAND1 --mode 2560x1440
    xrandr: Configure crtc 1 failed
    

    Here's the output of xrandr --verbose:

    Screen 0: minimum 16 x 16, current 3840 x 1441, maximum 32767 x 32767
    XWAYLAND0 connected 1920x1080+1920+361 (0x24) normal (normal left inverted right x axis y axis) 290mm x 170mm
        Identifier: 0x21
        Timestamp:  20221
        Subpixel:   unknown
        Gamma:      1.0:1.0:1.0
        Brightness: 0.0
        Clones:    
        CRTC:       0
        CRTCs:      0
        Transform:  1.000000 0.000000 0.000000
                    0.000000 1.000000 0.000000
                    0.000000 0.000000 1.000000
                   filter: 
        non-desktop: 0 
            supported: 0, 1
      1920x1080 (0x24) 173.000MHz -HSync +VSync *current +preferred
            h: width  1920 start 2048 end 2248 total 2576 skew    0 clock  67.16KHz
            v: height 1080 start 1083 end 1088 total 1120           clock  59.96Hz
    XWAYLAND1 connected 1920x1200+0+0 (0x25) normal (normal left inverted right x axis y axis) 600mm x 340mm
        Identifier: 0x23
        Timestamp:  20221
        Subpixel:   unknown
        Gamma:      1.0:1.0:1.0
        Brightness: 0.0
        Clones:    
        CRTC:       1
        CRTCs:      1
        Transform:  1.000000 0.000000 0.000000
                    0.000000 1.000000 0.000000
                    0.000000 0.000000 1.000000
                   filter: 
        non-desktop: 0 
            supported: 0, 1
      1920x1200 (0x25) 193.250MHz -HSync +VSync *current +preferred
            h: width  1920 start 2056 end 2256 total 2592 skew    0 clock  74.56KHz
            v: height 1200 start 1203 end 1209 total 1245           clock  59.88Hz
    
    

    Here's the output of lspci -k | grep -EA3 'VGA|3D|Display'

    00:02.0 VGA compatible controller: Intel Corporation HD Graphics 620 (rev 02)
        DeviceName:  Onboard IGD
        Subsystem: Dell HD Graphics 620
        Kernel driver in use: i915
    --
    00:13.0 Non-VGA unclassified device: Intel Corporation Sunrise Point-LP Integrated Sensor Hub (rev 21)
        Subsystem: Dell Sunrise Point-LP Integrated Sensor Hub
        Kernel driver in use: intel_ish_ipc
        Kernel modules: intel_ish_ipc
    
    

    And glxinfo | grep -i vendor:

    server glx vendor string: SGI
    client glx vendor string: Mesa Project and SGI
        Vendor: Intel (0x8086)
    OpenGL vendor string: Intel
    

    I'm running Ubuntu 20.04.1 LTS with a Mesa Intel® HD Graphics 620 (KBL GT2) card. The Gnome Version is 3.35.3 with Wayland as the windowing system.

    Any advice on how to get the monitor to display the optimum resolution?

    Edit 1

    I've tried switched to Xorg, instead of Wayland. I still get the same problem. If I boot into Xorg, here's the relevant lines from xrandr --verbose:

    HDMI-1 connected 1920x1200+1920+0 (0xa1) normal (normal left inverted right x axis y axis) 597mm x 336mm
        Identifier: 0x43
        Timestamp:  76498
        Subpixel:   unknown
        Gamma:      1.0:1.0:1.0
        Brightness: 1.0
        Clones:    
        CRTC:       1
        CRTCs:      0 1 2
        Transform:  1.000000 0.000000 0.000000
                    0.000000 1.000000 0.000000
                    0.000000 0.000000 1.000000
                   filter: 
        EDID: 
            00ffffffffffff00220e753401010101
            091e0103803c22782a9325a9544d9e25
            0c5054a10800d1c081c081809500a9c0
            a940b300d100565e00a0a0a029503020
            350055502100001a000000fd00323c1e
            5a19000a202020202020000000fc0048
            502045323733710a20202020000000ff
            0036434d303039303939430a202001cc
            020319b149101f041303120211016703
            0c0010000032e2002b023a801871382d
            40582c450055502100001e023a80d072
            382d40102c458055502100001e565e00
            a0a0a029503020350055502100001a00
            00000000000000000000000000000000
            00000000000000000000000000000000
            00000000000000000000000000000023
        _MUTTER_PRESENTATION_OUTPUT: 0 
        HDCP Content Type: HDCP Type0 
            supported: HDCP Type0, HDCP Type1
        Content Protection: Undesired 
            supported: Undesired, Desired, Enabled
        max bpc: 12 
            range: (8, 12)
        content type: No Data 
            supported: No Data, Graphics, Photo, Cinema, Game
        Colorspace: Default 
            supported: Default, SMPTE_170M_YCC, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, opRGB, BT2020_CYCC, BT2020_RGB, BT2020_YCC, DCI-P3_RGB_D65, DCI-P3_RGB_Theater
        aspect ratio: Automatic 
            supported: Automatic, 4:3, 16:9
        Broadcast RGB: Automatic 
            supported: Automatic, Full, Limited 16:235
        audio: auto 
            supported: force-dvi, off, auto, on
        link-status: Good 
            supported: Good, Bad
        CONNECTOR_ID: 92 
            supported: 92
        non-desktop: 0 
            range: (0, 1)
      1920x1200 (0xa1) 154.000MHz +HSync -VSync *current
            h: width  1920 start 1968 end 2000 total 2080 skew    0 clock  74.04KHz
            v: height 1200 start 1203 end 1209 total 1235           clock  59.95Hz
      1920x1080 (0xa2) 148.500MHz +HSync +VSync
            h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  67.50KHz
            v: height 1080 start 1084 end 1089 total 1125           clock  60.00Hz
      1920x1080 (0xa3) 148.500MHz +HSync +VSync
            h: width  1920 start 2448 end 2492 total 2640 skew    0 clock  56.25KHz
            v: height 1080 start 1084 end 1089 total 1125           clock  50.00Hz
      1920x1080 (0xa4) 148.352MHz +HSync +VSync
            h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  67.43KHz
            v: height 1080 start 1084 end 1089 total 1125           clock  59.94Hz
      1600x1200 (0xa5) 162.000MHz +HSync +VSync
            h: width  1600 start 1664 end 1856 total 2160 skew    0 clock  75.00KHz
            v: height 1200 start 1201 end 1204 total 1250           clock  60.00Hz
      1680x1050 (0x4b) 119.000MHz +HSync -VSync
            h: width  1680 start 1728 end 1760 total 1840 skew    0 clock  64.67KHz
            v: height 1050 start 1053 end 1059 total 1080           clock  59.88Hz
      1600x900 (0xa6) 108.000MHz +HSync +VSync
            h: width  1600 start 1624 end 1704 total 1800 skew    0 clock  60.00KHz
            v: height  900 start  901 end  904 total 1000           clock  60.00Hz
      1280x1024 (0x52) 108.000MHz +HSync +VSync
            h: width  1280 start 1328 end 1440 total 1688 skew    0 clock  63.98KHz
            v: height 1024 start 1025 end 1028 total 1066           clock  60.02Hz
      1440x900 (0xa7) 88.750MHz +HSync -VSync
            h: width  1440 start 1488 end 1520 total 1600 skew    0 clock  55.47KHz
            v: height  900 start  903 end  909 total  926           clock  59.90Hz
      1280x720 (0xa8) 74.250MHz +HSync +VSync
            h: width  1280 start 1390 end 1430 total 1650 skew    0 clock  45.00KHz
            v: height  720 start  725 end  730 total  750           clock  60.00Hz
      1280x720 (0xa9) 74.250MHz +HSync +VSync
            h: width  1280 start 1720 end 1760 total 1980 skew    0 clock  37.50KHz
            v: height  720 start  725 end  730 total  750           clock  50.00Hz
      1280x720 (0xaa) 74.176MHz +HSync +VSync
            h: width  1280 start 1390 end 1430 total 1650 skew    0 clock  44.96KHz
            v: height  720 start  725 end  730 total  750           clock  59.94Hz
      1024x768 (0x67) 65.000MHz -HSync -VSync
            h: width  1024 start 1048 end 1184 total 1344 skew    0 clock  48.36KHz
            v: height  768 start  771 end  777 total  806           clock  60.00Hz
      800x600 (0x76) 40.000MHz +HSync +VSync
            h: width   800 start  840 end  968 total 1056 skew    0 clock  37.88KHz
            v: height  600 start  601 end  605 total  628           clock  60.32Hz
      720x576 (0xab) 27.000MHz -HSync -VSync
            h: width   720 start  732 end  796 total  864 skew    0 clock  31.25KHz
            v: height  576 start  581 end  586 total  625           clock  50.00Hz
      720x480 (0xac) 27.027MHz -HSync -VSync
            h: width   720 start  736 end  798 total  858 skew    0 clock  31.50KHz
            v: height  480 start  489 end  495 total  525           clock  60.00Hz
      720x480 (0xad) 27.000MHz -HSync -VSync
            h: width   720 start  736 end  798 total  858 skew    0 clock  31.47KHz
            v: height  480 start  489 end  495 total  525           clock  59.94Hz
      640x480 (0xae) 25.200MHz -HSync -VSync
            h: width   640 start  656 end  752 total  800 skew    0 clock  31.50KHz
            v: height  480 start  490 end  492 total  525           clock  60.00Hz
      640x480 (0x85) 25.175MHz -HSync -VSync
            h: width   640 start  656 end  752 total  800 skew    0 clock  31.47KHz
            v: height  480 start  490 end  492 total  525           clock  59.94Hz
      720x400 (0xaf) 28.320MHz -HSync +VSync
            h: width   720 start  738 end  846 total  900 skew    0 clock  31.47KHz
            v: height  400 start  412 end  414 total  449           clock  70.08Hz
    

    Edit 2:

    After a grep 2560 in the logs, I took a look into /var/log/syslog and found the following lines:

    Nov 25 13:57:04 laptop systemd[1606]: Starting GNOME Shell on X11...                        
    Nov 25 13:57:04 laptop /usr/lib/gdm3/gdm-x-session[1696]: (II) modeset(0): EDID vendor "BOE"
    Nov 25 13:57:04 laptop /usr/lib/gdm3/gdm-x-session[1696]: (II) modeset(0): Printing DDC gath
    Nov 25 13:57:04 laptop /usr/lib/gdm3/gdm-x-session[1696]: (II) modeset(0): Modeline "1920x10
    Nov 25 13:57:04 laptop /usr/lib/gdm3/gdm-x-session[1696]: (II) modeset(0): Modeline "1920x10
    Nov 25 13:57:04 laptop /usr/lib/gdm3/gdm-x-session[1696]: (--) modeset(0): HDMI max TMDS fre
    Nov 25 13:57:04 laptop gnome-shell[1853]: Failed to use stored monitor configuration: Invalid mode 2560x1440 (59.864616) for monitor 'HPN HP E273q'
    

    That's what happens at boot. If I try to change the resolution via xrandr, I get:

    Nov 25 13:09:47 laptop gnome-shell[1853]: Failed to use stored monitor configuration: Invalid mode 2560x1440 (59.864616) for monitor 'HPN HP E273q'                                                   
    Nov 25 13:09:53 laptop /usr/lib/gdm3/gdm-x-session[1696]: (II) modeset(0): Allocate new frame buffer 4480x1440 stride                                                                                 
    Nov 25 13:09:53 laptop /usr/lib/gdm3/gdm-x-session[1696]: (EE) modeset(0): failed to set mode: Invalid argument                                                                                       
    Nov 25 13:09:53 laptop /usr/lib/gdm3/gdm-x-session[1696]: (II) modeset(0): Allocate new frame buffer 3840x1200 stride                                                                                 
    Nov 25 13:09:54 laptop /usr/lib/gdm3/gdm-x-session[1696]: (II) modeset(0): EDID vendor "BOE", prod id 1703                                                                                            
    Nov 25 13:09:54 laptop /usr/lib/gdm3/gdm-x-session[1696]: (II) modeset(0): Printing DDC gathered Modelines:                                                                                           
    Nov 25 13:09:54 laptop /usr/lib/gdm3/gdm-x-session[1696]: (II) modeset(0): Modeline "1920x1080"x0.0  138.78  1920 1968 2000 2080  1080 1083 1088 1112 +hsync -vsync (66.7 kHz eP)                     
    Nov 25 13:09:54 laptop /usr/lib/gdm3/gdm-x-session[1696]: (II) modeset(0): Modeline "1920x1080"x0.0  111.02  1920 1968 2000 2080  1080 1083 1088 1112 +hsync -vsync (53.4 kHz e)                      
    Nov 25 13:09:54 laptop /usr/lib/gdm3/gdm-x-session[1696]: (--) modeset(0): HDMI max TMDS frequency 250000KHz
    

    Edit 3:

    I can get 2560x1440 at 30 Hz to work using xrandr. It's just 60.00 (or 55, or 59.9, etc.) that don't work.

    • Adrien Beau
      Adrien Beau over 3 years
      In your xrandr output you have two screens. I suppose XWAYLAND0 (290x170mm, that is about 13") is your laptop screen, and XWAYLAND1 (600x340mm, that is about 27") is your external monitor. Is it possible that the screens are set-up to be mirrors? Would it be possible to turn off XWAYLAND0?
    • cpederson
      cpederson over 3 years
      @AdrienBeau Thanks for the suggestion. I just double-checked that. I set the monitors to "Single Display" (with only the external monitor) and repeated the process. I still get xrandr: Configure crtc 0 failed
    • Adrien Beau
      Adrien Beau over 3 years
      I'm not sure adding modelines by hand works with modern digital displays. I'm a bit surprised xrandr does not list more video modes (I have 27), and that there is no EDID data block in the output. Is there an EDID setting in the monitor menu? Or a DDC/CI setting? Also maybe look for DisplayPort version setting, in case it has side effects.
    • cpederson
      cpederson over 3 years
      @Adrien I think the differences you're surprised by are XWayland vs Xorg. When I boot into Xorg, I get a different output. I updated the question with the other output. Same problem in both XWayland and Xorg.
    • Adrien Beau
      Adrien Beau over 3 years
      Using edidreader.com I can see the EDID contains a descriptor for 2560x1440 with a 241.5 MHz pixel clock, that is a 59.95 Hz refresh rate. Using your cvt command gives me different timings than those in the descriptor. However! Using cvt -r 2560 1440 60 gives me exactly the timings in the EDID! Can you try that modeline? Modeline "2560x1440R" 241.50 2560 2608 2640 2720 1440 1443 1448 1481 +hsync -vsync
    • cpederson
      cpederson over 3 years
      @AdrienBeau Success! Your modeline "2560x1440R" 241.50 2560 2608 2640 2720 1440 1443 1448 1481 +hsync -vsync did the trick. I'm not sure why cvt kept giving me bad options.
    • Greenonline
      Greenonline over 2 years
      @AdrienBeau and cpederson - If Adrien's answer contains all of the info in these comments above, can't these comments now be deleted? It would make for easier reading for users with the same issue if they don't have to read through all of the comments...
  • cpederson
    cpederson over 3 years
    Thanks for the suggestion. I thought of that, and I tried two different HDMI cables. No change. Also, an HDMI problem seems unlikely. The monitor came with an HDMI cable and both are new. The monitor advertises an "optimal resolution" of 2560x1440 when using HDMI. If the problem is HDMI, then you would have to wonder why HP ships an HDMI cable that doesn't support their "optimal" resolution.