Doc /

Add X Resolution

similar solution:

https://forums.opensuse.org/showthread.php/507397-Adjusting-screen-resolution-on-a-system-with-no-monitor-connected

What driver is in use?

 # lspci -nnk | egrep -i --color 'vga|3d|2d' -A3 | grep 'in use'
        Kernel driver in use: i915
        Kernel driver in use: ehci-pci
        Kernel driver in use: nvidia

hwinfo --gfxcard
(sortie longue)

What graphic card?

On my ASUS optimus computer:

# sudo lspci -nnk | grep -A3 VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller [8086:0416] (rev 06)
        Subsystem: ASUSTeK Computer Inc. Device [1043:11cd]
        Kernel driver in use: i915
        Kernel modules: i915
# sudo lspci -nnk | grep -A3 NV
01:00.0 3D controller [0302]: NVIDIA Corporation GM107M [GeForce GTX 850M] [10de:1391] (rev a2)
        Subsystem: ASUSTeK Computer Inc. Device [1043:11cd]
        Kernel driver in use: nvidia
        Kernel modules: nouveau, nvidia_drm, nvidia

VIRTUAL for AMD + NVIDIA

none :-(

https://github.com/kbumsik/VirtScreen/issues/23

eDP1 versus eDP-1

"e" is for embedded, the internal laptop screen, DP is for Display Port. but why is there sometime a "-" and sometime not?

eDP1 is for the Intel driver xf86-video-intel, eDP-1 for the modesetting driver; to have it simply remove the xf86-video-intel driver from YaST.

Using arandr and scale

on November 2021 I managed to break something, and the commands below do not works completely well: I get the scale and full hd screen, on my Asus, but only the 1366x768 upper part is active for the desktop. The windows display ok but the other part of the screen keeps being black and do not react at right clic of a mouse...

Works ok only with modesetting driver, so see above.

With recent distribution, namely openSUSE Leap 15.3, the "scale" xrandr option accepts decimal scales. So:

 xrandr --output eDP-1 --scale 1.405563x1.405563

makes my 1366x768 screen display like a full hd 1920x1080 one, exactly what I need.

Then, "arandr" allows to place the screens as you like, then saves the xrandr command line. I just had to add the option above to the file, makes it to start *before the session* in Kde config and voilà.

Right now (sep 28, 2021), I have three screens: two hd ones (one, external, native and the laptop one) and one 4k one external.

Only Intel driver.

My script:

#!/bin/sh
xrandr --output eDP-1 --mode 1366x768 --pos 3840x0 --rotate normal --scale 1.405563x1.405563  --output DP-1 --mode 1920x1080 --pos 5760x0 --rotate normal --output HDMI-1 --off --output HDMI-2 --mode 3840x2160 --pos 0x0 --rotate normal

Adding virtual device

This solution is for intel driver only, so install it if not yet done and remove proprietary (nvidia?) device.

Then add a file 20-intel to /etc/X11/xorg.conf.d/

 (true for openSUSE Leap), with:
Section "Device"
    Identifier "intelgpu0"
    Driver "intel"
    Option "VirtualHeads" "2"
EndSection

this creates two VIRTUAL devices (only one is really necessary right now). Then use the script below.

Where one can set a config

Beware, it's easy to forget that you setup some file, there are a number!

 /etc/X11/xorg.conf.d/

Where 50-monitor.conf and 50-screen.conf are the place of choice for X. See man xorg.conf for syntax.

 Option "TransformationMatrix" "a b c d e f g h i"

seen on the web is only for input devices, not screen.

 /etc/X11/xinit/

and

 /etc/X11/xinit/xinitrc.d

(any file) - seen in logs at the very end of the file - but there the "panning" option of xrandr is not ack.

If you want to change all the system. The same file in ~/.xinitrc for user setup (a template file is available in openSUSE as example, with place for user change).

 /etc/bumblebee/xorg.conf.nouveau

Virtual x y have to be in Screen/Display

In ~/.config/Autostart one can set a bash file, made executable, activated in kde setup/"start and stop"

also ~/.xinitrc and ~/.bashrc

May also be in ~/.config/monitor.xml

etc/init.d/after.local

ASUS 550

Best result on Nov 24, 2017 (and august 2019)

Inserted in a text file

xrandr --newmode "1920x1080"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
xrandr  --addmode VIRTUAL1 1920x1080
xrandr --fb 1920x1080 --dpi 96 --output eDP1 --pos 0x0 --scale-from 1920x1080 --same-as VIRTUAL1

There are three useful lines. The first is the standard mode creation as 1920x1080. Using "hd" for name didn't show in the kde setup GUI. Second line creates the virtual screen. Third line create the frame buffer for virtual and place it in a good position.

Dell Vostro 33600

one get the same result with:

xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
xrandr --addmode LVDS-1 "1920x1080_60.00"
xrandr --output LVDS-1 --mode 1920x1080_60.00

no need of virtual device here...

manual

On DEll 755 (vga Intel, TV), manually:

$ cvt 1920 1080 60
$ 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 --addmode VGA1 "1920x1080_60.00"

xrandr --output VGA1 --mode 1920x1080_60.00

To make it permanent, one need to edit files in /etc/X11/xorg.conf.d/50-*

Section "Monitor"
 Identifier "TV"

 VendorName "BELSON"
 HorizSync 31.0 - 84.0
 VertRefresh 56.0 - 77.0

Modeline "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync

Option "PreferredMode" "1920x1080_60.00"
EndSection

Section "Screen"

  Identifier "VGA1"
  Device "VGA1"
  Monitor "TV"
  DefaultDepth 24
  SubSection "Display"
    Depth 24
    Modes "1920x1080_60.00"
  EndSubSection

EndSection 

take attention to the fact that xorg stores somewhere the used resolution and start with it, so you may need to issue "xrandr" to verify is the new resolution is recorded, then "xrandr --output VGA1 --mode 1920x1080_60.00" to use it the first time.