vmware / open-vm-tools

Official repository of VMware open-vm-tools project
http://sourceforge.net/projects/open-vm-tools/
2.25k stars 425 forks source link

Ubuntu 18.10 guest automatic screen resize not working #303

Closed cjmeyer closed 5 years ago

cjmeyer commented 5 years ago

I am running Ubuntu 18.10 as a guest using VMWare 15 player on a Windows 10 host.

I go through the install process for Ubuntu, restart, and everything looks fine. I restart the VM again and the screen wont resize, it is stuck at its default. Resizing the VM window doesn't have any affect.

running "ps aux | grep vmtoolsd" I get the following:

root        385  0.4  0.0 142756 10844 ?        Ssl  11:19   0:00 /usr/bin/vmtoolsd
corrin     1859  0.3  0.2 391940 36704 tty2     Sl+  11:19   0:00 /usr/bin/vmtoolsd -n vmusr --blockFd 3
corrin     2278  0.0  0.0  17480   956 pts/0    S+   11:20   0:00 grep --color=auto vmtoolsd

Copy and paste between host and guest works fine.

If I execute "systemctl restart open-vm-tools.service" automatic resizing to the VM window works again.

stiig commented 5 years ago

I've also the same problem. I've updated system from 18.04 to 18.10 and got that problem, which resolved every boot by:

systemctl restart open-vm-tools.service

ps aux | grep vmtoolsd:

root        418  0.1  0.0  60612 10860 ?        Ss   17:32   0:00 /usr/bin/vmtoolsd
test       1709  0.3  0.3 382016 35976 ?        Sl   17:33   0:00 /usr/bin/vmtoolsd -n vmusr --blockFd 3
test       1999  0.0  0.0   8864   824 pts/0    S+   17:34   0:00 grep --color=auto vmtoolsd
titan99855 commented 5 years ago

I too have the same problem with Xubuntu 18.10, whether upgraded from 18.04 or clean installed. Restarting the open-vm-tools.service will get it working until rebooted.

cjmeyer commented 5 years ago

Not sure if it matters but it is the same for both Wayland and Xorg for me. The issue is present right from the beginning with the login screen.

oliverkurth commented 5 years ago

This might be a dup of issue #253. Can you please try adding this line in the Unit section of open-vm-tools?

After=graphical.target

cjmeyer commented 5 years ago

That seems to fix it for me. Thank you.

alextangent commented 5 years ago

Yes, fixed

stiig commented 5 years ago

Yes, that's works! Thanks!

king-gu commented 5 years ago

➜ ~ systemctl restart open-vm-tools.service Failed to restart open-vm-tools.service: Unit open-vm-tools.service not found.

why

stiig commented 5 years ago

@king-gu try to reinstall open-vm-tools

king-gu commented 5 years ago

@king-gu try to reinstall open-vm-tools

I am a beginner, can attach code

king-gu commented 5 years ago

@king-gu try to reinstall open-vm-tools

Thank you very much for the

titan99855 commented 5 years ago

sudo apt purge open-vm-tools sudo apt update sudo apt install open-vm-tools open-vm-tools-desktop

king-gu commented 5 years ago

sudo apt purge open-vm-tools sudo apt update sudo apt install open-vm-tools open-vm-tools-desktop

错误:未找到目标:open-vm-tools-desktop

why

titan99855 commented 5 years ago

Most of the Linux distributions ship two open-vm-tools packages, "open-vm-tools" and "open-vm-tools-desktop". "open-vm-tools" is the core package without any dependencies on X libraries and "open-vm-tools-desktop" is an additional package with dependencies on "open-vm-tools" core package and X libraries.

If your VM is using a desktop environment, you need the open-vm-tools-desktop to enable resizing.

stiig commented 5 years ago

sudo apt purge open-vm-tools sudo apt update sudo apt install open-vm-tools open-vm-tools-desktop

错误:未找到目标:open-vm-tools-desktop

why

@king-gu because you didn't install open-vm-tools, try only:

sudo apt install open-vm-tools open-vm-tools-desktop
ManuelBerrueta commented 5 years ago

