Skip to content

Instantly share code, notes, and snippets.

@apxangels
Last active April 27, 2025 15:13
Show Gist options
  • Select an option

  • Save apxangels/f0698a53d1da7b02a28982a3fe59e44d to your computer and use it in GitHub Desktop.

Select an option

Save apxangels/f0698a53d1da7b02a28982a3fe59e44d to your computer and use it in GitHub Desktop.

If you cant change resolution of your guest linux vm and you are using vmware workstation, follow this steps:

  1. "Virtual Machine Settings -> Display -> Monitors" set your resolution in "Maximum resolution of any one monitor just editing line
  2. Log in your vm and open terminal:

this shows your preferences for expected resolution

cvt 2560 1440
bash > 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

Follow this article https://wiki.archlinux.org/title/Xrandr#Permanently_adding_undetected_resolutions and just set new reso mode in xrandr:

xrandr --newmode "2560x1440_60.00" 312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync
xrandr --addmode Virtual1 2560x1440_60.00
xrandr --output Virtual1 --mode 2560x1440_60.00

you can also add this to xorg.conf to set this resolution from startup

to undo juust type:

xrandr --output Virtual1 --off
xrandr --output Virtual1 --auto
xrandr --delmode Virtual1 2560x1440_60.00
xrandr --rmmode Virtual1 2560x1440_60.0

transfer xrandr commands to xorg conf described here: https://bbs.archlinux.org/viewtopic.php?id=260982 just edit or add /etc/X11/xorg.conf.d/10-monitor.conf with:

Section "Monitor"
    Identifier "Virtual1"
    Modeline "2560x1440" 312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync
    Option "PreferredMode" "2560x1440"
EndSection

Section "Device"
    Identifier "Configured Video Device"
EndSection

Section "Screen"
    Identifier "Default Screen"
    Device "Configured Video Device"
    Monitor "Virtual1"
    DefaultDepth 24
    SubSection "Display"
        Depth 24
        Modes "2560x1440"
    EndSubSection
EndSection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment