19

I can set the screen resolution manually once I log in using the following command:

xrandr -s 1360x768

but I am not able to make it "stick". Every time I log back in, the resolution for a little while changes to 1360x768, but by the time the desktop appears, switches back to 800x600.

I have also tried other versions of the command, if that matters. For example, xrandr --output Virtual1 --mode 1360x768. It works as long as I don't exit the current session, but switches back to 800x600 when I log back in.

I have tried the following:

  1. Placed the command in a /etc/lightdm/lightdm.conf, but this causes the entire GUI to fail to appear.
  2. Edited ~/.xprofile to run the command to set the screen resolution, but this doesn't work.
  3. Installed open-vm-tools and made sure it is up to date.
  4. Disabled 3D acceleration in the VM's settings as was suggested in another answer. This made no difference at all.
  5. Added the xrandr command into my ~/.bashrc. This causes the correct resolution to be set everytime I open up a terminal, but this solution is kludgy. I don't want to have to open a terminal to have my screen resolution properly set.

Any ideas what else could be done?

Thanks in advance!

Edit: I am using VMware Workstation 12 Player, version 12.1.1 (build-3770994)

  • Which version of VMware are you using ? – Severus Tux Jun 17 '16 at 16:47
  • @Vishwa I am using VMware Workstation 12 Player, version 12.1.1 (build-3770994) – ARV Jun 17 '16 at 16:52
  • I have posted the answer :-) . As you can see I am using VMWare Worsk station on Ubuntu, but that should not make any difference. I hope this solves your problem. – Severus Tux Jun 17 '16 at 18:11
  • I am suddenly stricken with this issue as well. I rebooted my VM and now I cannot get any resolution except 800x600 to work. I've tried everything I could search for as a solution. Nothing. – Halsafar Mar 15 '17 at 2:28
13

I wrote here before, a clean install of ubuntu has no problem with resolution. But after that I found the solution while I was looking for an answer for another problem.

Follow the steps below and everything will be fixed. If you have the latest VMware Tools and open-vm-tools is not install, the skip to step 3.

1) sudo apt-get autoremove open-vm-tools

2) Install VMware Tools by following the usual method (Virtual Machine --> Reinstall VMWare Tools)

3) Reboot the VM

4) sudo apt-get install open-vm-tools-desktop

5) Reboot the VM.

Hope this helps. I know how frustrating it is to try and fix this.

  • 1
    Apologies for not replying sooner. I tried this, but it didn't fix the issue. For the time being, I am just manually running a script that sets the resolution once. Not an elegant solution, but works for me for now. – ARV Sep 29 '16 at 12:03
  • 1
    Sorry for not updating this answer. I should have deleted my first comment sooner. This was fixing vmware 12.1.1 build-3770994 but it doesn't work on vmware 12.5.0 build-4352439, which is what I have now. I will update this answer if I find a new solution for this version. Please add an answer if you find a solution too. – sercan Oct 3 '16 at 13:42
  • 2
    This answer worked for me with Ubuntu 16.04.1 LTS in VMWare Fusion Version 8.5.8 (5824040) – Ian Jul 8 '17 at 1:41
9

If you are using Ubuntu on VMWare Workstation, you need to install VMWare tools to get proper resolution.

Here is the step by step procedure to do that :

  • Start your Virtual machine and login to your Ubuntu.

  • Go to VM --> Install VMWare Tools...

    enter image description here

  • Click on install

  • Now you should see a Virtual CD named "VMWare tools" mounted in your Ubuntu. Copy the VMWareTools-xx.xx.xx.xxxxx.tar.gz to your home Directory .

  • Extract it

    enter image description here

  • Go to the extracted folder in a terminal :

    cd ~/vmware-tools-distrib
    
  • Provide execution permission for vmware-install.pl

    chmod +x vmware-install.pl
    
  • Execute it with superuser privileges .

    sudo ./vmware-install.pl
    
  • Enter your password. When asked for confirmation type yes and press Enter. If you wish to install with default settings, keep pressing Enter for the next messages, which are :

    • While doing the below procedure Press Enter when asked "Need to create..... This is what you want ?"

    • Default Directory /usr/bin

    • Default Directory containing init directories /etc
    • Default Directory with init scripts : /etc/init.d
    • Default Directory Demon files : /usr/sbin
    • Default Directory for library files : /usr/lib/vmware-tools
    • Default Directory for common agent library files : /usr/lib
    • Default Directory for common agent transient files : /var/lib
    • Default Directory for documentation files : /usr/share/doc/vmware-tools
  • Press Enter when asked if you want to invoke /usr/bin/vmware-config-tools.pl

  • Press Enter for all other queries.

  • Now restart your Ubuntu.