Here is how to fix it...

Edit: /etc/systemd/system/multi-user.target.wants/open-vm-tools.service

Add the following to the end of the "Unit" section:

Requires=graphical.target After=graphical.target

Reboot.

Thanks to Robert G @ askubuntu, and for your reference: https://askubuntu.com/questions/1085621/vmware-workstation-ubuntu-18-10-full-screen-problem

NTWarrior commented 5 years ago

Restarting the service and editing it haven't resolved this issue for me.

ps aux | grep vmtoolsd:

shuri      1496  0.1  1.7 390808 35992 tty2     Sl+  11:13   0:02 /usr/bin/vmtoolsd -n vmusr --blockFd 3
root       4437  0.0  0.5  69264 11088 ?        Ss   11:22   0:01 /usr/bin/vmtoolsd
shuri      8601  0.0  0.0  17480   956 pts/0    S+   11:46   0:00 grep --color=auto vmtoolsd
KaeLL commented 5 years ago

This might be a dup of issue #253. Can you please try adding this line in the Unit section of open-vm-tools?

After=graphical.target

Here is how to fix it...

Edit: /etc/systemd/system/multi-user.target.wants/open-vm-tools.service

Add the following to the end of the "Unit" section:

Requires=graphical.target After=graphical.target

Reboot.

Thanks to Robert G @ askubuntu, and for your reference: https://askubuntu.com/questions/1085621/vmware-workstation-ubuntu-18-10-full-screen-problem

Both don't work here, so I'll have to stick to restarting the service. Any other ideas?

TolgaBagci commented 5 years ago

None of the methods described above solved my problem. You can resolve the display resolution problem with this guide: https://www.sysnettechsolutions.com/en/install-vmware-tools-in-ubuntu-16-10/

KaeLL commented 5 years ago

I managed to work around the issue by installing only open-vm-tools-desktop. Most of the times it works, and when it doesn't, I restart the service and it's good to go. Worth mentioning that it happens only in Ubuntu but not on Kubuntu, at least so far in my testing.

jontybrook commented 5 years ago

Here is how to fix it...

Edit: /etc/systemd/system/multi-user.target.wants/open-vm-tools.service

Add the following to the end of the "Unit" section:

Requires=graphical.target After=graphical.target

Reboot.

Thanks to Robert G @ askubuntu, and for your reference: https://askubuntu.com/questions/1085621/vmware-workstation-ubuntu-18-10-full-screen-problem

This worked for me.

I am running a 1440p monitor, so it makes sense that this is somehow related to HiDPI on the host machine. Surely something VMWare can fix.

devlake commented 5 years ago

Delaying the service open-vm-tools to start after the display manager and it seems to work.

~$ sudo vi /lib/systemd/system/open-vm-tools.service

Add under [Unit] the following line:

After=display-manager.service

Reference https://communities.vmware.com/thread/576221

Save the file and reboot. The screen should be able to fit as needed.

chinovelasco commented 5 years ago

I have a similar problem with a Windows guest running inside an Ubuntu 18 host using VMWare 15

905jay commented 5 years ago

this worked for me also FYI

Backup the original file, of course cp /etc/systemd/system/multi-user.target.wants/open-vm-tools.service /etc/systemd/system/multi-user.target.wants/open-vm-tools.service.ORIGINAL

Edit the config file below vi /etc/systemd/system/multi-user.target.wants/open-vm-tools.service

Under the [Unit] section of the file, add in the following two lines: Requires=graphical.target After=graphical.target

It should look similar to this once complete:

reload the systemctl daemon systemctl daemon-reload

starlays commented 5 years ago

After reading https://communities.vmware.com/thread/576221 the solution indicated on post nr 5 had worked perfectly for me. I have added also the indicated Requires line like described above.

I have done a backup like 905jay indicated: cp /etc/systemd/system/multi-user.target.wants/open-vm-tools.service /etc/systemd/system/multi-user.target.wants/open-vm-tools.service.ORIGINAL

