I am trying Kubuntu 18.10 and I have a nvidia GTX 1060 (driver 418), a LG 27" 4k monitor (27UD58-B ) and an older HP 22" 1680x1050 monitor (HPw2207) with a VGA cord and a VGA-> DP converter.

My issues are as follow:
1) I can't get my vga screen with converter to use a resolution above 1280*1024

2) I'd like to use screen scaling because everything is so damn small on the 4k display. I'd want the scaling to only be done on the high-dpi display if possible.

Current setup:

I am using Nvidia drivers 418.56.

$ nvidia-smi
Mon Apr 15 15:07:47 2019       
| NVIDIA-SMI 418.56       Driver Version: 418.56       CUDA Version: 10.1     |
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|   0  GeForce GTX 106...  Off  | 00000000:23:00.0  On |                  N/A |
| 10%   64C    P0    25W / 120W |    739MiB /  6076MiB |      3%      Default |

| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|    0       958      G   /usr/lib/xorg/Xorg                           386MiB |
|    0      1413      G   /usr/bin/kwin_x11                            192MiB |
|    0      1432      G   /usr/bin/krunner                               1MiB |
|    0      1434      G   /usr/bin/plasmashell                         111MiB |
|    0      1509      G   /usr/bin/latte-dock                           29MiB |
|    0      9387      G   /usr/lib/firefox/firefox                       1MiB |

and normal higher resolutions are not available:

$ xrandr
Screen 0: minimum 8 x 8, current 4864 x 2160, maximum 32767 x 32767
DVI-D-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 600mm x 340mm
   3840x2160     60.00*+  30.00  
   2560x1440     59.95  
   1920x1080     60.00    59.94  
   1600x900      60.00  
   1280x1024     60.02  
   1280x800      59.81  
   1280x720      60.00    59.94  
   1152x864      59.96  
   1024x768      60.00  
   800x600       60.32  
   720x480       59.94  
   640x480       59.94    59.93  
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 connected 1024x1280+3840+832 left (normal left inverted right x axis y axis) 376mm x 301mm
   1280x1024     60.02*+
   1280x960      60.00  
   1152x864      75.00  
   1024x768      85.00    75.03    70.07    60.00  
   800x600       85.06    75.00    72.19  
   640x480       85.01    59.94  
DP-5 disconnected (normal left inverted right x axis y axis)

First issue: fixing resolution I have tried to "addmode" using xrandr, but I get a BadMatch error. This is apparently normal with nvidia video cards.

$ cvt 1680 1050 60
# 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz
Modeline "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync
$ xrandr --newmode  "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync

$ xrandr --addmode DP-4 1680x1050_60.00
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  18 (RRAddOutputMode)
  Serial number of failed request:  45
  Current serial number in output stream:  46

My /etc/X11/xorg.conf file has been generated by nvidia usind sudo nvidia-xconfig :

$ sudo nvidia-xconfig

Using X configuration file: "/etc/X11/xorg.conf".
Backed up file '/etc/X11/xorg.conf' as '/etc/X11/xorg.conf.backup'
New X configuration file written to '/etc/X11/xorg.conf'

The xorg.conf only contains one monitor, is this normal. I have tried to add a "Modeline" line under the Monitor0, but it didnt change anything.

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 418.56

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"

Section "Files"

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24

Second issue : scaling

I have taken two steps to allow the HiDPI screen to display text and GUI in a more readable size:

1) System settings - fonts - Force Font DPI 144 (instead of 96) 2) system settings- display and monitors - scale display 1.5 (instead of 1).

I would lke these settings to only apply to the 4k monitor, is this possible at all?


I found a workaround: I connected my display directly to an old tower that has a VGA and exported the edid using

sudo apt install read-edid
sudo get-edid -m 0 > edid.bin

then I erased the old xorg.conf on the machine and created a new one where I forced the edid for the monitor on display port 4:

sudo rm /etc/X11/xorg.conf 
nvidia-xconfig --custom-edid="GPU-0.DP-4:/home/MYNAME/edid.bin"

Ta-da, the higher resolution now works. When I look at my xorg.conf file, I see the following line has been added to the "Screen" section:

   Option         "CustomEDID" "GPU-0.DP-4:/home/MYNAME/Downloads/edid.bin"
here is what I ended up doing regarding the scaling with a high-dpi monitor and a standard-dpi monitor:

Ok, mais là tout est trop gros sur le 22” .. il faut que je rescale de 1.4 dans la direction inverse. Ça me fait un écran de 3840 + 1.4 * 1680 = 6192 pixels de large, que je dois indiquer dans le frame buffer. Ensuite, j’indique la position des écrans avec --pos, où le 0x0 est le coin haut-gauche de l’écran. https://askubuntu.com/questions/393400/is-it-possible-to-have-different-dpi-configurations-for-two-different-screens xrandr --output DP-0 --scale 1x1 --pos 0x0 --fb 6192x2160 xrandr --output DP-4 --scale 1.4x1.4 --pos 3840x690

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.