Setting proper Resolution.

  • After restart, go to System Settings --> Displays --> Resolution and select your preferred resolution and click Apply and followed by Keep this Configuration

    enter image description here

Thats all ;-) . Restart and you will see its 1366x768 by default :-)

  • 1
    Even though this answered is explained for VMWare on Ubuntu, there id no much difference for VMWare on Windows. – Severus Tux Jun 17 '16 at 18:20
  • Thanks for the answer, but I had already installed open-vm-tools for Ubuntu 16.04 as mentioned in the question. When I tried installing via the VMWare UI, it said that VM tools was already installed and recommended to go with the VM tools that came with the OS. I will check once again to see if I have made any error. Since this is a new account, my upvote is not showing up! – ARV Jun 18 '16 at 9:29
  • 1
    I already installed vmware tools with default options but this didn't solve autosize screen resolution problem. I am using the same versions of vmware workstation 12 player 12.1.1 build-3770994 and 16.04 LTS ubuntu. Host OS is win8.1. – sercan Aug 9 '16 at 15:11
1

Changing the resolution requires the VMWare Tools, or the open source equivalents. I've found the Open Source versions to work a little better than the compile-them versions that ship with VMWare Workstation.

Install the Open VM Tools, with the following commands. Note that if you've installed the VMware Tools already you need to uninstall those first.

sudo apt-get install open-vm-tools open-vm-tools-desktop

Once this is done fully shut down the VM, then start it up again in Workstation.

You can then see a larger set of resolutions in the GUI as you would for a standard computer, or use VMware Workstation's "Autofit Guest" and "Fit Guest Now" options with the Desktop Open VM Tools to autoadjust the resolution.

This is confirmed working on VMware Workstation machines, as well as VMware ESXi virtual machines accessed via VMware Workstation, on Ubuntu, Lubuntu, Xubuntu, and Kubuntu 16.04 LTS machines that I personally have been running, and it works nearly flawlessly (make sure you give enough vRAM to the VMs, because it takes the Video RAM from that virtual RAM allocation you give by default...)

0

I had the same problem, annoying but finally fixed using a variation of the first suggested answer above.

I'm running Ubuntu 16.04.3 on Fusion 8.5.8 with HW version 12.

Within Fusion display settings:

  1. "Use full resolution for Retina Display" should be checked
  2. "Use Fusion Display Preferences" set for both "Single Window" and "Full Screen".

Fusion is running on MacOS 10.12.6 on MacBook Pro with Display Preferences set to "Default for Display"

  1. sudo apt-get autoremove open-vm-tools
  2. Install Fusion's VMware tools as root
  3. Reboot

I noticed after the reboot everything looked perfect, came back up with my 1920x1200 resolution but continued with the suggested final steps:

  1. sudo apt-get install open-vm-tools-desktop
  2. Reboot

Came back up with the tiny 2560x1600, changed and saved to my preferred resolution and logged out and back in (actually just jumped back to my Mac desktop and back again as that would revert the settings as well) and Ubuntu reverted to the 2560x1600.

So the final fix while in this state (running only VMware's tools with open-vm-tools-desktop) is the following:

  1. sudo apt-get autoremove open-vm-tools-desktop
  2. Run an install of VMware's tools over the existing (step one removed some required libraries and drivers)
  3. Reboot

Works like a charm and so far haven't noticed anything missing or lost functionality due to not having the open desktop tools installed, seems that VMware's tools give you everything you need and works.

0

Like you, I can't find any way to get it to run on startup, but I did find a way to get it to run on login which was "good enough" for me. I added this to my ~/.profile:

xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync
xrandr --addmode Virtual1 1600x900_60.00
xrandr -s 1600x900

You should be able to do the same for your resolution:

xrandr --newmode "1360x768_60.00" 84.75 1360 1432 1568 1776 768 771 781 798 -hsync +vsync
xrandr --addmode Virtual1 1360x768_60.00
xrandr -s 1360x768

It no longer seems to work on 18.04, though (it changes and then immediately switches back). In that case, add the above to an executable .sh file and add a new entry calling it from Ubuntu's Startup Applications:

screenshot

-1

Edit your VMX to include:

vga.guestBackedPrimaryAware = "FALSE"
svga.minVRAMSize = "16777216"

notes:

  • Tested with Xubuntu 16.04 with kernel version 4.4.0-77 in VMWare Fusion 8.5.6 at 1920x1200
  • This may be a problem with the combination of kernel version (4.4.0-77 in my case) and virtualHW.version (see ref. #1) and may indicate a bug (see ref. #2)
  • My VM is pegged at virtualHW.version = "11"

references:

  1. https://unix.stackexchange.com/questions/301531/ubuntu-server-stopped-running-in-higher-resolution
  2. https://github.com/vmware/open-vm-tools/issues/54

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.