I have edited the file: sudo vim /etc/systemd/system/multi-user.target.wants/open-vm-tools.service

I have added under the [Unit] section this 2 lines: Requires=graphical.target After=display-manager.service

After that I have done sudo systemctl daemon-reload

Everything is working now as expected.

abadiego commented 5 years ago

Non works!!!

unicav commented 5 years ago

This is no longer working with 18.04, 18.10 or 19.04. By added the lines to the config file you can stretch the screen a bit, but still too small when it maxes out. Restarting the daemon doesn't change it

ayancey commented 5 years ago

Not working on 18.04, with all edits suggested in this thread so far

devlake commented 5 years ago

@unicav @ayancey try:

https://github.com/vmware/open-vm-tools/issues/303#issuecomment-477634013

ayancey commented 5 years ago

@unicav @ayancey try:

#303 (comment)

I believe I already tried this and unfortunately it still didn't work

unicav commented 5 years ago

@devlake Tried it, no change.

unicav commented 5 years ago

Just to throw this out there - Before the updates in late June or early July to 18.04, I never had to set a screen resolution in the host. From day one of install, through many months of use, I opened the host in VMRC and stretched the window to any size at all and it normally kept that size the next time I opened it. I frequently resized it depending on what I was doing on my computer screens. After this happened I even looked at setting the screen resolution, but that doesn't seem to be available either. I can't set it to anything over 1176x885. I've tried adding modes with xrandr and that does nothing. I've set the Host settings to use Host Screen Settings or to 1 monitor and still nothing. Not sure if this is really a vmtools issue or an Ubuntu issue, but it's screwed from then through 18.10 through 19.04.

I may do a fresh install of 19.04 just to see if anything changes.

unicav commented 5 years ago

UPDATE: Installed fresh 19.04 VM. Soon as I logged in I was able to resize normally and it shows the currently sized screen properly in the display resolution. open-vm-tools and open-vm-tools desktop were already installed by default, indicated properly on vcenter, and identical to versions on the original host that won't resize past 1176x885. Only thing I had to do was blacklist the piix4-smbus module to eliminate the smbus error on boot. No idea what's different between the 2 systems that it won't allow resizing

ayancey commented 5 years ago

One thing I forgot to check was my VM video settings were set incorrectly, and I had way too little VRAM allocated. Once I changed these settings, I was able to resize properly.

devlake commented 5 years ago

What are your display settings configured as in VMWare?

VMWare Settings

unicav commented 5 years ago

I don't have a screen like that anywhere I can find. I'm on VMWare 6.7

On Mon, Aug 5, 2019 at 10:31 AM Noggin notifications@github.com wrote:

What are your display settings configured as in VMWare?

[image: VMWare Settings] https://user-images.githubusercontent.com/22599922/62476193-2238a780-b76c-11e9-80e2-a96632b8a099.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vmware/open-vm-tools/issues/303?email_source=notifications&email_token=AMVZ7QDGXMSX7WXZJU6A75TQDBBVXA5CNFSM4GARJZKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3SF6SI#issuecomment-518283081, or mute the thread https://github.com/notifications/unsubscribe-auth/AMVZ7QHXIVEGDSZG3Q4DTM3QDBBVXANCNFSM4GARJZKA .

zsong commented 5 years ago
systemctl restart open-vm-tools.service

Yup. If using vmware-tools, do

systemctl restart vmware-tools.service
unicav commented 5 years ago

Yup. If using vmware-tools, do

systemctl restart vmware-tools.service

"Failed to restart vmware-tools.service: Unit vmware-tools.service not found."

and on the VCenter logs I see "A general system error has occurred: Invalid Fault"

I've already tried uninstalling and reinstalling vmware-tools as well.

acosonic commented 5 years ago

@unicav I can confirm same error as yours, on ESX VCenter...

I have uninstalled openvm tools, and installed VmWare ones, same thing...

And I am on 18.04.2

datorr2 commented 5 years ago

Got this issue when my kernel upgraded to 5.0.0. Rolling back to 4.19.0 fixed my problem.

tb25 commented 5 years ago

Just install vmwareTools: https://pubs.vmware.com/fusion-5/index.jsp?topic=%2Fcom.vmware.fusion.help.doc%2FGUID-82AEC35C-D3DC-42F4-A84B-542B1D501D2B.html

Midwain commented 5 years ago

How i fixed my issue:

  1. Reinstall tools by @titan99855 guide in my VM.
  2. Apply @ManuelBerrueta config fix.
  3. Repair your VMware Workstation/Player (Programs -> VMware -> Change -> Setup Wizard -> Repair)
  4. Create new Virtual Machine with the same system configuration
  5. Do not create new disk, use existing disk from your broken VM.
  6. Boot from new VM.

Full screen mode is working now. Even after reboot new VM.

unicav commented 5 years ago

So basically there's no fixing an existing install at this point you just have to create a new VM. I knew the current packages work fine with a new install because I already did a new install of 18.04 then upgraded it to 18.10 and then 19.04 On a fresh install of 19.04 you don't even have to install vmtools it installed automatically and works fine immediately. I'm done fooling with the broken 18.04 system at this point. Kept it around to test possible fixes for the community but I don't think there's a point now.

On Fri, Sep 20, 2019 at 5:35 AM Андрей notifications@github.com wrote:

How i fixed my issue:

  1. Reinstall tools by @titan99855 https://github.com/titan99855 guide in my VM.
  2. Apply @ManuelBerrueta https://github.com/ManuelBerrueta config fix.
  3. Repair your VMware Workstation/Player (Programs -> VMware -> Change -> Setup Wizard -> Repair)
  4. Create new Virtual Machine with the same system configuration
  5. Do not create new disk, use existing disk from your broken VM.
  6. Boot from new VM.

Full screen mode is working now. Even after reboot new VM.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vmware/open-vm-tools/issues/303?email_source=notifications&email_token=AMVZ7QA2TVYV47H3VPFNDKTQKSRO7A5CNFSM4GARJZKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7GJNOQ#issuecomment-533501626, or mute the thread https://github.com/notifications/unsubscribe-auth/AMVZ7QDEXOAINMYTS74P2LTQKSRO7ANCNFSM4GARJZKA .

DiscordDigital commented 4 years ago

I just encountered the same issue, it went away by restarting the service one time manually and rebooting the VM.

ttimasdf commented 4 years ago

Edit the systemd unit file directly will not survive an update of open-vm-tools package (if any). Instead, use the recommanded way provided by systemd to create an override configuration file.

The all-in-one solution, tested on a newly installed Lubuntu 18.04.

sudo apt install open-vm-tools open-vm-tools-desktop
sudo systemctl edit open-vm-tools.service  # will popup an editor window 

Fill the following content into the editor window.

[Unit]
Requires=graphical.target
After=graphical.target

Reboot VM and everything works.

JorgeLAB commented 4 years ago

That's works! Thanks! ;)

sudo apt purge open-vm-tools sudo apt update sudo apt install open-vm-tools open-vm-tools-desktop

eleses commented 4 years ago

None of the above work with Ubuntu 20.

unicav commented 4 years ago

After a clean install on 18.10 this issue went away. I recently upgraded to 20.04 with no issues either

eleses commented 4 years ago

Now it works for me too! But only after I pasted the logging/debugging version of the config file https://kb.vmware.com/s/article/1007873 and rebooted. I immediately noticed the ballooning was active (host memory usage much lower). And everything else that I tried (video res changes, copy-pasta) works too but there are some weird errors logged:

[2020-06-16T22:37:43.996Z] [ message] [vix] ToolsDaemonTcloReceiveVixCommand: command 62, additionalError = 17
lemke1458 commented 4 years ago

And everything else that I tried (video res changes, copy-pasta) works too but there are some weird errors logged:

[2020-06-16T22:37:43.996Z] [ message] [vix] ToolsDaemonTcloReceiveVixCommand: command 62, additionalError = 17

Don't worry about that; its showing a successful operation where something (probably the WS UI) is just checking the state of Tools.