VMware Tools problem

I install Arch on VMware Workstation 6.5.2 and follow this guide http://wiki.archlinux.org/index.php/Ins … tation_6.5 to install VMware Tools, but I find that the VMware Tools is not correctly installed, because if I run command ps -e | grep ".vm.", the output should like this
$ ps -e | grep ".vm."
1765 ? 00:00:00 vmhgfs
3589 ? 00:00:00 vmmemctl
3637 ? 00:00:02 vmware-guestd
4090 ? 00:00:01 vmware-user
but what I get is like this
$ ps -e | grep ".vm."
3014 ?        00:00:06 vmware-guestd
the modules vmhgfs and vmmemctl are not created by the installation script, that is why although I add this line ".host:/ /mnt/hgfs vmhgfs defaults,user,ttl=5,uid=root,gid=root,fmask=0133,dmask=0022 0 0" to /etc/fstab and create a folder /mnt/hgfs, I still can not mount the share folder that I assign in the guest setting, the command vmware-hgfsclient confirms that the share folder is correctly assigned.
$ vmware-hgfsclient
sda2
Does anyone ever experience the same problem? and is there any solution to fix it? thanks for reply.

I just run the script vmware-config-tools.pl again, but the problem persists, can anyone help? thanks a lot.
===================================================================
Extracting the sources of the vmblock module.
Building the vmblock module.
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config3/vmblock-only'
make -C /lib/modules/2.6.29-ARCH/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.29-ARCH'
  CC [M]  /tmp/vmware-config3/vmblock-only/linux/block.o
In file included from /tmp/vmware-config3/vmblock-only/linux/os.h:35,
                 from /tmp/vmware-config3/vmblock-only/linux/block.c:26:
/tmp/vmware-config3/vmblock-only/./include/compat_wait.h:78: error: conflicting types for 'poll_initwait'
include/linux/poll.h:67: error: previous declaration of 'poll_initwait' was here
make[2]: *** [/tmp/vmware-config3/vmblock-only/linux/block.o] Error 1
make[1]: *** [_module_/tmp/vmware-config3/vmblock-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.29-ARCH'
make: *** [vmblock.ko] Error 2
make: Leaving directory `/tmp/vmware-config3/vmblock-only'
Unable to build the vmblock module.

Similar Messages

  • VMware Tools now broken with gcc 5.1.0 upgrade

    This is more of a VMware Tools problem I believe as the community currently has to "patch" the vmware-tools-distro.pl script manually to get it to compile vmhgfs (which is used for file sharing between host and the Arch guest).  I am starting a thread here to document any resolve, which currently there is none...
    Around April 28th, the Arch linux kernel was compiled with gcc 5.1.0, even though gcc 4.9 was in the repository.  This started the problems with vmware tools install:
    https://bbs.archlinux.org/viewtopic.php?id=196915
    I was able to resolve it by recompiling the kernel using the gcc 4.9 on the system.  All attempts at upgrading gcc to 5.1.0 failed, because as I was able to build the tools using gcc 5.1.0, the VM was lockup when trying to enable the kernel modules for vmware.  Both on script install, and during reboot.
    Today I've upgraded my system and found gcc 5.1.0 upgraded.
    I switched back to using the core kernel (compiled with gcc 5.1.0) and allowed gcc 5.1.0 to be installed.  I rebooted and got a panic from the vmhgfs not being able to run, and was dumped to emergency mode.  (Do note that I have vmhgfs in my fstab, this is most likely why it failed on boot)
    So, I went into vmware-tools-distro, my patched version (see link above), and attempted to rebuild the vmware tools under the kernel compiled with gcc 5.1.0 and with gcc 5.1.0.  Yay, it found gcc binary this time - the 5.1.0 version.
    Unfortunately, the same previous 5.1.0 errors exists:
    * during vmware-tools-install.pl, it won't compile vmhgfs with errors of functions not found.  needs to be patched (vmware issue, ignore)
    * during vmware-tools-install.pl again with patched script, it compiles just fine.
    * but during the Kernel Modules enabling portion, the system hangs / freezes / halts.  Hard reset is only resolve.
    * on system boot, system hangs / freezes / halts on vmhgfs initialization. 
    Only current resolves are:
    * Do not use file sharing (not an option)
    * Install gcc 4.9 and recompile your kernel (I already have one, so i am using it)
    This is obviously not a long term solution.

    I have switched to the Open VM Tools, the public domain versions, and am running into exactly the same "vmhgfs" problem: system panics/hangs/locks when trying to mount the share.
    I posted a bug report over in VMware... But considering they haven't even fixed the build issues with VMware Tools in 7 months (dev says he has fixed it, but it's not released yet), I seriously doubt that gcc 5.1.0 will get any attention before the next year.
    Guess I may be going back to VirtualBox after all.  But the 3D acceleration sucks in that, as well as disk I/O.

  • Open-vm-tools/official vmware tools not installing.

    I'm trying to install the latest offical vmware tools (16/9/2013) and open-vm-tools but both seem to always fail. I tried some of the patches listed on the wiki, but nothing got me anywhere. The big thing I'm trying to accomplish is to be able to use vmhgfs but, I'd like to have all the tools if possible. Here is what I did.
    Open Vm Tools
    #[root@localhost] - [14-01-01 18:09:33] - [/home/toxicarrow/Documents/firewall] - [R:0]
    pacman -S open-vm-tools open-vm-tools-dkms
    resolving dependencies...
    looking for inter-conflicts...
    Packages (2): open-vm-tools-5:2013.09.16-5 open-vm-tools-dkms-5:2013.09.16-5
    Total Installed Size: 8.21 MiB
    :: Proceed with installation? [Y/n]
    (2/2) checking keys in keyring [#####################################################################################################################] 100%
    (2/2) checking package integrity [#####################################################################################################################] 100%
    (2/2) loading package files [#####################################################################################################################] 100%
    (2/2) checking for file conflicts [#####################################################################################################################] 100%
    (2/2) checking available disk space [#####################################################################################################################] 100%
    (1/2) installing open-vm-tools [#####################################################################################################################] 100%
    >>>
    >>> You can mount VMware Shared Folders via:
    >>> mount -t vmhgfs .host:/ /mnt/hgfs
    >>>
    >>> or by adding this line to /etc/fstab:
    >>> .host:/ /mnt/hgfs vmhgfs defaults 0 0
    >>>
    Optional dependencies for open-vm-tools
    gtkmm [installed]
    libnotify [installed]
    libxtst [installed]
    fuse [installed]
    libsm [installed]
    open-vm-tools-modules: for linux kernel
    open-vm-tools-dkms: for linux-lts and other kernels [pending]
    netctl: suspend-resume network state [installed]
    networkmanager: suspend-resume network state
    (2/2) installing open-vm-tools-dkms [#####################################################################################################################] 100%
    >>> Enable building of open-vm-tools modules:
    >>> $ dkms add open-vm-tools/2013.09.16
    >>>
    >>> Enabling vmxnet driver in /usr/lib/modprobe.d/open-vm-tools-modules.conf
    >>> (this will disable pcnet32 driver)
    >>>
    >>> If vmxnet driver doesn't handle your NIC, you have to manually
    >>> disable loading of pcnet32 driver
    >>>
    #[root@localhost] - [14-01-01 18:09:47] - [/home/toxicarrow/Documents/firewall] - [R:0]
    pacman -S open-vm-tools-modules
    warning: open-vm-tools-dkms-5:2013.09.16-5 is up to date -- reinstalling
    resolving dependencies...
    looking for inter-conflicts...
    Packages (1): open-vm-tools-dkms-5:2013.09.16-5
    Total Installed Size: 5.57 MiB
    Net Upgrade Size: 0.00 MiB
    :: Proceed with installation? [Y/n]
    (1/1) checking keys in keyring [#####################################################################################################################] 100%
    (1/1) checking package integrity [#####################################################################################################################] 100%
    (1/1) loading package files [#####################################################################################################################] 100%
    (1/1) checking for file conflicts [#####################################################################################################################] 100%
    (1/1) checking available disk space [#####################################################################################################################] 100%
    (1/1) reinstalling open-vm-tools-dkms [#####################################################################################################################] 100%
    >>> Enable building of open-vm-tools modules:
    >>> $ dkms add open-vm-tools/2013.09.16
    >>>
    #[root@localhost] - [14-01-01 18:10:14] - [/home/toxicarrow/Documents/firewall] - [R:0]
    dkms install -m open-vm-tools -v 2013.04.16 -k $(uname -r)
    Error! Could not find module source directory.
    Directory: /usr/src/open-vm-tools-2013.04.16 does not exist.
    #[root@localhost] - [14-01-01 18:13:14] - [/home/toxicarrow/Documents/firewall] - [R:2]
    dkms install -m open-vm-tools -v 2013.09.16 -k $(uname -r)
    Kernel preparation unnecessary for this kernel. Skipping...
    Building module:
    cleaning build area....
    make KERNELRELEASE=3.12.6-1-ARCH VM_UNAME=3.12.6-1-ARCH MODULEBUILDDIR=/var/lib/dkms/open-vm-tools/2013.09.16/build -C vmblock; make VM_UNAME=3.12.6-1-ARCH MODULEBUILDDIR=/var/lib/dkms/open-vm-tools/2013.09.16/build -C vmci; make VM_UNAME=3.12.6-1-ARCH MODULEBUILDDIR=/var/lib/dkms/open-vm-tools/2013.09.16/build -C vmhgfs; make VM_UNAME=3.12.6-1-ARCH MODULEBUILDDIR=/var/lib/dkms/open-vm-tools/2013.09.16/build -C vmsync; make VM_UNAME=3.12.6-1-ARCH MODULEBUILDDIR=/var/lib/dkms/open-vm-tools/2013.09.16/build -C vmxnet; make VM_UNAME=3.12.6-1-ARCH MODULEBUILDDIR=/var/lib/dkms/open-vm-tools/2013.09.16/build -C vsock........
    Error! Build of vmblock.ko failed for: 3.12.6-1-ARCH (x86_64)
    Consult the make.log in the build directory
    /var/lib/dkms/open-vm-tools/2013.09.16/build/ for more information.
    #[root@localhost] - [14-01-01 18:13:45] - [/home/toxicarrow/Documents/firewall] - [R:7]
    Official Tools
    Before patches
    #[root@localhost] - [14-01-02 2:40:49] - [/home/toxicarrow/vmware/vmware-tools-distrib] - [R:32]
    ./vmware-install.pl
    A previous installation of VMware Tools has been detected.
    The previous installation was made by the tar installer (version 4).
    Keeping the tar4 installer database format.
    You have a version of VMware Tools installed. Continuing this install will
    first uninstall the currently installed version. Do you wish to continue?
    (yes/no) [yes]
    Uninstalling the tar installation of VMware Tools.
    Stopping services for VMware Tools
    Stopping VMware Tools services in the virtual machine:
    Guest operating system daemon: done
    Unmounting HGFS shares: done
    Guest filesystem driver: done
    VM communication interface socket family: done
    VM communication interface: done
    Stopping Thinprint services in the virtual machine:
    Stopping Virtual Printing daemon: done
    The removal of VMware Tools 9.6.1 build-1378637 for Linux completed
    successfully.
    Installing VMware Tools.
    In which directory do you want to install the binary files?
    [/usr/bin]
    What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
    [/etc/init.d]
    What is the directory that contains the init scripts?
    [/etc/init.d]
    In which directory do you want to install the daemon files?
    [/usr/sbin]
    In which directory do you want to install the library files?
    [/usr/lib/vmware-tools]
    The path "/usr/lib/vmware-tools" does not exist currently. This program is
    going to create it, including needed parent directories. Is this what you want?
    [yes]
    In which directory do you want to install the documentation files?
    [/usr/share/doc/vmware-tools]
    The path "/usr/share/doc/vmware-tools" does not exist currently. This program
    is going to create it, including needed parent directories. Is this what you
    want? [yes]
    The installation of VMware Tools 9.6.1 build-1378637 for Linux completed
    successfully. You can decide to remove this software from your system at any
    time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".
    Before running VMware Tools for the first time, you need to configure it by
    invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
    this program to invoke the command for you now? [yes]
    Initializing...
    Making sure services for VMware Tools are stopped.
    Stopping VMware Tools services in the virtual machine:
    Guest operating system daemon: done
    Unmounting HGFS shares: done
    Guest filesystem driver: done
    VM communication interface socket family: done
    VM communication interface: done
    Stopping Thinprint services in the virtual machine:
    Stopping Virtual Printing daemon: done
    sh: : command not found
    sh: : command not found
    Before you can compile modules, you need to have the following installed...
    make
    gcc
    kernel headers of the running kernel
    Searching for GCC...
    Detected GCC binary at "/bin/gcc".
    The path "/bin/gcc" appears to be a valid path to the gcc binary.
    Would you like to change it? [no]
    Searching for a valid kernel header path...
    Detected the kernel headers at "/lib/modules/3.12.6-1-ARCH/build/include".
    The path "/lib/modules/3.12.6-1-ARCH/build/include" appears to be a valid path
    to the 3.12.6-1-ARCH kernel headers.
    Would you like to change it? [no]
    make: Entering directory '/tmp/modconfig-lyoMIO/vmci-only'
    Using 2.6.x kernel build system.
    /bin/make -C /lib/modules/3.12.6-1-ARCH/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= modules
    make[1]: Entering directory '/usr/src/linux-3.12.6-1-ARCH'
    CC [M] /tmp/modconfig-lyoMIO/vmci-only/linux/driver.o
    CC [M] /tmp/modconfig-lyoMIO/vmci-only/linux/vmciKernelIf.o
    CC [M] /tmp/modconfig-lyoMIO/vmci-only/common/vmciDriver.o
    CC [M] /tmp/modconfig-lyoMIO/vmci-only/common/vmciResource.o
    CC [M] /tmp/modconfig-lyoMIO/vmci-only/common/vmciRoute.o
    CC [M] /tmp/modconfig-lyoMIO/vmci-only/common/vmciContext.o
    CC [M] /tmp/modconfig-lyoMIO/vmci-only/common/vmciDatagram.o
    CC [M] /tmp/modconfig-lyoMIO/vmci-only/common/vmciHashtable.o
    CC [M] /tmp/modconfig-lyoMIO/vmci-only/common/vmciEvent.o
    CC [M] /tmp/modconfig-lyoMIO/vmci-only/common/vmciQueuePair.o
    CC [M] /tmp/modconfig-lyoMIO/vmci-only/common/vmciQPair.o
    CC [M] /tmp/modconfig-lyoMIO/vmci-only/common/vmciDoorbell.o
    CC [M] /tmp/modconfig-lyoMIO/vmci-only/driverLog.o
    LD [M] /tmp/modconfig-lyoMIO/vmci-only/vmci.o
    Building modules, stage 2.
    MODPOST 1 modules
    CC /tmp/modconfig-lyoMIO/vmci-only/vmci.mod.o
    LD [M] /tmp/modconfig-lyoMIO/vmci-only/vmci.ko
    make[1]: Leaving directory '/usr/src/linux-3.12.6-1-ARCH'
    /bin/make -C $PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= postbuild
    make[1]: Entering directory '/tmp/modconfig-lyoMIO/vmci-only'
    make[1]: 'postbuild' is up to date.
    make[1]: Leaving directory '/tmp/modconfig-lyoMIO/vmci-only'
    cp -f vmci.ko ./../vmci.o
    make: Leaving directory '/tmp/modconfig-lyoMIO/vmci-only'
    make: Entering directory '/tmp/modconfig-VlEWPD/vmci-only'
    Using 2.6.x kernel build system.
    /bin/make -C /lib/modules/3.12.6-1-ARCH/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= modules
    make[1]: Entering directory '/usr/src/linux-3.12.6-1-ARCH'
    CC [M] /tmp/modconfig-VlEWPD/vmci-only/linux/driver.o
    CC [M] /tmp/modconfig-VlEWPD/vmci-only/linux/vmciKernelIf.o
    CC [M] /tmp/modconfig-VlEWPD/vmci-only/common/vmciDriver.o
    CC [M] /tmp/modconfig-VlEWPD/vmci-only/common/vmciResource.o
    CC [M] /tmp/modconfig-VlEWPD/vmci-only/common/vmciRoute.o
    CC [M] /tmp/modconfig-VlEWPD/vmci-only/common/vmciContext.o
    CC [M] /tmp/modconfig-VlEWPD/vmci-only/common/vmciDatagram.o
    CC [M] /tmp/modconfig-VlEWPD/vmci-only/common/vmciHashtable.o
    CC [M] /tmp/modconfig-VlEWPD/vmci-only/common/vmciEvent.o
    CC [M] /tmp/modconfig-VlEWPD/vmci-only/common/vmciQueuePair.o
    CC [M] /tmp/modconfig-VlEWPD/vmci-only/common/vmciQPair.o
    CC [M] /tmp/modconfig-VlEWPD/vmci-only/common/vmciDoorbell.o
    CC [M] /tmp/modconfig-VlEWPD/vmci-only/driverLog.o
    LD [M] /tmp/modconfig-VlEWPD/vmci-only/vmci.o
    Building modules, stage 2.
    MODPOST 1 modules
    CC /tmp/modconfig-VlEWPD/vmci-only/vmci.mod.o
    LD [M] /tmp/modconfig-VlEWPD/vmci-only/vmci.ko
    make[1]: Leaving directory '/usr/src/linux-3.12.6-1-ARCH'
    /bin/make -C $PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= postbuild
    make[1]: Entering directory '/tmp/modconfig-VlEWPD/vmci-only'
    make[1]: 'postbuild' is up to date.
    make[1]: Leaving directory '/tmp/modconfig-VlEWPD/vmci-only'
    cp -f vmci.ko ./../vmci.o
    make: Leaving directory '/tmp/modconfig-VlEWPD/vmci-only'
    make: Entering directory '/tmp/modconfig-VlEWPD/vsock-only'
    Using 2.6.x kernel build system.
    /bin/make -C /lib/modules/3.12.6-1-ARCH/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= modules
    make[1]: Entering directory '/usr/src/linux-3.12.6-1-ARCH'
    CC [M] /tmp/modconfig-VlEWPD/vsock-only/linux/af_vsock.o
    CC [M] /tmp/modconfig-VlEWPD/vsock-only/linux/vsockAddr.o
    CC [M] /tmp/modconfig-VlEWPD/vsock-only/linux/notifyQState.o
    CC [M] /tmp/modconfig-VlEWPD/vsock-only/linux/util.o
    CC [M] /tmp/modconfig-VlEWPD/vsock-only/linux/stats.o
    CC [M] /tmp/modconfig-VlEWPD/vsock-only/linux/notify.o
    CC [M] /tmp/modconfig-VlEWPD/vsock-only/driverLog.o
    LD [M] /tmp/modconfig-VlEWPD/vsock-only/vsock.o
    Building modules, stage 2.
    MODPOST 1 modules
    CC /tmp/modconfig-VlEWPD/vsock-only/vsock.mod.o
    LD [M] /tmp/modconfig-VlEWPD/vsock-only/vsock.ko
    make[1]: Leaving directory '/usr/src/linux-3.12.6-1-ARCH'
    /bin/make -C $PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= postbuild
    make[1]: Entering directory '/tmp/modconfig-VlEWPD/vsock-only'
    make[1]: 'postbuild' is up to date.
    make[1]: Leaving directory '/tmp/modconfig-VlEWPD/vsock-only'
    cp -f vsock.ko ./../vsock.o
    make: Leaving directory '/tmp/modconfig-VlEWPD/vsock-only'
    The module vmxnet3 from this package is not supported for kernels >= 3.10.
    Please enable this module in your kernel. You may also have to enable
    HYPERVISOR_GUEST.
    The module pvscsi from this package is not supported for kernels >= 3.10.
    Please enable this module in your kernel. You may also have to enable
    HYPERVISOR_GUEST.
    The module vmmemctl from this package is not supported for kernels >= 3.10.
    Please enable this module in your kernel. You may also have to enable
    HYPERVISOR_GUEST.
    The VMware Host-Guest Filesystem allows for shared folders between the host OS
    and the guest OS in a Fusion or Workstation virtual environment. Do you wish
    to enable this feature? [yes]
    make: Entering directory '/tmp/modconfig-C1YUSD/vmci-only'
    Using 2.6.x kernel build system.
    /bin/make -C /lib/modules/3.12.6-1-ARCH/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= modules
    make[1]: Entering directory '/usr/src/linux-3.12.6-1-ARCH'
    CC [M] /tmp/modconfig-C1YUSD/vmci-only/linux/driver.o
    CC [M] /tmp/modconfig-C1YUSD/vmci-only/linux/vmciKernelIf.o
    CC [M] /tmp/modconfig-C1YUSD/vmci-only/common/vmciDriver.o
    CC [M] /tmp/modconfig-C1YUSD/vmci-only/common/vmciResource.o
    CC [M] /tmp/modconfig-C1YUSD/vmci-only/common/vmciRoute.o
    CC [M] /tmp/modconfig-C1YUSD/vmci-only/common/vmciContext.o
    CC [M] /tmp/modconfig-C1YUSD/vmci-only/common/vmciDatagram.o
    CC [M] /tmp/modconfig-C1YUSD/vmci-only/common/vmciHashtable.o
    CC [M] /tmp/modconfig-C1YUSD/vmci-only/common/vmciEvent.o
    CC [M] /tmp/modconfig-C1YUSD/vmci-only/common/vmciQueuePair.o
    CC [M] /tmp/modconfig-C1YUSD/vmci-only/common/vmciQPair.o
    CC [M] /tmp/modconfig-C1YUSD/vmci-only/common/vmciDoorbell.o
    CC [M] /tmp/modconfig-C1YUSD/vmci-only/driverLog.o
    LD [M] /tmp/modconfig-C1YUSD/vmci-only/vmci.o
    Building modules, stage 2.
    MODPOST 1 modules
    CC /tmp/modconfig-C1YUSD/vmci-only/vmci.mod.o
    LD [M] /tmp/modconfig-C1YUSD/vmci-only/vmci.ko
    make[1]: Leaving directory '/usr/src/linux-3.12.6-1-ARCH'
    /bin/make -C $PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= postbuild
    make[1]: Entering directory '/tmp/modconfig-C1YUSD/vmci-only'
    make[1]: 'postbuild' is up to date.
    make[1]: Leaving directory '/tmp/modconfig-C1YUSD/vmci-only'
    cp -f vmci.ko ./../vmci.o
    make: Leaving directory '/tmp/modconfig-C1YUSD/vmci-only'
    make: Entering directory '/tmp/modconfig-C1YUSD/vmhgfs-only'
    Using 2.6.x kernel build system.
    /bin/make -C /lib/modules/3.12.6-1-ARCH/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= modules
    make[1]: Entering directory '/usr/src/linux-3.12.6-1-ARCH'
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/message.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/rpcout.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/hgfsUtil.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/cpName.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/request.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/stubs.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/link.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/bdhandler.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/transport.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/module.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/file.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/super.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/vmci.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/dir.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/fsutil.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/cpNameLinux.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/hgfsBd.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/filesystem.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/page.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/backdoorGcc64.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/backdoor.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/hgfsEscape.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/inode.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/dentry.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/cpNameLite.o
    CC [M] /tmp/modconfig-C1YUSD/vmhgfs-only/kernelStubsLinux.o
    LD [M] /tmp/modconfig-C1YUSD/vmhgfs-only/vmhgfs.o
    Building modules, stage 2.
    MODPOST 1 modules
    CC /tmp/modconfig-C1YUSD/vmhgfs-only/vmhgfs.mod.o
    LD [M] /tmp/modconfig-C1YUSD/vmhgfs-only/vmhgfs.ko
    make[1]: Leaving directory '/usr/src/linux-3.12.6-1-ARCH'
    /bin/make -C $PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= postbuild
    make[1]: Entering directory '/tmp/modconfig-C1YUSD/vmhgfs-only'
    make[1]: 'postbuild' is up to date.
    make[1]: Leaving directory '/tmp/modconfig-C1YUSD/vmhgfs-only'
    cp -f vmhgfs.ko ./../vmhgfs.o
    make: Leaving directory '/tmp/modconfig-C1YUSD/vmhgfs-only'
    The vmxnet driver is no longer supported on kernels 3.3 and greater. Please
    upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)
    The vmblock enables dragging or copying files between host and guest in a
    Fusion or Workstation virtual environment. Do you wish to enable this feature?
    [yes]
    NOTICE: It appears your system does not have the required fuse packages
    installed. The VMware blocking filesystem requires the fuse packages and its
    libraries to function properly. Please install the fuse or fuse-utils package
    using your systems package management utility and re-run this script in order
    to enable the VMware blocking filesystem.
    VMware automatic kernel modules enables automatic building and installation of
    VMware kernel modules at boot that are not already present. This feature can be
    enabled/disabled by re-running vmware-config-tools.pl.
    Would you like to enable VMware automatic kernel modules?
    [no]
    Detected X server version 1.14.5
    Distribution provided drivers for Xorg X server are used.
    Skipping X configuration because X drivers are not included.
    Warning: This script could not find mkinitrd or update-initramfs and cannot
    remake the initrd file!
    Checking acpi hot plug done
    Starting VMware Tools services in the virtual machine:
    Switching to guest configuration: done
    VM communication interface: done
    VM communication interface socket family: failed
    Guest filesystem driver: failed
    Mounting HGFS shares: failed
    VMware User Agent: done
    Guest operating system daemon: done
    Unable to start services for VMware Tools
    Execution aborted.
    After patches
    #[root@localhost] - [14-01-02 2:44:39] - [/home/toxicarrow/vmware] - [R:0]
    git clone https://github.com/rasa/vmware-tools-patches.git
    Cloning into 'vmware-tools-patches'...
    remote: Reusing existing pack: 134, done.
    remote: Total 134 (delta 0), reused 0 (delta 0)
    Receiving objects: 100% (134/134), 22.06 KiB | 0 bytes/s, done.
    Resolving deltas: 100% (74/74), done.
    Checking connectivity... done.
    #[root@localhost] - [14-01-02 2:44:55] - [/home/toxicarrow/vmware] - [R:0]
    ls
    = VMwareTools-9.6.1-1378637.tar.gz manifest.txt* run_upgrader.sh vmware-tools-distrib/ vmware-tools-patches/ vmware-tools-upgrader-32* vmware-tools-upgrader-64*
    #[root@localhost] - [14-01-02 2:44:57] - [/home/toxicarrow/vmware] - [R:0]
    cp VMwareTools-9.6.1-1378637.tar.gz vmware-tools-patches
    #[root@localhost] - [14-01-02 2:45:13] - [/home/toxicarrow/vmware] - [R:0]
    cd vmware-tools-patches
    #[root@localhost] - [14-01-02 2:45:17] - [/home/toxicarrow/vmware/vmware-tools-patches] - [R:0]
    ls
    LICENSE VMwareTools-9.6.1-1378637.tar.gz patch-module.sh* patches/ untar-and-patch-and-compile.sh*
    README.md download-patches.sh* patch-modules.sh* untar-all-and-patch.sh* untar-and-patch.sh*
    #[root@localhost] - [14-01-02 2:45:18] - [/home/toxicarrow/vmware/vmware-tools-patches] - [R:0]
    ./untar-and-patch-and-compile.sh
    === Patching ./VMwareTools-9.6.1-1378637.tar.gz ...
    --- Applying vmci/vmware9.k3.8rc4.patch ...
    patching file linux/driver.c
    Hunk #1 FAILED at 124.
    Hunk #2 FAILED at 1750.
    Hunk #3 FAILED at 1978.
    3 out of 3 hunks FAILED -- saving rejects to file linux/driver.c.rej
    --- Applying vmhgfs/vmhgfs-uid-gid-kernel-3.12-tools-9.6.1.patch ...
    patching file file.c
    patching file filesystem.c
    patching file fsutil.c
    patching file inode.c
    Hunk #1 succeeded at 514 (offset -3 lines).
    Hunk #2 succeeded at 617 (offset -3 lines).
    Hunk #3 succeeded at 1216 (offset -3 lines).
    patching file shared/compat_cred.h
    --- Applying vmhgfs/vmhgfs-d_count-kernel-3.11-tools-9.6.0.patch ...
    patching file inode.c
    Hunk #1 succeeded at 31 with fuzz 1.
    Hunk #2 FAILED at 1893.
    Hunk #3 FAILED at 1946.
    2 out of 3 hunks FAILED -- saving rejects to file inode.c.rej
    --- Applying vmhgfs/vmware9.compat_mm.patch ...
    patching file shared/compat_mm.h
    Hunk #1 FAILED at 91.
    Hunk #2 FAILED at 100.
    2 out of 2 hunks FAILED -- saving rejects to file shared/compat_mm.h.rej
    --- Applying vmhgfs/patch_inode.c.patch ...
    patching file inode.c
    Hunk #1 FAILED at 1798.
    Hunk #2 FAILED at 1818.
    2 out of 2 hunks FAILED -- saving rejects to file inode.c.rej
    --- Applying vmblock/vmblock.3.11.patch ...
    patching file linux/file.c
    --- Applying vmblock/vmblock.3.10.patch ...
    patching file linux/control.c
    Creating a new VMware Tools installer database using the tar4 format.
    Installing VMware Tools.
    In which directory do you want to install the binary files?
    [/usr/bin]
    What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
    [/etc/init.d]
    What is the directory that contains the init scripts?
    [/etc/init.d]
    In which directory do you want to install the daemon files?
    [/usr/sbin]
    In which directory do you want to install the library files?
    [/usr/lib/vmware-tools]
    The path "/usr/lib/vmware-tools" does not exist currently. This program is
    going to create it, including needed parent directories. Is this what you want?
    [yes]
    In which directory do you want to install the documentation files?
    [/usr/share/doc/vmware-tools]
    The path "/usr/share/doc/vmware-tools" does not exist currently. This program
    is going to create it, including needed parent directories. Is this what you
    want? [yes]
    The installation of VMware Tools 9.6.1 build-1378637 for Linux completed
    successfully. You can decide to remove this software from your system at any
    time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".
    Before running VMware Tools for the first time, you need to configure it by
    invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
    this program to invoke the command for you now? [yes]
    Initializing...
    Making sure services for VMware Tools are stopped.
    Stopping VMware Tools services in the virtual machine:
    Guest operating system daemon: done
    Unmounting HGFS shares: done
    Guest filesystem driver: done
    Stopping Thinprint services in the virtual machine:
    Stopping Virtual Printing daemon: done
    sh: : command not found
    sh: : command not found
    make: Entering directory '/tmp/modconfig-HrsGw6/vmci-only'
    Using 2.6.x kernel build system.
    /bin/make -C /lib/modules/3.12.6-1-ARCH/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= modules
    make[1]: Entering directory '/usr/src/linux-3.12.6-1-ARCH'
    CC [M] /tmp/modconfig-HrsGw6/vmci-only/linux/driver.o
    CC [M] /tmp/modconfig-HrsGw6/vmci-only/linux/vmciKernelIf.o
    CC [M] /tmp/modconfig-HrsGw6/vmci-only/common/vmciDriver.o
    CC [M] /tmp/modconfig-HrsGw6/vmci-only/common/vmciResource.o
    CC [M] /tmp/modconfig-HrsGw6/vmci-only/common/vmciContext.o
    CC [M] /tmp/modconfig-HrsGw6/vmci-only/common/vmciDatagram.o
    CC [M] /tmp/modconfig-HrsGw6/vmci-only/common/vmciHashtable.o
    CC [M] /tmp/modconfig-HrsGw6/vmci-only/common/vmciEvent.o
    CC [M] /tmp/modconfig-HrsGw6/vmci-only/common/vmciQueuePair.o
    CC [M] /tmp/modconfig-HrsGw6/vmci-only/common/vmciDoorbell.o
    CC [M] /tmp/modconfig-HrsGw6/vmci-only/common/vmciQPair.o
    CC [M] /tmp/modconfig-HrsGw6/vmci-only/common/vmciRoute.o
    CC [M] /tmp/modconfig-HrsGw6/vmci-only/driverLog.o
    LD [M] /tmp/modconfig-HrsGw6/vmci-only/vmci.o
    Building modules, stage 2.
    MODPOST 1 modules
    CC /tmp/modconfig-HrsGw6/vmci-only/vmci.mod.o
    LD [M] /tmp/modconfig-HrsGw6/vmci-only/vmci.ko
    make[1]: Leaving directory '/usr/src/linux-3.12.6-1-ARCH'
    /bin/make -C $PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= postbuild
    make[1]: Entering directory '/tmp/modconfig-HrsGw6/vmci-only'
    make[1]: 'postbuild' is up to date.
    make[1]: Leaving directory '/tmp/modconfig-HrsGw6/vmci-only'
    cp -f vmci.ko ./../vmci.o
    make: Leaving directory '/tmp/modconfig-HrsGw6/vmci-only'
    make: Entering directory '/tmp/modconfig-pVUBEq/vmci-only'
    Using 2.6.x kernel build system.
    /bin/make -C /lib/modules/3.12.6-1-ARCH/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= modules
    make[1]: Entering directory '/usr/src/linux-3.12.6-1-ARCH'
    CC [M] /tmp/modconfig-pVUBEq/vmci-only/linux/driver.o
    CC [M] /tmp/modconfig-pVUBEq/vmci-only/linux/vmciKernelIf.o
    CC [M] /tmp/modconfig-pVUBEq/vmci-only/common/vmciDriver.o
    CC [M] /tmp/modconfig-pVUBEq/vmci-only/common/vmciResource.o
    CC [M] /tmp/modconfig-pVUBEq/vmci-only/common/vmciContext.o
    CC [M] /tmp/modconfig-pVUBEq/vmci-only/common/vmciDatagram.o
    CC [M] /tmp/modconfig-pVUBEq/vmci-only/common/vmciHashtable.o
    CC [M] /tmp/modconfig-pVUBEq/vmci-only/common/vmciEvent.o
    CC [M] /tmp/modconfig-pVUBEq/vmci-only/common/vmciQueuePair.o
    CC [M] /tmp/modconfig-pVUBEq/vmci-only/common/vmciDoorbell.o
    CC [M] /tmp/modconfig-pVUBEq/vmci-only/common/vmciQPair.o
    CC [M] /tmp/modconfig-pVUBEq/vmci-only/common/vmciRoute.o
    CC [M] /tmp/modconfig-pVUBEq/vmci-only/driverLog.o
    LD [M] /tmp/modconfig-pVUBEq/vmci-only/vmci.o
    Building modules, stage 2.
    MODPOST 1 modules
    CC /tmp/modconfig-pVUBEq/vmci-only/vmci.mod.o
    LD [M] /tmp/modconfig-pVUBEq/vmci-only/vmci.ko
    make[1]: Leaving directory '/usr/src/linux-3.12.6-1-ARCH'
    /bin/make -C $PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= postbuild
    make[1]: Entering directory '/tmp/modconfig-pVUBEq/vmci-only'
    make[1]: 'postbuild' is up to date.
    make[1]: Leaving directory '/tmp/modconfig-pVUBEq/vmci-only'
    cp -f vmci.ko ./../vmci.o
    make: Leaving directory '/tmp/modconfig-pVUBEq/vmci-only'
    make: Entering directory '/tmp/modconfig-pVUBEq/vsock-only'
    Using 2.6.x kernel build system.
    /bin/make -C /lib/modules/3.12.6-1-ARCH/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= modules
    make[1]: Entering directory '/usr/src/linux-3.12.6-1-ARCH'
    CC [M] /tmp/modconfig-pVUBEq/vsock-only/linux/af_vsock.o
    CC [M] /tmp/modconfig-pVUBEq/vsock-only/linux/vsockAddr.o
    CC [M] /tmp/modconfig-pVUBEq/vsock-only/linux/notifyQState.o
    CC [M] /tmp/modconfig-pVUBEq/vsock-only/linux/util.o
    CC [M] /tmp/modconfig-pVUBEq/vsock-only/linux/stats.o
    CC [M] /tmp/modconfig-pVUBEq/vsock-only/linux/notify.o
    CC [M] /tmp/modconfig-pVUBEq/vsock-only/driverLog.o
    LD [M] /tmp/modconfig-pVUBEq/vsock-only/vsock.o
    Building modules, stage 2.
    MODPOST 1 modules
    CC /tmp/modconfig-pVUBEq/vsock-only/vsock.mod.o
    LD [M] /tmp/modconfig-pVUBEq/vsock-only/vsock.ko
    make[1]: Leaving directory '/usr/src/linux-3.12.6-1-ARCH'
    /bin/make -C $PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= postbuild
    make[1]: Entering directory '/tmp/modconfig-pVUBEq/vsock-only'
    make[1]: 'postbuild' is up to date.
    make[1]: Leaving directory '/tmp/modconfig-pVUBEq/vsock-only'
    cp -f vsock.ko ./../vsock.o
    make: Leaving directory '/tmp/modconfig-pVUBEq/vsock-only'
    The module vmxnet3 from this package is not supported for kernels >= 3.10.
    Please enable this module in your kernel. You may also have to enable
    HYPERVISOR_GUEST.
    The module pvscsi from this package is not supported for kernels >= 3.10.
    Please enable this module in your kernel. You may also have to enable
    HYPERVISOR_GUEST.
    The module vmmemctl from this package is not supported for kernels >= 3.10.
    Please enable this module in your kernel. You may also have to enable
    HYPERVISOR_GUEST.
    The VMware Host-Guest Filesystem allows for shared folders between the host OS
    and the guest OS in a Fusion or Workstation virtual environment. Do you wish
    to enable this feature? [yes]
    make: Entering directory '/tmp/modconfig-ukgHfB/vmci-only'
    Using 2.6.x kernel build system.
    /bin/make -C /lib/modules/3.12.6-1-ARCH/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= modules
    make[1]: Entering directory '/usr/src/linux-3.12.6-1-ARCH'
    CC [M] /tmp/modconfig-ukgHfB/vmci-only/linux/driver.o
    CC [M] /tmp/modconfig-ukgHfB/vmci-only/linux/vmciKernelIf.o
    CC [M] /tmp/modconfig-ukgHfB/vmci-only/common/vmciDriver.o
    CC [M] /tmp/modconfig-ukgHfB/vmci-only/common/vmciResource.o
    CC [M] /tmp/modconfig-ukgHfB/vmci-only/common/vmciContext.o
    CC [M] /tmp/modconfig-ukgHfB/vmci-only/common/vmciDatagram.o
    CC [M] /tmp/modconfig-ukgHfB/vmci-only/common/vmciHashtable.o
    CC [M] /tmp/modconfig-ukgHfB/vmci-only/common/vmciEvent.o
    CC [M] /tmp/modconfig-ukgHfB/vmci-only/common/vmciQueuePair.o
    CC [M] /tmp/modconfig-ukgHfB/vmci-only/common/vmciDoorbell.o
    CC [M] /tmp/modconfig-ukgHfB/vmci-only/common/vmciQPair.o
    CC [M] /tmp/modconfig-ukgHfB/vmci-only/common/vmciRoute.o
    CC [M] /tmp/modconfig-ukgHfB/vmci-only/driverLog.o
    LD [M] /tmp/modconfig-ukgHfB/vmci-only/vmci.o
    Building modules, stage 2.
    MODPOST 1 modules
    CC /tmp/modconfig-ukgHfB/vmci-only/vmci.mod.o
    LD [M] /tmp/modconfig-ukgHfB/vmci-only/vmci.ko
    make[1]: Leaving directory '/usr/src/linux-3.12.6-1-ARCH'
    /bin/make -C $PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= postbuild
    make[1]: Entering directory '/tmp/modconfig-ukgHfB/vmci-only'
    make[1]: 'postbuild' is up to date.
    make[1]: Leaving directory '/tmp/modconfig-ukgHfB/vmci-only'
    cp -f vmci.ko ./../vmci.o
    make: Leaving directory '/tmp/modconfig-ukgHfB/vmci-only'
    make: Entering directory '/tmp/modconfig-ukgHfB/vmhgfs-only'
    Using 2.6.x kernel build system.
    /bin/make -C /lib/modules/3.12.6-1-ARCH/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= modules
    make[1]: Entering directory '/usr/src/linux-3.12.6-1-ARCH'
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/backdoorGcc64.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/message.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/request.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/filesystem.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/cpName.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/dentry.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/rpcout.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/hgfsUtil.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/stubs.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/hgfsEscape.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/link.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/transport.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/module.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/file.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/super.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/vmci.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/bdhandler.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/dir.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/fsutil.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/cpNameLinux.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/hgfsBd.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/page.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/backdoor.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/inode.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/cpNameLite.o
    CC [M] /tmp/modconfig-ukgHfB/vmhgfs-only/kernelStubsLinux.o
    LD [M] /tmp/modconfig-ukgHfB/vmhgfs-only/vmhgfs.o
    Building modules, stage 2.
    MODPOST 1 modules
    CC /tmp/modconfig-ukgHfB/vmhgfs-only/vmhgfs.mod.o
    LD [M] /tmp/modconfig-ukgHfB/vmhgfs-only/vmhgfs.ko
    make[1]: Leaving directory '/usr/src/linux-3.12.6-1-ARCH'
    /bin/make -C $PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= postbuild
    make[1]: Entering directory '/tmp/modconfig-ukgHfB/vmhgfs-only'
    make[1]: 'postbuild' is up to date.
    make[1]: Leaving directory '/tmp/modconfig-ukgHfB/vmhgfs-only'
    cp -f vmhgfs.ko ./../vmhgfs.o
    make: Leaving directory '/tmp/modconfig-ukgHfB/vmhgfs-only'
    The vmxnet driver is no longer supported on kernels 3.3 and greater. Please
    upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)
    The vmblock enables dragging or copying files between host and guest in a
    Fusion or Workstation virtual environment. Do you wish to enable this feature?
    [yes]
    NOTICE: It appears your system does not have the required fuse packages
    installed. The VMware blocking filesystem requires the fuse packages and its
    libraries to function properly. Please install the fuse or fuse-utils package
    using your systems package management utility and re-run this script in order
    to enable the VMware blocking filesystem.
    VMware automatic kernel modules enables automatic building and installation of
    VMware kernel modules at boot that are not already present. This feature can be
    enabled/disabled by re-running vmware-config-tools.pl.
    Would you like to enable VMware automatic kernel modules?
    [no]
    Detected X server version 1.14.5
    Distribution provided drivers for Xorg X server are used.
    Skipping X configuration because X drivers are not included.
    Warning: This script could not find mkinitrd or update-initramfs and cannot
    remake the initrd file!
    Checking acpi hot plug done
    Starting VMware Tools services in the virtual machine:
    Switching to guest configuration: done
    VM communication interface: done
    VM communication interface socket family: failed
    Guest filesystem driver: failed
    Mounting HGFS shares: failed
    Guest operating system daemon: done
    Unable to start services for VMware Tools
    Execution aborted.
    #[root@localhost] - [14-01-02 2:46:53] - [/home/toxicarrow/vmware/vmware-tools-patches] - [R:0]
    Any idea what I should be doing?

    I have the same problem on ESXI 5.5 for over a month now, tried the patches, tried the LTS kernel which others say results in an immediate result without patches, nothing seems to work and nobody seems to be able to offer a solution.
    Did you make any progress ??
    Error! Build of vmblock.ko failed for: 3.10.25-1-lts (x86_64)
    Consult the make.log in the build directory
    /var/lib/dkms/open-vm-tools/2013.09.16/build/ for more information.
    make[2]: *** No rule to make target '/var/lib/dkms/open-vm-tools/2013.09.16/build/vmblock/linux/inode', needed by '/var/lib/dkms/open-vm-tools/2013.09.16/build/vmblock/vmblock.o'. Stop.
    Makefile:1224: recipe for target '_module_/var/lib/dkms/open-vm-tools/2013.09.16/build/vmblock' failed
    make[1]: *** [_module_/var/lib/dkms/open-vm-tools/2013.09.16/build/vmblock] Error 2
    make[1]: Leaving directory '/usr/src/linux-3.10.25-1-lts'
    Makefile:120: recipe for target 'vmblock.ko' failed
    Last edited by crankshaft (2014-01-10 11:32:32)

  • Error VMware Tools Installation (Shared Folder) - Ubuntu 15.04 [SOLVED!]

    Workstation 11.1
    Ubuntu 15.04 Guest OS
    Kernel 3.19.0-15-generic
    VMwareTools-9.9.2-2496486
    When I try to install vmwaretools in my Ubuntu 15.04, I receive the following compilation errors (shared folder feature don't work):
    Initializing...
    Making sure services for VMware Tools are stopped.
    Stopping VMware Tools services in the virtual machine:
       Guest operating system daemon:                              done
       VMware User Agent (vmware-user):                          done
       Blocking file system:                                               done
       Unmounting HGFS shares:                                      done
       Guest filesystem driver:                                           done
    Stopping Thinprint services in the virtual machine:
       Stopping Virtual Printing daemon:                              done
    update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
    update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
    The module vmci has already been installed on this system by another installer
    or package and will not be modified by this installer.
    The module vsock has already been installed on this system by another installer
    or package and will not be modified by this installer.
    The module vmxnet3 has already been installed on this system by another
    installer or package and will not be modified by this installer.
    The module pvscsi has already been installed on this system by another
    installer or package and will not be modified by this installer.
    The module vmmemctl has already been installed on this system by another
    installer or package and will not be modified by this installer.
    The VMware Host-Guest Filesystem allows for shared folders between the host OS
    and the guest OS in a Fusion or Workstation virtual environment.  Do you wish
    to enable this feature? [yes]
    Before you can compile modules, you need to have the following installed...
    make
    gcc
    kernel headers of the running kernel
    Searching for GCC...
    Detected GCC binary at "/usr/bin/gcc".
    The path "/usr/bin/gcc" appears to be a valid path to the gcc binary.
    Would you like to change it? [no]
    Searching for a valid kernel header path...
    Detected the kernel headers at "/lib/modules/3.19.0-15-generic/build/include".
    The path "/lib/modules/3.19.0-15-generic/build/include" appears to be a valid
    path to the 3.19.0-15-generic kernel headers.
    Would you like to change it? [no]
    make: Entering directory '/tmp/modconfig-O5xscq/vmhgfs-only'
    Using kernel build system.
    /usr/bin/make -C /lib/modules/3.19.0-15-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
      MODULEBUILDDIR= modules
    make[1]: Entering directory '/usr/src/linux-headers-3.19.0-15-generic'
      CC [M]  /tmp/modconfig-O5xscq/vmhgfs-only/backdoorGcc64.o
      CC [M]  /tmp/modconfig-O5xscq/vmhgfs-only/message.o
      CC [M]  /tmp/modconfig-O5xscq/vmhgfs-only/dir.o
      CC [M]  /tmp/modconfig-O5xscq/vmhgfs-only/rpcout.o
      CC [M]  /tmp/modconfig-O5xscq/vmhgfs-only/filesystem.o
      CC [M]  /tmp/modconfig-O5xscq/vmhgfs-only/cpName.o
      CC [M]  /tmp/modconfig-O5xscq/vmhgfs-only/request.o
      CC [M]  /tmp/modconfig-O5xscq/vmhgfs-only/module.o
    /tmp/modconfig-O5xscq/vmhgfs-only/dir.c: In function ‘HgfsPackDirOpenRequest’:
    /tmp/modconfig-O5xscq/vmhgfs-only/dir.c:417:26: error: ‘struct file’ has no member named ‘f_dentry’
                          file->f_dentry) < 0) {
                              ^
    /tmp/modconfig-O5xscq/vmhgfs-only/dir.c: In function ‘HgfsDirLlseek’:
    /tmp/modconfig-O5xscq/vmhgfs-only/dir.c:707:32: error: ‘struct file’ has no member named ‘f_dentry’
        struct dentry *dentry = file->f_dentry;
                                    ^
    In file included from /tmp/modconfig-O5xscq/vmhgfs-only/dir.c:39:0:
    /tmp/modconfig-O5xscq/vmhgfs-only/dir.c: In function ‘HgfsReaddirNextEntry’:
    /tmp/modconfig-O5xscq/vmhgfs-only/dir.c:993:31: error: ‘struct file’ has no member named ‘f_dentry’
        si = HGFS_SB_TO_COMMON(file->f_dentry->d_inode->i_sb);
                                   ^
    /tmp/modconfig-O5xscq/vmhgfs-only/module.h:89:62: note: in definition of macro ‘HGFS_SB_TO_COMMON’
    #define HGFS_SB_TO_COMMON(sb)             ((HgfsSuperInfo *)(sb)->s_fs_info)
                                                                  ^
    /tmp/modconfig-O5xscq/vmhgfs-only/dir.c:1082:26: error: ‘struct file’ has no member named ‘f_dentry’
              *entryIno = file->f_dentry->d_inode->i_ino;
                              ^
    In file included from /tmp/modconfig-O5xscq/vmhgfs-only/dir.c:30:0:
    /tmp/modconfig-O5xscq/vmhgfs-only/dir.c:1088:44: error: ‘struct file’ has no member named ‘f_dentry’
              *entryIno = compat_parent_ino(file->f_dentry);
                                                ^
    /tmp/modconfig-O5xscq/vmhgfs-only/./shared/compat_fs.h:120:46: note: in definition of macro ‘compat_parent_ino’
    #define compat_parent_ino(dentry) parent_ino(dentry)
                                                  ^
    /tmp/modconfig-O5xscq/vmhgfs-only/dir.c:1093:52: error: ‘struct file’ has no member named ‘f_dentry’
          *entryIno = HgfsGetFileInode(&entryAttrs, file->f_dentry->d_inode->i_sb);
                                                        ^
    /tmp/modconfig-O5xscq/vmhgfs-only/dir.c: In function ‘HgfsDoReaddir’:
    /tmp/modconfig-O5xscq/vmhgfs-only/dir.c:1173:13: error: ‘struct file’ has no member named ‘f_dentry’
           !(file->f_dentry) ||
                 ^
    /tmp/modconfig-O5xscq/vmhgfs-only/dir.c:1174:13: error: ‘struct file’ has no member named ‘f_dentry’
           !(file->f_dentry->d_inode)) {
                 ^
    scripts/Makefile.build:257: recipe for target '/tmp/modconfig-O5xscq/vmhgfs-only/dir.o' failed
    make[2]: *** [/tmp/modconfig-O5xscq/vmhgfs-only/dir.o] Error 1
    make[2]: ** Esperando que outros processos terminem.
    Makefile:1394: recipe for target '_module_/tmp/modconfig-O5xscq/vmhgfs-only' failed
    make[1]: *** [_module_/tmp/modconfig-O5xscq/vmhgfs-only] Error 2
    make[1]: Leaving directory '/usr/src/linux-headers-3.19.0-15-generic'
    Makefile:120: recipe for target 'vmhgfs.ko' failed
    make: *** [vmhgfs.ko] Error 2
    make: Leaving directory '/tmp/modconfig-O5xscq/vmhgfs-only'
    The filesystem driver (vmhgfs module) is used only for the shared folder
    feature. The rest of the software provided by VMware Tools is designed to work
    independently of this feature.
    If you wish to have the shared folders feature, you can install the driver by
    running vmware-config-tools.pl again after making sure that gcc, binutils, make
    and the kernel sources for your running kernel are installed on your machine.
    These packages are available on your distribution's installation CD.
    [ Press Enter key to continue ]
    The vmxnet driver is no longer supported on kernels 3.3 and greater. Please
    upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)
    The vmblock enables dragging or copying files between host and guest in a
    Fusion or Workstation virtual environment.  Do you wish to enable this feature?
    [yes]
    VMware automatic kernel modules enables automatic building and installation of
    VMware kernel modules at boot that are not already present. This feature can be
    enabled/disabled by re-running vmware-config-tools.pl.
    Would you like to enable VMware automatic kernel modules?
    [no]
    Thinprint provides driver-free printing. Do you wish to enable this feature?
    [yes]
    Disabling timer-based audio scheduling in pulseaudio.
    Do you want to enable Guest Authentication (vgauth)? [yes]
    Detected X server version 1.17.1
    Distribution provided drivers for Xorg X server are used.
    Skipping X configuration because X drivers are not included.
    Creating a new initrd boot image for the kernel.
    update-initramfs: Generating /boot/initrd.img-3.19.0-15-generic
       Checking acpi hot plug                                              done
    Starting VMware Tools services in the virtual machine:
       Switching to guest configuration:                                   done
       Blocking file system:                                               done
       VMware User Agent:                                                  done
       Guest operating system daemon:                                      done
       Starting Virtual Printing daemon:                                   done
    The configuration of VMware Tools 9.9.2 build-2496486 for Linux for this
    running kernel completed successfully.
    You must restart your X session before any mouse or graphics changes take
    effect.
    You can now run VMware Tools by invoking "/usr/bin/vmware-toolbox-cmd" from the
    command line.
    To enable advanced X features (e.g., guest resolution fit, drag and drop, and
    file and text copy/paste), you will need to do one (or more) of the following:
    1. Manually start /usr/bin/vmware-user
    2. Log out and log back into your desktop session; and,
    3. Restart your X session.
    Enjoy,
    --the VMware team
    I tried to use these instructions to solve the problem:
    http://rglinuxtech.com/?p=1281
    compiling - VMWare player and Ubuntu 15.04: net driver does not compile anymore, how to fix? - Ask Ubuntu
    However, I don't have the /usr/lib/vmware/modules/source with vmnet.tar file.
    I just have /usr/lib/vmware-tools/modules/source with the following files:
    legacy    vmblock.tar    vmhgfs.tar    vmsync.tar    vmxnet.tar    pvscsi.tar    vmci.tar    vmmemctl.tar    vmxnet3.tar    vsock.tar
    How I resolve this problem?
    Thank You!

    Now It's working for me! :-) Thanks kikitora for the correct answer and Rahul Jha for this tutorial:
    Please ensure that latest Workstation 11 is installed.
    Make sure open-vm-tools is not installed.
    sudo apt-get remove open-vm-tools
    1. Make sure the updates are done:
    sudo apt-get update
    2. Make sure git is installed
    sudo apt-get install git
    3. Run the command to get the tools from repository.
    sudo git clone https://github.com/rasa/vmware-tools-patches.git
    4. cd to vmware-tools-folder
    cd vmware-tools-patches
    5. Run the patch
    sudo ./download-tools.sh
    6. Run the following patch
    sudo ./untar-and-patch.sh
    7. Run the complie.sh file
    sudo ./compile.sh

  • No migrated network IP / Removal VMware Tools

    Hello guys! good night!
    I'm trying to convert about 100 VMWARE VMs to my Hyper-V 2012 R2 environment. I'm using the new MVMC 2.0.
    After converting the VM, I realize that the network IP address was absent. The NIC was using the DHCP config. (The source VMWARE VM was configured with Static IP).
    Other point is that the VMWARE tools wasn't removed.
    In addition, during the migration process, the source VMWARE VM was power on and the MVMC did the snapshot and turned it off.
    None of this itens has occured after the VM migration complete process. Even the VLAN ID in the VM settings on the Hyper-V was blank. No error message was returned. The whole migration process has completed successfully (green check mark). 
    On the link http://blogs.technet.com/b/privatecloud/archive/2014/04/08/migration-automation-toolkit-for-mvmc-2-0.aspx
    states that with this tool is possible to:
    MVMC removes VMware tools;
    MVMC migrates network IPs;
    But none of this itens has occured after the VM migration complete process. Even the VLAN ID in the VM settings on the Hyper-V was blank.
    Besides this issues, the whole migration process has completed successfully (green check mark). 
    I would like to confirm that steps should I take to do a troubleshooting (for example, where can I find the verbose logs, etc).
    Best regards, 
    Leandro
    Leandro Soares - MCP/MCSA/MCTS

    I have the same problem on ESXI 5.5 for over a month now, tried the patches, tried the LTS kernel which others say results in an immediate result without patches, nothing seems to work and nobody seems to be able to offer a solution.
    Did you make any progress ??
    Error! Build of vmblock.ko failed for: 3.10.25-1-lts (x86_64)
    Consult the make.log in the build directory
    /var/lib/dkms/open-vm-tools/2013.09.16/build/ for more information.
    make[2]: *** No rule to make target '/var/lib/dkms/open-vm-tools/2013.09.16/build/vmblock/linux/inode', needed by '/var/lib/dkms/open-vm-tools/2013.09.16/build/vmblock/vmblock.o'. Stop.
    Makefile:1224: recipe for target '_module_/var/lib/dkms/open-vm-tools/2013.09.16/build/vmblock' failed
    make[1]: *** [_module_/var/lib/dkms/open-vm-tools/2013.09.16/build/vmblock] Error 2
    make[1]: Leaving directory '/usr/src/linux-3.10.25-1-lts'
    Makefile:120: recipe for target 'vmblock.ko' failed
    Last edited by crankshaft (2014-01-10 11:32:32)

  • VMware Tools

    Hello,
           I have been using Veeam 7.0 Backup and Replication to backup all of my VMGuest, but I had issues with one of my VMGuest running Windows 2003 Server R2 Standard. I continued to get the error VMware Tools  not running I thought this was an issue with Veeam, but when I logged into vSphere (5.5) it also reports that VMware Tools is not running. When I log into the server via RDP VMware Tools is running. Has anyone had this type of issue before? I have completely uninstall VMware tools and reinstalled it, but had the same issues.

    You're right, indeed, that the problem seems to have to do with VMWare, rather than Veeam, as the latter relies on the information gotten from the vSphere.
    Anyway, during unistalling VMware does the corresponding folder get deleted or not? Sometimes it might happen the underlying folder containing VMware Tools stays intact during uninstall operation and that leads to reсurring issues.
    Cheers.

  • VMware Tools on Cisco Prime LMS 4.1

    Hello,
    I have just installed Cisco Prime LMS 4.1 from .ova file on a VMware architecture. My customer wants to know if the server is compatible with vmware tools.
    I looked over Cisco documentation but it is never mentionned.
    Has someone allready take a look into that ?
    Thanks,
    Regards,
    Abel JULIAN,
    Nextiraone FRANCE.

    Yes, the datastore is located on a remote SAN so the original source won't be impacted by the loss of the ESXi. But in a perfect world (with VMtools), Vmotion will move VM from one ESX to another in case of failure, performance problem etc.
    Those functions won't be accessible here, and the VM will need to be restarted manually and reaffected to another ESXi in case of failure. Like I said before, the LMS server is not a critical application so that is not a huge issue. The important is to know that Cisco does not support this feature.
    Anyway, I have my answer so it is ok for me, I will notify my customer.
    Thanks you for your time,
    Regards,
    Abel

  • Vmware-tools install

    Has anyone successfully installed vmware-tools on arch? im curious if just symlinking /etc/rc.{multi,single} to /etc/rc.0-6 is sufficient to get passed that question in the script?
    ah ok,
    ln -s rc.d/ rc6.d
    ln -s rc.d/ rc5.d
    ln -s rc.d/ rc4.d
    ln -s rc.d/ rc3.d
    ln -s rc.d/ rc2.d
    ln -s rc.d/ rc1.d
    ln -s rc.d/ rc0.d
    next problem i run into is it fails to stop vmware tools services which has never been run in the first place : any ideas?
    more info this is vmware workstation 5.5.1 build-19175, arch 7.1 xorg7 kde3.5 ive checked other postings here nothing related to what im seeing when trying to run vmware-config-tools
    root@myhost dev]# vmware-config-tools.pl
    sh: /etc/vmware-tools: is a directory
    Making sure services for VMware Tools are stopped.
    Unable to stop services for VMware Tools
    Execution aborted.

    check out the packagebuild in AUR
    It sets up those folders and other stuff for vmware workstation 5.5 and may help you.
    If Archlinux is running as a vmware guest system, did you install X ?

  • VMware Tools required

    I've got VMware Player installed/running, 100%, under W7 Pro with a W10 guest. Now I want to access shared folders from the host but folder sharing option is disabled? The advice there is I require VMware Tools.
    How do I do that, there is another reference to the CD drive but I do not have a disc for whatever? Can I download a file to install this Tools?
    The more I search the more lost I become .
    Any suggestions most welcome.

    Thanks André, I've got access to the virtual CD-ROM drive but because I do not have any discs it always ends up with "Please insert a disk into DVD drive". I then decided to download VMware Tools ISO directly from within the Win10 guest and selected install when it asked what to do with it. All went fine and it's installed after a restart or two.
    I may have made a mistake when selecting which VMware Tools ISO because I selected the x86 version and my installed VMware Player is 64-bit? The Win10 guest is x86. During installation I received a pop-up "This virtual machine is running a version of VMware Tools that might have compatibility problems with VMware Player" I proceeded and another pop-up "Setup failed to install the SVGA driver automatically. This driver will have to be installed manually."
    After I activated shared folders within the Win10 guest I had access to the required files on the host and all fine.
    Would you advise that I uninstall the x86 version and reinstall the 64-bit version? The missing SVGA driver's impact I cannot see and do not know if I should surf and try and find such a driver?

  • How To: Upgrade the VMware Tools in vCMA

    I am by no means a linux expert but this method worked for me.  I now have the latest version of VMware Tools from vSphere running in vCMA.
    0. Snapshot the vCMA machine so you can undo if there are any problems!
    1. Firstly download the latest linux.iso from your esx box to your desktop. Use WinSCP or other similar tool to download this from /vmimages/tools-isoimages
    2. Extract the tar.gz file using an archive manager such as 7zip. The vSphere version is called VMwareTools-4.0.0-164009.tar.gz so this is what I will refer to from here on.
    3. Upload VMwareTools-4.0.0-164009.tar.gz to the vCMA servers /tmp directory using WinSCP or downloading it from a webserver using wget http://server/VMwareTools-4.0.0-164009.tar.gz
    4. On the vCMA server console install the The World-Wide Web library for Perl. yum install perl-libwww-perl
    5. Extract the contents of the VMwareTools-4.0.0-164009.tar.gz file in the /tmp directory. tar zxf /tmp/VMwareTools-4.0.0-164009.tar.gz
    6. Uninstall the previous version of VMware Tools using the uninstaller from the latest version. The uninstall script wasn't left from the initial install. /tmp/vmware-tools-distrib/bin/vmware-uninstall-tools.pl
    7. Install the latest version accepting the defaults. /tmp/vmware-tools-distrib/vmware-install.pl
    8. Reboot the vCMA server. shutdown -r now
    9. If everything works correctly remove the snapshot.
    That should be all there is to it.
    Good luck!

    You could also replace steps 1 - 3 with the following alternates:
    1. Shutdown the VCMA  guest and add a "client" CD ROM to the VCMA appliance and power-on;
    2a. Create a directory for mount point, "mkdir /mnt/cdrom"
    2b. Select "VM-&gt;Guest-&gt;Install/Upgrade VMware Tools" from the console menu;
    2c. Mount the VMware Tools CD, "mount -t iso9660 /dev/hda /mnt/cdrom"
    3. Copy the VMwareTools to the /tmp directory, "cp /mnt/cdrom/VMwareTools-4*.gz /tmp"
    Then proceed from your steps. Next Tools update you will only need to do steps 2b, 2c, 3, 5 and 7-9.
    --Collin C. MacMillan
    SOLORI - Solution Oriented, LLC
    http://blog.solori.net
    If you find this information useful, please award points for "correct" or "helpful".

  • Vmware tools installed but not working.

    I installed vmware 9.0.2 from pacman and also installed vmware-tools but when I fire up windows xp (for brittanica encyclopedia) in vmware it asks me to download & install vmware tools,
    1. When i've already installed it with pacman ( it contained tools for freebsd, linux, windows etc. ), why is vmware wants to install it again ?
    2. When vmware asks to download & install vmware-tools, it downloads but gives error that "A software conponent failed to installed..." basically it fails to install.
    3. How to get vmware-tools working ?
    How to solve this problem ?

    Make sure you are in bridged mode, not host only.

  • VMware tools for OEL 5 Update 3

    Dear All,
    Recently I tried installing VMware tools on OEL 5 with Update 3 Linux Virtual Machine. The GNOME X Desktop which was working fine before the install stopped working after I installed VMware Tools.
    Why am I looking to Install VMware tools.
    I have two issues with OEL 5.3 Virtual Machines.
    #1. The Desktop is very small. I have difficulty in finding and navigating to the Next Button in OUI (runInstaller).
    #2. Mouse gets stuck while moving causing pain in the hand.
    Note: The above two issues are not appearing in Red Hat Virtual Machines I have on the same box.
    I'm not sure if OEL 5.3 is supported to be installed on VMware.
    Please help.
    Regards,
    Madhu

    There are some points to answer here:
    Change of resolution:
    1. login as root
    2. System > Administration > Display
    3. Change number of colors to thousands
    4. Select your resolution.
    5. Logoff
    6. Display size should change
    Certification on VMware:
    Officially there is no VMware certification of any Oracle product. You can run it in a VMware but if you encouter a problem you have to reproduce it on real hardware.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Laptop mode tools problem with kernel 3.0

    today I just updated the system and my laptop runs dramatically hotter after that. I read the archwiki, it does talk about the laptop mode tools problem with kernel 3.0 but when I opened the file /usr/sbin/laptop_mode, the lines which the wiki mentions are not there. Does anyone here have the same problem and can you offer the solution?
    Here is my /usr/sbin/laptop_mode
    #! /bin/sh
    # Script to start or stop laptop_mode, and to control various settings of the
    # kernel, hardware etc. that influence power consumption.
    # This script is a part of Laptop Mode Tools. If you are running a supported
    # power management daemon, this script will be automatically called on power
    # state change.
    # Configure laptop mode tools in /etc/laptop-mode/laptop-mode.conf, and in
    # the broken-out config files in /etc/laptop-mode/conf.d.
    # Please consult the manual pages laptop-mode.conf(8) and laptop_mode(8) for
    # additional information.
    # Maintainer: Ritesh Raj Sarraf ([email protected])
    # Original Author: Bart Samwel ([email protected])
    # Project home page: http://samwel.tk/laptop_mode
    # Contributors to this script: Bart Samwel
    # Kiko Piris
    # Micha Feigin
    # Andrew Morton
    # Herve Eychenne
    # Dax Kelson
    # Jan Polacek
    # ... and many others that I've stopped
    # keeping track of.
    # Based on a script for Linux 2.4 written by Jens Axboe.
    set -a
    # The laptop mode tools version number. Extracted by the installer makefile
    # as well, so don't change the format!
    LMTVERSION=1.59
    # This script is loaded from multiple scripts to set the config defaults
    # and to read the configuration on top of those. Only when the command is
    # recognized does this script do anything else.
    VERBOSE_OUTPUT=0
    ENABLE_LAPTOP_MODE_ON_BATTERY=1
    ENABLE_LAPTOP_MODE_ON_AC=0
    ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED=0
    PARTITIONS="auto /dev/mapper/*"
    LM_BATT_MAX_LOST_WORK_SECONDS=600
    LM_AC_MAX_LOST_WORK_SECONDS=360
    DEF_MAX_AGE=30
    LM_READAHEAD=3072
    NOLM_READAHEAD=128
    CONTROL_READAHEAD=1
    CONTROL_NOATIME=0
    USE_RELATIME=1
    CONTROL_HD_IDLE_TIMEOUT=1
    LM_AC_HD_IDLE_TIMEOUT=4 # 20 seconds
    LM_BATT_HD_IDLE_TIMEOUT=4 # 20 seconds
    NOLM_HD_IDLE_TIMEOUT=244 # 2 hours
    DEF_UPDATE=5
    DEF_XFS_AGE_BUFFER=15
    DEF_XFS_SYNC_INTERVAL=30
    DEF_XFS_BUFD_INTERVAL=1
    XFS_HZ=100
    CONTROL_MOUNT_OPTIONS=1
    BATT_HD_POWERMGMT=1
    LM_AC_HD_POWERMGMT=254
    NOLM_AC_HD_POWERMGMT=254
    CONTROL_HD_POWERMGMT=0
    CONTROL_HD_WRITECACHE=0
    NOLM_AC_HD_WRITECACHE=1
    NOLM_BATT_HD_WRITECACHE=0
    LM_HD_WRITECACHE=0
    LM_DIRTY_RATIO=60
    LM_DIRTY_BACKGROUND_RATIO=1
    NOLM_DIRTY_BACKGROUND_RATIO=10
    NOLM_DIRTY_RATIO=40
    LM_SECONDS_BEFORE_SYNC=2
    BATT_CPU_MAXFREQ=medium
    BATT_CPU_MINFREQ=slowest
    BATT_CPU_GOVERNOR=ondemand
    BATT_CPU_IGNORE_NICE_LOAD=1
    LM_AC_CPU_MAXFREQ=fastest
    LM_AC_CPU_MINFREQ=slowest
    LM_AC_CPU_GOVERNOR=ondemand
    LM_AC_CPU_IGNORE_NICE_LOAD=1
    NOLM_AC_CPU_MAXFREQ=fastest
    NOLM_AC_CPU_MINFREQ=slowest
    NOLM_AC_CPU_GOVERNOR=ondemand
    NOLM_AC_CPU_IGNORE_NICE_LOAD=0
    CONTROL_CPU_FREQUENCY=0
    HD="/dev/[hs]d[abcdefgh]"
    CONTROL_SYSLOG_CONF=0
    LM_AC_SYSLOG_CONF=/etc/syslog-on-ac-with-lm.conf
    NOLM_AC_SYSLOG_CONF=/etc/syslog-on-ac-without-lm.conf
    BATT_SYSLOG_CONF=/etc/syslog-on-battery.conf
    SYSLOG_CONF_SIGNAL_PROGRAM=syslogd
    SYSLOG_CONF=/etc/syslog.conf
    CONTROL_DPMS_STANDBY=0
    BATT_DPMS_STANDBY=300
    LM_AC_DPMS_STANDBY=1200
    NOLM_AC_DPMS_STANDBY=1200
    CONTROL_CPU_THROTTLING=0
    BATT_CPU_THROTTLING=medium
    LM_AC_CPU_THROTTLING=minimum
    NOLM_AC_CPU_THROTTLING=minimum
    CONTROL_START_STOP=1
    CONTROL_TERMINAL=0
    TERMINALS="/dev/vc/1 /dev/vcs1"
    BATT_TERMINAL_BLANK_MINUTES=1
    BATT_TERMINAL_POWERDOWN_MINUTES=2
    LM_AC_TERMINAL_BLANK_MINUTES=10
    LM_AC_TERMINAL_POWERDOWN_MINUTES=10
    NOLM_AC_TERMINAL_BLANK_MINUTES=10
    NOLM_AC_TERMINAL_POWERDOWN_MINUTES=50
    ENABLE_AUTO_HIBERNATION=0
    HIBERNATE_COMMAND=/usr/sbin/hibernate
    AUTO_HIBERNATION_ON_CRITICAL_BATTERY_LEVEL=1
    DISABLE_LAPTOP_MODE_ON_CRITICAL_BATTERY_LEVEL=1
    AUTO_HIBERNATION_BATTERY_CHARGE_MAH=0
    AUTO_HIBERNATION_BATTERY_CHARGE_MWH=0
    MINIMUM_BATTERY_CHARGE_MAH=0
    MINIMUM_BATTERY_CHARGE_MWH=0
    ASSUME_SCSI_IS_SATA=1
    CONTROL_BRIGHTNESS=0
    BATT_BRIGHTNESS_COMMAND=false
    LM_AC_BRIGHTNESS_COMMAND=false
    NOLM_AC_BRIGHTNESS_COMMAND=false
    LOG_TO_SYSLOG=1
    DEBUG=0
    ENABLE_LAPTOP_MODE_TOOLS=1
    # Initialize the PATH Variable
    export PATH="${PATH}":/bin:/sbin:/usr/bin:/usr/sbin
    # This is a 2 phase locking approach. LMT_REQ_LOCK is the outer lock and LMT_INVOC_LOCK is the inner lock
    # We take this approach to ensure the scenario that, "At any point when an event occurs (AC/BATT), the
    # kernel can generate multiple events spanning over a couple of events. The first event is honored and
    # lmt executes. If the last event triggered at the 9th second, there is a fair chance that a good amount
    # of state change would have occured in the OS, to honor that state, we keep an outer lock (LMT_REQ_LOCK)
    # handy, so that those changes can also be applied and not forgotten.
    # Workflow:
    # Event-1 is generated and lmt executes (lmt runtime could span 5-10 seconds)
    # At seventh second, 4 events generate. But Event-1 is still running.
    # We don't want to discard all the remaining 4 events, but at least honor 1 so that we can act to the changes
    # that occured in the last 7 seconds.
    # So, Event-2 acquire LMT_REQ_LOCK and waits to acquire LMT_INVOC_LOCK (which is acquire by Event-1)
    LMT_REQ_LOCK="/var/lock/lmt-req.lock"
    LMT_INVOC_LOCK="/var/lock/lmt-invoc.lock"
    FLOCK=`which flock`
    checkint ()
    # $1 arg should be the string/integer
    # that you want to check for as an integer.
    echo $1 | grep "[^0-9]" > /dev/null 2>&1
    return $?;
    # Returns 1 if it is an integer
    # Function to handle logging
    LOGGER=`which logger`;
    log ()
    # $1 should be msg type
    # $2 should be the real msg
    if [ x$LOG_TO_SYSLOG = x1 ]; then
    # NOTE: Add the check on $2 being empty, once you are confident
    # that there aren't any bugs in logging. And no bugs in executing
    # modules and logging
    if [ -x $LOGGER -a "$1" != "STATUS" ]; then
    #if [ -z $2 ]; then
    # continue
    #elif [ "$1" = "MSG" ]; then
    if [ "$1" = "MSG" ]; then
    logger -p daemon.info -t laptop-mode "$2";
    elif [ "$1" = "ERR" ]; then
    logger -p daemon.err -t laptop-mode "$2";
    elif [ "$1" = "VERBOSE" ]; then
    if [ x$VERBOSE_OUTPUT = x1 ]; then
    logger -p daemon.debug -t laptop-mode "$2";
    fi
    else
    logger -p daemon.notice -t laptop-mode "$2";
    fi
    fi
    fi
    if [ "$1" = "VERBOSE" ]; then
    $LM_VERBOSE && echo "$2" >/dev/fd/2;
    elif [ "$1" = "ERR" ]; then
    echo "$2" >/dev/fd/2;
    else
    # Message of type MSG and STATUS can go to stdout.
    echo "$2" >/dev/fd/1;
    fi
    enableDebug ()
    # Check if debug is enabled
    if [ x$(($(basename $1 | cut -d . -f1 | tr "[:lower:]" "[:upper:]" | sed 's/-/_/g')_DEBUG)) = x1 ]; then
    set -vx
    fi
    disableDebug ()
    # Check if debug is enabled
    if [ x$(($(basename $1 | cut -d . -f1 | tr "[:lower:]" "[:upper:]" | sed 's/-/_/g')_DEBUG)) = x1 ]; then
    set +vx
    fi
    # No default on these ones -- we need to detect if they have been set, for
    # backward compatibility with MINIMUM_BATTERY_MINUTES etc.
    AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT=
    MINIMUM_BATTERY_CHARGE_PERCENT=
    # Backward compatibility variable that is sometimes
    # set externally (Debian init system)
    unset VERBOSE
    lmt_load_config ()
    # Source config. Some config settings have been moved from the main config file
    # to modular configuration files, and to support existing laptop-mode.conf
    # files from earlier versions, we source the modular configuration files FIRST.
    if [ -d /etc/laptop-mode/conf.d ] ; then
    for CONF in /etc/laptop-mode/conf.d/*.conf ; do
    if [ -r "$CONF" ] ; then
    . "$CONF"
    #Handle individual module debug settings
    if [ "$DEBUG" -eq 1 ]; then
    export $(basename $CONF | cut -d . -f1 | tr "[:lower:]" "[:upper:]" | sed 's/-/_/g')_DEBUG=1
    log "VERBOSE" "Enabling debug mode for module $CONF"
    fi
    DEBUG=0
    else
    log "MSG" "Warning: Configuration file $CONF is not readable, skipping."
    fi
    done
    fi
    if [ -r /etc/laptop-mode/laptop-mode.conf ] ; then
    . /etc/laptop-mode/laptop-mode.conf
    else
    log "ERR" "$0: Configuration file /etc/laptop-mode/laptop-mode.conf not present or not readable."
    exit 1
    fi
    if [ x$ENABLE_LAPTOP_MODE_TOOLS = x0 ]; then
    log "MSG" "laptop-mode-tools is disabled in config file. Exiting"
    exit 0;
    fi
    # Add a simple bash debug mode switch
    if [ "$DEBUG" -eq 1 ]; then
    set -vx;
    fi
    # Support for old config settings
    if [ "$AC_HD" != "" ] ; then
    AC_HD_WITHOUT_LM="$AC_HD"
    AC_HD_WITH_LM="$AC_HD"
    fi
    if [ "$VERBOSE" != "" ] ; then
    VERBOSE_OUTPUT="$VERBOSE"
    fi
    if [ "$CPU_MAXFREQ" != "" ] ; then
    BATT_CPU_MAXFREQ="$CPU_MAXFREQ"
    fi
    if [ "$MAX_AGE" != "" ] ; then
    LM_BATT_MAX_LOST_WORK_SECONDS="$MAX_AGE"
    LM_AC_MAX_LOST_WORK_SECONDS="$MAX_AGE"
    fi
    if [ "$DEF_AGE" != "" ] ; then
    DEF_MAX_AGE="$DEF_AGE"
    fi
    if [ "$LAPTOP_MODE_ALWAYS_ON" != "" ] ; then
    ENABLE_LAPTOP_MODE_ALWAYS="$LAPTOP_MODE_ALWAYS_ON"
    fi
    if [ "$LM_WHEN_LID_CLOSED" != "" ] ; then
    ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED="$LM_WHEN_LID_CLOSED"
    fi
    if [ "$REMOUNT_PARTITIONS" != "" ] ; then
    PARTITIONS="$REMOUNT_PARTITIONS"
    fi
    if [ "$READAHEAD" != "" ] ; then
    LM_READAHEAD="$READAHEAD"
    fi
    if [ "$DO_REMOUNT_NOATIME" != "" ] ; then
    CONTROL_NOATIME="$DO_REMOUNT_NOATIME"
    fi
    if [ "$DO_HD" != "" ] ; then
    CONTROL_HD_IDLE_TIMEOUT="$DO_HD"
    fi
    if [ "$AC_HD_WITH_LM" != "" ] ; then
    LM_AC_HD_IDLE_TIMEOUT="$AC_HD_WITH_LM"
    fi
    if [ "$AC_HD_WITHOUT_LM" != "" ] ; then
    NOLM_HD_IDLE_TIMEOUT="$AC_HD_WITHOUT_LM"
    fi
    if [ "$BATT_HD" != "" ] ; then
    LM_BATT_HD_IDLE_TIMEOUT="$BATT_HD"
    fi
    if [ "$DO_REMOUNTS" != "" ] ; then
    CONTROL_MOUNT_OPTIONS="$DO_REMOUNTS"
    fi
    if [ "$DO_HD_POWERMGMT" != "" ] ; then
    CONTROL_HD_POWERMGMT="$DO_HD_POWERMGMT"
    fi
    if [ "$AC_HDPARM_POWERMGMT_WITH_LM" != "" ] ; then
    LM_AC_HD_POWERMGMT="$AC_HDPARM_POWERMGMT_WITH_LM"
    fi
    if [ "$AC_HDPARM_POWERMGMT_WITHOUT_LM" != "" ] ; then
    NOLM_AC_HD_POWERMGMT="$AC_HDPARM_POWERMGMT_WITHOUT_LM"
    fi
    if [ "$BATT_HDPARM_POWERMGMT" != "" ] ; then
    BATT_HD_POWERMGMT="$BATT_HDPARM_POWERMGMT"
    fi
    if [ "$DO_WRITECACHE" != "" ] ; then
    CONTROL_HD_WRITECACHE="$DO_WRITECACHE"
    fi
    if [ "$AC_WRITECACHE_WITHOUT_LM" != "" ] ; then
    NOLM_AC_HD_WRITECACHE="$AC_WRITECACHE_WITHOUT_LM"
    fi
    if [ "$BATT_WRITECACHE" != "" ] ; then
    LM_HD_WRITECACHE="$BATT_WRITECACHE"
    fi
    if [ "$DIRTY_RATIO" != "" ]; then
    LM_DIRTY_RATIO="$DIRTY_RATIO"
    fi
    if [ "$DIRTY_BACKGROUND_RATIO" != "" ] ; then
    LM_DIRTY_BACKGROUND_RATIO="$DIRTY_BACKGROUND_RATIO"
    fi
    if [ "$DEF_DIRTY_RATIO" != "" ]; then
    NOLM_DIRTY_RATIO="$DEF_DIRTY_RATIO"
    fi
    if [ "$DEF_DIRTY_BACKGROUND_RATIO" != "" ] ; then
    NOLM_DIRTY_BACKGROUND_RATIO="$DEF_DIRTY_BACKGROUND_RATIO"
    fi
    if [ "$DO_CPU" != "" ] ; then
    CONTROL_CPU_FREQUENCY="$DO_CPU"
    fi
    if [ "$CONTROL_CPU_MAXFREQ" != "" ] ; then
    CONTROL_CPU_FREQUENCY="$CONTROL_CPU_MAXFREQ"
    fi
    if [ "$AC_CPU_MAXFREQ_WITH_LM" != "" ] ; then
    LM_AC_CPU_MAXFREQ="$AC_CPU_MAXFREQ_WITH_LM"
    fi
    if [ "$AC_CPU_MAXFREQ_WITHOUT_LM" != "" ] ; then
    NOLM_AC_CPU_MAXFREQ="$AC_CPU_MAXFREQ_WITHOUT_LM"
    fi
    if [ "$DO_SYSLOG" != "" ] ; then
    CONTROL_SYSLOG_CONF="$DO_SYSLOG"
    fi
    if [ "$SYSLOG_SIGNAL_PROGRAM" != "" ] ;then
    SYSLOG_CONF_SIGNAL_PROGRAM="$SYSLOG_SIGNAL_PROGRAM"
    fi
    if [ "$AC_SYSLOG_WITH_LM" != "" ] ; then
    LM_AC_SYSLOG_CONF="$AC_SYSLOG_WITH_LM"
    fi
    if [ "$AC_SYSLOG_WITHOUT_LM" != "" ] ; then
    NOLM_AC_SYSLOG_CONF="$AC_SYSLOG_WITHOUT_LM"
    fi
    if [ "$BATT_SYSLOG" != "" ] ; then
    BATT_SYSLOG_CONF="$BATT_SYSLOG"
    fi
    if [ "$ENABLE_LAPTOP_MODE_ALWAYS" != "" ] ; then
    ENABLE_LAPTOP_MODE_ON_AC="$ENABLE_LAPTOP_MODE_ALWAYS"
    fi
    if [ "$MINIMUM_BATTERY_MINUTES" != "" -a "$MINIMUM_BATTERY_CHARGE_PERCENT" = "" ] ; then
    # Use a very conservative estimate (1% = 1 battery minute, 100 minutes in a battery)
    # for backward compatibility.
    MINIMUM_BATTERY_CHARGE_PERCENT="$MINIMUM_BATTERY_MINUTES"
    fi
    if [ -z "$MINIMUM_BATTERY_CHARGE_PERCENT" ] ; then
    # Apply the default, now that we've determined that this is the minimum.
    MINIMUM_BATTERY_CHARGE_PERCENT=3
    fi
    if [ "$AUTO_HIBERNATION_BATTERY_MINUTES" != "" -a "$AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT" = "" ] ; then
    # Use a very conservative estimate (1% = 1 battery minute, 100 minutes in a battery)
    # for backward compatibility.
    AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT="$AUTO_HIBERNATION_BATTERY_MINUTES"
    fi
    if [ -z "$AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT" ] ; then
    # Apply the default, now that we've determined that this is the minimum.
    AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT=2
    fi
    # Postprocessing
    if [ "$VERBOSE_OUTPUT" -ne 0 ] ; then
    OUTPUT="/dev/stdout"
    LM_VERBOSE="[ 1 = 1 ]"
    else
    OUTPUT="/dev/null"
    LM_VERBOSE="[ 1 = 0 ]"
    fi
    if [ "$PARTITIONS" = "" ] ; then
    PARTITIONS="auto /dev/mapper/*"
    fi
    # Expand shell wild cards immediately.
    PARTITIONS=$( echo $PARTITIONS )
    TERMINALS=$( echo $TERMINALS )
    # Convert seconds to hdparm -S format
    # Everything over 20 minutes is interpreted as 2 hours.
    seconds_to_hdparm_S() {
    if [ "$1" -eq 0 ] ; then
    # disable.
    echo 0
    elif [ "$1" -gt 0 -a "$1" -lt 5 ] ; then
    # 5 seconds minimum
    echo 1
    elif [ "$1" -le $((240*5)) ] ; then
    # Values between 1 and 240 signify increments of 5 seconds
    echo $(($1 / 5))
    elif [ "$1" -lt $((30*60)) ] ; then
    # Values between 20 and 30 minutes are rounded up to 30 minutes.
    echo 241
    elif [ "$1" -lt $((12*30*60)) ] ; then
    # Values between 30 minutes and 6 hours (exclusive) yield values between
    # 241 and 251, in 30-minute increments.
    echo $(( 240 + ($1 / (30*60)) ))
    else
    # Larger values effectively indicate no timeout at all.
    echo 0
    fi
    # Convert configured idle timeouts to hdparm -S format.
    if [ "$LM_AC_HD_IDLE_TIMEOUT_SECONDS" != "" ] ; then
    LM_AC_HD_IDLE_TIMEOUT=$(seconds_to_hdparm_S $LM_AC_HD_IDLE_TIMEOUT_SECONDS)
    fi
    if [ "$LM_BATT_HD_IDLE_TIMEOUT_SECONDS" != "" ] ; then
    LM_BATT_HD_IDLE_TIMEOUT=$(seconds_to_hdparm_S $LM_BATT_HD_IDLE_TIMEOUT_SECONDS)
    fi
    if [ "$NOLM_HD_IDLE_TIMEOUT_SECONDS" != "" ] ; then
    NOLM_HD_IDLE_TIMEOUT=$(seconds_to_hdparm_S $NOLM_HD_IDLE_TIMEOUT_SECONDS)
    fi
    # The main workhorse.
    lmt_main_function ()
    if [ "$1" = "status" ] ; then
    # Display a status report.
    log "STATUS" "Mounts:"
    mount | sed "s/^/ /"
    log "STATUS" " "
    log "STATUS" "Drive power status:"
    for disk in $HD; do
    if [ -r $disk ]; then
    hdparm -C $disk 2>/dev/null | sed "s/^/ /"
    else
    log "STATUS" " Cannot read $disk, permission denied - $0 needs to be run as root"
    fi
    done
    log "STATUS" " "
    log "STATUS" "(NOTE: drive settings affected by Laptop Mode cannot be retrieved.)"
    log "STATUS" " "
    log "STATUS" "Readahead states:"
    cat /etc/mtab | while read DEV MP FST OPTS DUMP PASS ; do
    # skip funny stuff
    case "$FST" in
    rootfs|unionfs|tmpfs|squashfs|sysfs|usbfs|proc|devpts) continue
    esac
    if [ -b $DEV ] ; then
    if [ -r $DEV ] ; then
    log "STATUS" " $DEV: $((`blockdev --getra $DEV` / 2)) kB"
    else
    log "STATUS" " Cannot read $DEV, permission denied - $0 needs to be run as root"
    fi
    fi
    done
    log "STATUS" " "
    if [ -e /var/run/laptop-mode-tools/enabled ] ; then
    log "STATUS" "Laptop Mode Tools is allowed to run: /var/run/laptop-mode-tools/enabled exists."
    else
    log "STATUS" "Laptop Mode Tools is NOT allowed to run: /var/run/laptop-mode-tools/enabled does not exist."
    fi
    log "STATUS" " "
    STATFILES="/proc/sys/vm/laptop_mode /proc/apm /proc/pmu/info /proc/sys/vm/bdflush /proc/sys/vm/dirty_ratio /proc/sys/fs/xfs/age_buffer /proc/sys/fs/xfs/sync_interval /proc/sys/fs/xfs/lm_age_buffer /proc/sys/fs/xfs/lm_sync_interval /proc/sys/vm/pagebuf/lm_flush_age /proc/sys/fs/xfs/xfsbufd_centisecs /proc/sys/fs/xfs/xfssyncd_centisecs /proc/sys/vm/dirty_background_ratio /proc/sys/vm/dirty_expire_centisecs /proc/sys/fs/xfs/age_buffer/centisecs /proc/sys/vm/dirty_writeback_centisecs /sys/devices/system/cpu/*/cpufreq/cpuinfo_*_freq /sys/devices/system/cpu/*/cpufreq/scaling_governor /proc/acpi/button/lid/*/state /proc/acpi/ac_adapter/*/state /proc/acpi/battery/*/state /sys/class/power_supply/*/online /sys/class/power_supply/*/state"
    for THISFILE in $STATFILES ; do
    if [ -e "$THISFILE" ] ; then
    log "STATUS" "$THISFILE:"
    if [ -r "$THISFILE" ] ; then
    cat "$THISFILE" | sed "s/^/ /"
    else
    log "STATUS" " Not accessible, permission denied - $0 needs to be run as root."
    fi
    log "STATUS" " "
    fi
    done
    elif [ "$1" != "readconfig" -a "$1" != "defaults" ] ; then
    KLEVEL="$(uname -r |
    IFS='.-' read a b c
    echo $a.$b
    KMINOR="$(uname -r |
    IFS='.-' read a b c d
    # Strip any stuff from the end -- only the initial digits are part of the KMINOR.
    echo $c | sed -e 's/\([[:digit:]]*\).*/\1/'
    # Stop exporting everything -- what we do from here is private.
    set +a
    if [ "$1" = "--version" ] ; then
    log "MSG" "Laptop Mode Tools $LMTVERSION"
    exit 0
    fi
    if [ ! -e /proc/sys/vm/laptop_mode ] ; then
    log "ERR" "Kernel does not have support for laptop mode. Please apply the laptop mode"
    log "ERR" "patch or install a newer kernel."
    exit 1
    fi
    if [ ! -w /proc/sys/vm/laptop_mode ] ; then
    log "ERR" "You do not have enough privileges to enable laptop_mode."
    exit 1
    fi
    INIT=0 # Display info in init script format?
    FORCE=0 # Force reapplying the current state?
    while [ "$1" != "" ] ; do
    case "$1" in
    init) INIT=1 ;;
    force) FORCE=1 ;;
    # Old options. We always do "auto" for any option now, but
    # we still have to accept the options.
    start) ;;
    stop) ;;
    auto) ;;
    modules=*)
    MODULES=$1
    MODULES=${MODULES#"modules="}
    devices=*)
    DEVICES=$1
    DEVICES=${DEVICES#"devices="}
    *) log "ERR" "Unrecognized option $1."
    exit 1 ;;
    esac
    shift
    done
    mkdir -p /var/run/laptop-mode-tools
    # Used to display laptop mode state later on. This is the enabled/disabled
    # state for laptop mode processing, it tells us nothing about whether laptop
    # mode is actually _active_.
    STATE=enabled
    if [ "$ENABLE_LAPTOP_MODE_ON_BATTERY" -eq 0 -a "$ENABLE_LAPTOP_MODE_ON_AC" -eq 0 -a "$ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED" -eq 0 ] ; then
    STATE=disabled
    fi
    # Determine the power state.
    # First try /sys/class/power_supply/*
    FOUND_SYS_CLASS_POWER_SUPPLY_AC=0
    ON_AC=0
    for POWER_SUPPLY in /sys/class/power_supply/* ; do
    if [ -f $POWER_SUPPLY/type ] ; then
    if [ "$(cat $POWER_SUPPLY/type)" = "Mains" ] ;then
    log "VERBOSE" "Determining power state from $POWER_SUPPLY/online."
    FOUND_SYS_CLASS_POWER_SUPPLY_AC=1
    if [ "$(cat $POWER_SUPPLY/online)" = 1 ] ; then
    ON_AC=1
    fi
    fi
    fi
    done
    if [ $FOUND_SYS_CLASS_POWER_SUPPLY_AC = 1 ] ; then
    # Already found it!
    log "VERBOSE" "Not trying other options, already found a power supply."
    elif [ -d /proc/acpi/ac_adapter ] ; then
    log "VERBOSE" "Determining power state from /proc/acpi/ac_adapter."
    ADAPTERS_FOUND=0
    ON_AC=0
    for ADAPTER in /proc/acpi/ac_adapter/* ; do
    if [ -f $ADAPTER/state ] ; then
    ADAPTERS_FOUND=1
    STATUS=`awk '/^state: / { print $2 }' $ADAPTER/state`
    if [ "$STATUS" = "on-line" ] ; then
    ON_AC=1
    fi
    fi
    done
    if [ "$ADAPTERS_FOUND" -eq 0 ] ; then
    ON_AC=1
    fi
    elif [ -f /proc/pmu/info ] ; then
    log "VERBOSE" "Determining power state from /proc/pmu/info."
    if ( grep -q "^AC Power.*0$" /proc/pmu/info ) ; then
    log "VERBOSE" "/proc/pmu/info indicates absence of AC power."
    ON_AC=0
    else
    # It is possible that there is no AC Power = 1 in the file,
    # but we always assume AC power when we're not sure.
    ON_AC=1
    log "VERBOSE" "/proc/pmu/info indicates presence of AC power."
    fi
    elif [ -f /proc/apm ] ; then
    log "VERBOSE" "Determining power state from /proc/apm."
    read D1 D2 D3 APM_AC_STATE D0 </proc/apm
    if [ "$APM_AC_STATE" = "0x00" ] ; then
    ON_AC=0
    else
    ON_AC=1
    fi
    else
    log "VERBOSE" "No /sys/class/power_supply, ACPI, APM or PMU power management information found -- assuming AC power is present."
    ON_AC=1
    fi
    # Determine whether to activate or deactivate laptop mode.
    ACTIVATE=0
    if [ "$ON_AC" -eq 1 ] ; then
    if [ "$ENABLE_LAPTOP_MODE_ON_AC" -ne 0 ] ; then
    log "VERBOSE" "On AC power: Activating, because ENABLE_LAPTOP_MODE_ON_AC is set."
    ACTIVATE=1
    else
    log "VERBOSE" "On AC power: Deactivating, because ENABLE_LAPTOP_MODE_ON_AC is not set."
    ACTIVATE=0
    fi
    else
    if [ "$ENABLE_LAPTOP_MODE_ON_BATTERY" -ne 0 ] ; then
    log "VERBOSE" "On battery power: Activating, because ENABLE_LAPTOP_MODE_ON_BATTERY is set."
    ACTIVATE=1
    else
    log "VERBOSE" "On battery power: Deactivating, because ENABLE_LAPTOP_MODE_ON_BATTERY is not set."
    ACTIVATE=0
    fi
    fi
    if [ "$ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED" -ne 0 -a "$ACTIVATE" -eq 0 ] ; then
    if [ -x "`which hal-find-by-property`" ] ; then
    HAL_LID_BUTTON=$(hal-find-by-property --key "button.type" --string "lid")
    fi
    if [ "$HAL_LID_BUTTON" != "" ] ; then
    HAL_LID_BUTTON_STATE=$(hal-get-property --udi $(hal-find-by-property --key "button.type" --string "lid") --key "button.state.value")
    if [ "$HAL_LID_BUTTON_STATE" = "true" ] ; then
    log "VERBOSE" "Setting action to \"start\" because the lid is closed (says HAL)."
    ACTIVATE=1
    fi
    elif [ -f /proc/acpi/button/lid/*/state ] ; then
    if ( grep -q "closed" /proc/acpi/button/lid/*/state ) ; then
    log "VERBOSE" 'Setting action to "start" because the lid is closed (says /proc/acpi/button/lid/*/state).'
    ACTIVATE=1
    fi
    else
    log "MSG" "Warning: ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED is set, but there is no file"
    log "MSG" "/proc/acpi/button/lid/.../state, and hal information is not available either!"
    fi
    fi
    # If the init script has not been run or has been run with the "stop"
    # argument, then we should never start laptop mode.
    if [ ! -f /var/run/laptop-mode-tools/enabled ] ; then
    log "VERBOSE" "Laptop mode disabled because /var/run/laptop-mode-tools/enabled is missing."
    STATE=disabled
    fi
    if [ "$ACTIVATE" -eq 1 -a -f /etc/default/laptop-mode ] ; then
    . /etc/default/laptop-mode
    if ! ( echo "$ENABLE_LAPTOP_MODE" |grep y ) ; then
    log "VERBOSE" "Not starting laptop mode because it is disabled in /etc/default/laptop-mode."
    STATE=disabled
    fi
    fi
    if [ "$STATE" = "disabled" ] ; then
    ACTIVATE=0
    fi
    # Check whether we are allowed to activate the data-loss-sensitive stuff.
    # If the battery charge is too low, we want to disable this, but not the
    # other power-saving stuff.
    if [ "$ACTIVATE" -eq 0 ] ; then
    ACTIVATE_WITH_POSSIBLE_DATA_LOSS=0
    elif [ "$ON_AC" = 1 ] ; then
    log "VERBOSE" "On AC, not checking minimum battery charge."
    ACTIVATE_WITH_POSSIBLE_DATA_LOSS=1
    else
    ACTIVATE_WITH_POSSIBLE_DATA_LOSS=1
    ENOUGH_CHARGE=0
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=0
    # Weird way of checking that /sys/class/power_supply is not empty -- but it works.
    if [ "$(echo /sys/class/power_supply/*)" != '/sys/class/power_supply/*' ] ; then
    log "VERBOSE" "Not on AC and we have battery information in /sys/class/power_supply/BAT* -- checking minimum battery charge."
    for BATT in /sys/class/power_supply/* ; do
    BATT_TYPE=$(cat $BATT/type)
    log "VERBOSE" "$BATT is of type $BATT_TYPE."
    if [ "$BATT_TYPE" != "Battery" ] ; then
    log "VERBOSE" "Not of type \"Battery\", skipping."
    else
    PREV_ENOUGH_CHARGE=$ENOUGH_CHARGE
    PREV_ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=$ENOUGH_CHARGE_TO_PREVENT_HIBERNATION
    log "VERBOSE" "Checking levels for $BATT."
    PRESENT=$(cat $BATT/present)
    log "VERBOSE" "Present: $PRESENT."
    # Only do if the battery is present
    if [ "$PRESENT" -eq 1 ] ; then
    FOUND_AN_ENABLED_CHECK=0
    FOUND_AN_ENABLED_HIBERNATION_CHECK=0
    # Get the remaining capacity.
    IN_UAH=0
    IN_UWH=0
    if [ -f $BATT/charge_now ] ; then
    REMAINING=$(cat $BATT/charge_now)
    IN_UAH=1 # charge_* is in microAmpere-hours
    elif [ -f $BATT/energy_now ] ; then
    REMAINING=$(cat $BATT/energy_now)
    IN_UWH=1 # energy_* is in microWatt-hours
    else
    REMAINING=0
    fi
    if [ -z "$REMAINING" -o "$REMAINING" -eq 0 ] ; then
    log "VERBOSE" "Battery does not report remaining charge. Perhaps it is not present?"
    REMAINING=0
    fi
    log "VERBOSE" "Remaining charge: $REMAINING"
    if [ -f $BATT/charge_full_design ] ; then
    CAPACITY=$(cat $BATT/charge_full_design)
    elif [ -f $BATT/energy_full_design ] ; then
    CAPACITY=$(cat $BATT/energy_full_design)
    else
    CAPACITY=0
    fi
    if [ -z "$CAPACITY" -o "$CAPACITY" -eq 0 ] ; then
    log "VERBOSE" "Battery does not report design full charge, using non-design full charge."
    if [ -f $BATT/charge_full ] ; then
    CAPACITY=$(cat $BATT/charge_full)
    elif [ -f $BATT/energy_full_design ] ; then
    CAPACITY=$(cat $BATT/energy_full)
    else
    CAPACITY=0
    fi
    if [ -z "$CAPACITY" -o "$CAPACITY" -eq 0 ] ; then
    log "VERBOSE" "Battery does not report non-design full charge."
    CAPACITY=0
    fi
    fi
    log "VERBOSE" "Full capacity: $CAPACITY"
    # Check the charge percentage
    if [ "$MINIMUM_BATTERY_CHARGE_PERCENT" -ne 0 ] ; then
    FOUND_AN_ENABLED_CHECK=1
    if [ "$CAPACITY" -eq 0 ] ; then
    log "MSG" "WARNING: Battery does not report a capacity. Minimum battery"
    log "MSG" "charge checking does not work without a design capacity."
    ENOUGH_CHARGE=1
    elif [ "$(($REMAINING * 100 / $CAPACITY))" -ge "$MINIMUM_BATTERY_CHARGE_PERCENT" ] ; then
    ENOUGH_CHARGE=1
    fi
    fi
    if [ "$AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT" -ne 0 ] ; then
    FOUND_AN_ENABLED_HIBERNATION_CHECK=1
    if [ "$CAPACITY" -eq 0 ] ; then
    log "MSG" "WARNING: Battery does not report a design capacity. Auto hibernation"
    log "MSG" "does not work without a design capacity."
    ENOUGH_CHARGE=1
    elif [ "$(($REMAINING * 100 / $CAPACITY))" -ge "$AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT" ] ; then
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=1
    fi
    fi
    # $BATT/alarm is the design_capacity_warning of a battery.
    ALARM_LEVEL=$(cat $BATT/alarm)
    if [ "$ALARM_LEVEL" -ne 0 ] ; then
    if [ "$REMAINING" -le "$ALARM_LEVEL" ] ; then
    # Restore the state we had before checking this battery, so that
    # this battery does not count as having enough charge.
    ENOUGH_CHARGE=$PREV_ENOUGH_CHARGE
    elif [ "$FOUND_AN_ENABLED_CHECK" -eq 0 ] ; then
    # This is the only check that is enabled. In that case a non-critical
    # battery level counts as "enough". (If we would count non-critical
    # battery levels as enough *always*, then the other settings would
    # have no effect; this is only a final fallback.)
    ENOUGH_CHARGE=1
    fi
    fi
    if [ "$AUTO_HIBERNATION_ON_CRITICAL_BATTERY_LEVEL" -ne 0 ] ; then
    if [ "$REMAINING" -le "$ALARM_LEVEL" ] ; then
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=$PREV_ENOUGH_CHARGE_TO_PREVENT_HIBERNATION
    elif [ "$FOUND_AN_ENABLED_HIBERNATION_CHECK" -eq 0 ] ; then
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=1
    fi
    fi
    # Fallback: hard values
    if [ "$IN_UAH" -ne 0 ] ; then
    if [ "$MINIMUM_BATTERY_CHARGE_MAH" -ne 0 ] ; then
    FOUND_AN_ENABLED_CHECK=1
    if [ "$REMAINING" -ge $((1000*"$MINIMUM_BATTERY_CHARGE_MAH")) ] ; then
    ENOUGH_CHARGE=1
    fi
    fi
    if [ "$AUTO_HIBERNATION_BATTERY_CHARGE_MAH" -ne 0 ] ; then
    FOUND_AN_ENABLED_HIBERNATION_CHECK=1
    if [ "$REMAINING" -ge $((1000*"$AUTO_HIBERNATION_BATTERY_CHARGE_MAH")) ] ; then
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=1
    fi
    fi
    elif [ "$IN_UWH" -ne 0 ] ; then
    if [ "$MINIMUM_BATTERY_CHARGE_MWH" -ne 0 ] ; then
    FOUND_AN_ENABLED_CHECK=1
    if [ "$REMAINING" -ge $((1000*"$MINIMUM_BATTERY_CHARGE_MWH")) ] ; then
    ENOUGH_CHARGE=1
    fi
    fi
    if [ "$AUTO_HIBERNATION_BATTERY_CHARGE_MWH" -ne 0 ] ; then
    FOUND_AN_ENABLED_HIBERNATION_CHECK=1
    if [ "$REMAINING" -ge $((1000*"$AUTO_HIBERNATION_BATTERY_CHARGE_MWH")) ] ; then
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=1
    fi
    fi
    else
    log "ERR" "Failed to determine battery charge. Battery charge units are not in"
    log "ERR" "mWh, uWh, mAh or uAh."
    fi
    else
    log "VERBOSE" "Battery is not present."
    fi
    fi
    done
    elif [ "$(echo /proc/acpi/battery/*)" != '/proc/acpi/battery/*' ] ; then
    log "VERBOSE" "Not on AC and we have batteries in /proc/acpi/battery -- checking minimum battery charge."
    for BATT in /proc/acpi/battery/* ; do
    PREV_ENOUGH_CHARGE=$ENOUGH_CHARGE
    PREV_ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=$ENOUGH_CHARGE_TO_PREVENT_HIBERNATION
    BATT_STATE=$BATT/state
    BATT_INFO=$BATT/info
    log "VERBOSE" "Checking info and state for $BATT."
    # Only do if the battery is present
    if ( grep -q 'present:.*yes' $BATT_INFO ) ; then
    FOUND_AN_ENABLED_CHECK=0
    FOUND_AN_ENABLED_HIBERNATION_CHECK=0
    # Get the remaining capacity.
    REMAINING=`grep "remaining capacity:" $BATT_STATE | sed "s/.* \([0-9][0-9]* \).*/\1/" `
    if [ -z "$REMAINING" ] ; then
    log "VERBOSE" "Battery does not report remaining charte. Perhaps it is not present?"
    REMAINING=0
    fi
    log "VERBOSE" "Remaining charge: $REMAINING"
    CAPACITY=`grep "design capacity:" $BATT_INFO | sed "s/.* \([0-9][0-9]* \).*/\1/" `
    if [ -z "$CAPACITY" ] ; then
    log "VERBOSE" "Battery does not report capacity. Perhaps it is not present?"
    CAPACITY=0
    fi
    log "VERBOSE" "Design capacity: $CAPACITY"
    # Check the charge percentage
    if [ "$MINIMUM_BATTERY_CHARGE_PERCENT" -ne 0 ] ; then
    FOUND_AN_ENABLED_CHECK=1
    if [ "$CAPACITY" -eq 0 ] ; then
    log "MSG" "WARNING: Battery does not report a design capacity. Minimum battery"
    log "MSG" "charge checking does not work without a design capacity."
    ENOUGH_CHARGE=1
    elif [ "$(($REMAINING * 100 / $CAPACITY))" -ge "$MINIMUM_BATTERY_CHARGE_PERCENT" ] ; then
    ENOUGH_CHARGE=1
    fi
    fi
    if [ "$AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT" -ne 0 ] ; then
    FOUND_AN_ENABLED_HIBERNATION_CHECK=1
    if [ "$CAPACITY" -eq 0 ] ; then
    log "MSG" "WARNING: Battery does not report a design capacity. Auto hibernation"
    log "MSG" "does not work without a design capacity."
    ENOUGH_CHARGE=1
    elif [ "$(($REMAINING * 100 / $CAPACITY))" -ge "$AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT" ] ; then
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=1
    fi
    fi
    # Fallback: hard values.
    # Determine the reporting unit.
    IN_MAH=0
    IN_MWH=0
    if ( grep -q mWh $BATT_INFO ) ; then
    IN_MWH=1
    elif ( grep -q mAh $BATT_INFO ) ; then
    IN_MAH=1
    fi
    if [ "$IN_MAH" -ne 0 ] ; then
    if [ "$MINIMUM_BATTERY_CHARGE_MAH" -ne 0 ] ; then
    FOUND_AN_ENABLED_CHECK=1
    if [ "$REMAINING" -ge "$MINIMUM_BATTERY_CHARGE_MAH" ] ; then
    ENOUGH_CHARGE=1
    fi
    fi
    if [ "$AUTO_HIBERNATION_BATTERY_CHARGE_MAH" -ne 0 ] ; then
    FOUND_AN_ENABLED_HIBERNATION_CHECK=1
    if [ "$REMAINING" -ge "$AUTO_HIBERNATION_BATTERY_CHARGE_MAH" ] ; then
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=1
    fi
    fi
    elif [ "$IN_MWH" -ne 0 ] ; then
    if [ "$MINIMUM_BATTERY_CHARGE_MWH" -ne 0 ] ; then
    FOUND_AN_ENABLED_CHECK=1
    if [ "$REMAINING" -ge "$MINIMUM_BATTERY_CHARGE_MWH" ] ; then
    ENOUGH_CHARGE=1
    fi
    fi
    if [ "$AUTO_HIBERNATION_BATTERY_CHARGE_MWH" -ne 0 ] ; then
    FOUND_AN_ENABLED_HIBERNATION_CHECK=1
    if [ "$REMAINING" -ge "$AUTO_HIBERNATION_BATTERY_CHARGE_MWH" ] ; then
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=1
    fi
    fi
    else
    log "ERR" "Failed to determine battery charge. Battery charge units are not in"
    log "ERR" "mWh or mAh."
    fi
    CAP_STATE=`sed -r 's/^capacity state:\s*(.*)\s*$/\1/;t;d' "$BATT_STATE"`
    if [ "$DISABLE_LAPTOP_MODE_ON_CRITICAL_BATTERY_LEVEL" -ne 0 ] ; then
    if [ "$CAP_STATE" = "critical" ] ; then
    # Restore the state we had before checking this battery, so that
    # this battery does not count as having enough charge.
    ENOUGH_CHARGE=$PREV_ENOUGH_CHARGE
    elif [ "$FOUND_AN_ENABLED_CHECK" -eq 0 ] ; then
    # This is the only check that is enabled. In that case a non-critical
    # battery level counts as "enough". (If we would count non-critical
    # battery levels as enough *always*, then the other settings would
    # have no effect; this is only a final fallback.)
    ENOUGH_CHARGE=1
    fi
    fi
    if [ "$AUTO_HIBERNATION_ON_CRITICAL_BATTERY_LEVEL" -ne 0 ] ; then
    if [ "$CAP_STATE" = "critical" ] ; then
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=$PREV_ENOUGH_CHARGE_TO_PREVENT_HIBERNATION
    elif [ "$FOUND_AN_ENABLED_HIBERNATION_CHECK" -eq 0 ] ; then
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=1
    fi
    fi
    else
    log "VERBOSE" "Battery is not present."
    fi
    done
    else
    ENOUGH_CHARGE=1
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=1
    log "VERBOSE" "Not on AC and could not check battery state -- data loss sensitive features stay enabled and auto-hibernation will not work."
    fi
    if [ "$ENABLE_AUTO_HIBERNATION" -ne 0 -a "$ENOUGH_CHARGE_TO_PREVENT_HIBERNATION" -eq 0 ] ; then
    log "VERBOSE" "None of the batteries have a charge above the auto-hibernation level."
    log "VERBOSE" "Starting hibernation."
    if [ -x $HIBERNATE_COMMAND ]; then
    $HIBERNATE_COMMAND
    elif [ -f /sys/power/state ]; then
    grep -q disk /sys/power/state && echo disk > /sys/power/state
    fi
    # Don't continue -- if things are configured correctly, then we
    # will be called on resume.
    exit 0
    fi
    if [ "$ENOUGH_CHARGE" -eq 0 ] ; then
    log "VERBOSE" "None of the batteries have a charge above the minimum level."
    log "VERBOSE" "Deactivating data loss sensitive features."
    ACTIVATE_WITH_POSSIBLE_DATA_LOSS=0
    fi
    fi
    if [ "$INIT" -eq 0 ] ; then
    log "MSG" "Laptop mode "
    fi
    # WAS_ACTIVE is used later on. If there is no /var/run/laptop-mode-tools/state, then
    # we know that laptop mode wasn't active before.
    WAS_ACTIVE=0
    log "VERBOSE" "Checking if desired state is different from current state."
    if [ -f /var/run/laptop-mode-tools/state ] ; then
    read WAS_ACTIVE WAS_ON_AC WAS_ACTIVATE_WITH_POSSIBLE_DATA_LOSS WAS_STATE < /var/run/laptop-mode-tools/state
    if [ "$WAS_STATE" != "" ] ; then
    if [ "$WAS_ACTIVE" -eq "$ACTIVATE" -a "$WAS_ON_AC" -eq "$ON_AC" -a "$WAS_ACTIVATE_WITH_POSSIBLE_DATA_LOSS" -eq "$ACTIVATE_WITH_POSSIBLE_DATA_LOSS" -a "$WAS_STATE" = "$STATE" -a "$FORCE" -eq 0 ] ; then
    log "MSG" "$STATE, "
    if [ "$WAS_ACTIVE" -eq 1 ] ; then
    log "MSG" "active [unchanged]"
    if [ "$ACTIVATE_WITH_POSSIBLE_DATA_LOSS" -eq 0 ] ; then
    log "MSG" " (Data-loss sensitive features disabled.)"
    fi
    else
    log "MSG" "not active [unchanged]"
    fi
    exit 0
    fi
    fi
    else
    log "VERBOSE" "/var/run/laptop-mode-tools/state does not exist, no previous state."
    fi
    echo "$ACTIVATE $ON_AC $ACTIVATE_WITH_POSSIBLE_DATA_LOSS $STATE" > /var/run/laptop-mode-tools/state
    if [ "$ACTIVATE" -eq 1 ] ; then
    log "MSG" "$STATE, active"
    if [ "$ACTIVATE_WITH_POSSIBLE_DATA_LOSS" -eq 0 ] ; then
    log "MSG" " (Data-loss sensitive features disabled.)"
    fi
    else
    log "MSG" "$STATE, not active"
    fi
    # Finally, call laptop-mode-tools modules. The modules can use the settings
    # from the config files, but they may NOT assume the settings actually exist,
    # as no defaults have been given for them.
    # Note that the /usr/local/lib path is deprecated.
    export FORCE STATE ON_AC ACTIVATE ACTIVATE_WITH_POSSIBLE_DATA_LOSS KLEVEL KMINOR WAS_ACTIVE LM_VERBOSE DEVICES
    for SCRIPT in /usr/share/laptop-mode-tools/modules/* /usr/local/lib/laptop-mode-tools/modules/* /usr/local/share/laptop-mode-tools/modules/* /etc/laptop-mode/modules/* ; do
    if [ -z "$MODULES" ] ; then
    # If a module list has not been provided, execute all modules
    EXECUTE_SCRIPT=1
    else
    # If a module list has been provided, execute only the listed
    # modules.
    EXECUTE_SCRIPT=0
    for MODULE in $MODULES; do
    # Attempt to remove the module name from the end of the
    # full script path. If the module name matches the
    # script, the name will be removed from the end of the
    # full file path, leaving the path to the script. If
    # there was not a match made, the module name would not
    # be removed from the path, and $PATH_TO_SCRIPT would
    # be the same as $SCRIPT.
    PATH_TO_SCRIPT=${SCRIPT%%$MODULE}
    # Execute the script if a match was found (module name
    # was removed from the script path, making it shorter.
    if [ $PATH_TO_SCRIPT != $SCRIPT ] ; then
    EXECUTE_SCRIPT=1
    fi
    done
    fi
    if [ -x "$SCRIPT" -a $EXECUTE_SCRIPT -eq 1 ] ; then
    log "VERBOSE" "Invoking module $SCRIPT."
    SCRIPT_DEBUG=$SCRIPT; # We do this because in start-stop-programs module a $SCRIPT variable is used. That
    # changes the whole meaning when passed to disableDebug ()
    enableDebug $SCRIPT_DEBUG;
    . $SCRIPT
    disableDebug $SCRIPT_DEBUG;
    else
    log "VERBOSE" "Module $SCRIPT is not executable or is to be skipped."
    fi
    done
    exit 0
    # This fi closes the if for "readconfig". If I would have indented this one
    # I would have indented the whole file. :)
    fi
    lmt_load_config
    lock_retry ()
    ( $FLOCK -n -x -w 1 8 || exit 0;
    i=10;
    while [ $i -ge 1 ]
    do
    log "ERR" "Couldn't acquire lock. Retrying.... PID is $$\n"
    $FLOCK -x -w 1 9 && lmt_main_function "$@" && break;
    i=$(( $i - 1 ))
    done
    ) 8>$LMT_REQ_LOCK
    # Check and acquire locks and then exec.
    ( $FLOCK -n -x -w 1 8; ) 8>$LMT_REQ_LOCK
    ($FLOCK -n -x -w 1 9 && lmt_main_function "$@";) || lock_retry "$@"
    ) 9<>$LMT_INVOC_LOCK
    # We do a special run of battery polling daemon here so that it does not get
    # plagued by the lock. We need the polling daemon to be independent of any locks
    if [ x$ENABLE_BATTERY_LEVEL_POLLING = x1 ] && [ x$BLACKLIST_IN_FLOCK = x1 ]; then
    log "VERBOSE" "Battery level polling is enabled."
    if [ x$ON_AC = x1 ] ; then
    log "VERBOSE" "On AC, stopping the polling daemon."
    # In AC mode we disable the polling daemon.
    killall -q lm-polling-daemon
    else
    if ! pidof -x lm-polling-daemon ; then
    log "VERBOSE" "On battery and there was no polling daemon yet, starting the polling daemon."
    # If there is no polling daemon, we start one.
    /usr/share/laptop-mode-tools/module-helpers/lm-polling-daemon < /dev/null > /dev/null 2> /dev/null &
    fi
    fi
    else
    log "VERBOSE" "Battery level polling is disabled."
    fi
    exit 0;
    and here is the lines which archwiki mentions
    case "$KLEVEL" in
    "2.4" ) ;;
    "2.6" ) ;;
    log "ERR" "Unhandled kernel version: $KLEVEL ('uname -r' = '$(uname -r)')" >&2
    exit 1
    esac

    I had the problem but edited the line in /usr/sbin/laptop_mode and it worked. But thoes lines are not there anymore. I guess they changed it at the recent update of laptop-mode-tools.
    Regarding your heat problem; is there any other thing you use to cut down power usage (from AUR  maybe)? I use acpi_call from AUR had to edit lines there aswell, but it should be updated by now.

  • VMWare Tools Fails to Install - Guest OS Windows 8.1 - vSphere 6.0

    Hi,
    I am having issues installing VMWare tools on a Windows 8.1 guest. I recently upgraded from ESXi 5.5 to 6 and used the automated upgrade. I logged on to one of my Windows 8.1 VMs and noticed that a glibc error was popping up related to VM Tools so I uninstalled and attempted a reinstall. VMWare tools now does not install.. I believe this is the relevant section of the logs before it rolls back:
    2015-03-25 16:58:57| tools-build-2476743| --- VMInstallVideoDriver() : Installing video driver
    2015-03-25 16:58:57| tools-build-2476743| Getting Property CustomActionData = C:\Program Files\Common Files\VMware\Drivers\video_wddm\vm3d.inf;5
    2015-03-25 16:58:57| inst-build-2476743| I1: DInfo_GetDriverInfoFromInf: Got provider for inf: VMware, Inc.
    2015-03-25 16:58:57| inst-build-2476743| I1: DInfo_GetDriverInfoFromInf: verified inf C:\Program Files\Common Files\VMware\Drivers\video_wddm\vm3d.inf signed by Microsoft
    2015-03-25 16:58:57| inst-build-2476743| I1: DInfo_GetDriverInfoFromInf: Got provider for inf: VMware, Inc.
    2015-03-25 16:58:57| inst-build-2476743| I1: DInfo_GetDriverInfoFromInf: Path is not absolute for oem7.inf, skipping signature check
    2015-03-25 16:58:57| tools-build-2476743| VerifyDriverStillPresent: Checking driver store inf C:\Windows\System32\DriverStore\FileRepository\vm3d.inf_amd64_1cd9fc438ae97176\vm3d.inf
    2015-03-25 16:58:57| inst-build-2476743| I1: DInfo_GetDriverInfoFromInf: Got provider for inf: VMware, Inc.
    2015-03-25 16:58:57| inst-build-2476743| I1: DInfo_GetDriverInfoFromInf: verified inf C:\Windows\System32\DriverStore\FileRepository\vm3d.inf_amd64_1cd9fc438ae97176\vm3d.inf signed by Microsoft
    2015-03-25 16:58:57| tools-build-2476743| VerifyDriverStillPresent: found match in both locations
    2015-03-25 16:58:57| tools-build-2476743| Cannot query key value HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.\Wnd: 2
    2015-03-25 16:58:57| inst-build-2476743| I1: GetDriverForDeviceCallback: device PCI\VEN_15AD&DEV_0405&SUBSYS_040515AD&REV_00\3&18D45AA6&0&78 has inf oem7.inf
    2015-03-25 16:58:57| inst-build-2476743| I1: GetDriverForDeviceCallback: Processing driver list entity #1
    2015-03-25 16:58:57| inst-build-2476743| I1: GetDriverForDeviceCallback: Collecting information about driving using inf oem7.inf
    2015-03-25 16:58:57| inst-build-2476743| I1: GetDriverForDeviceCallback: Recording provider VMware, Inc. date 00000000e9ffbb8c and ver 8.14.1.6
    2015-03-25 16:58:57| inst-build-2476743| I1: GetDriverForDeviceCallback: original inf is "vm3d.inf" with cat "vm3d.cat"
    2015-03-25 16:58:57| inst-build-2476743| I1: GetDriverForDeviceCallback: driver oem7.inf install rank 0x00f60000 params 0x00042044
    2015-03-25 16:58:57| inst-build-2476743| I1: GetDriverForDeviceCallback: -- OS says driver is signed
    2015-03-25 16:58:57| inst-build-2476743| I1: GetDriverForDeviceCallback: -- OS says driver is WHQL signed
    2015-03-25 16:58:57| inst-build-2476743| I1: GetDriverForDeviceCallback: -- driver is installed
    2015-03-25 16:58:57| tools-build-2476743| AllDevicesUsingSameDriver: Device PCI\VEN_15AD&DEV_0405&SUBSYS_040515AD&REV_00\3&18D45AA6&0&78 is using the correct inf oem7.inf
    2015-03-25 16:58:57| tools-build-2476743| AllDevicesUsingSameDriver: Found: oem7.inf from VMware, Inc., version 8.14.1.6 used by 1 devices
    2015-03-25 16:58:57| tools-build-2476743| AllDevicesUsingSameDriver: Detected that the one driver in use matches
    2015-03-25 16:58:57| tools-build-2476743| Determined that svga_wddm has not changed
    2015-03-25 16:58:57| tools-build-2476743| existing svga_wddm info:
    2015-03-25 16:58:57| tools-build-2476743| Driver version 8.14.1.6 is WHQL (ca ver 1) inf "oem7.inf"
    2015-03-25 16:58:57| tools-build-2476743| current svga_wddm info:
    2015-03-25 16:58:57| tools-build-2476743| Driver version 8.14.1.6 is WHQL (ca ver 1) inf ""
    2015-03-25 16:58:57| tools-build-2476743| End Logging
    2015-03-25 16:58:57| tools-build-2476743| Begin Logging
    2015-03-25 16:58:57| tools-build-2476743| --- VMMofCompile()
    2015-03-25 16:58:57| tools-build-2476743| Getting Property CustomActionData = C:\Windows\system32\wbem\vmstatsprovider.mof;1
    2015-03-25 16:58:57| tools-build-2476743| Found "C:\Windows\system32\wbem\vmstatsprovider.mof"
    2015-03-25 16:58:58| tools-build-2476743| Successfully compiled 'C:\Windows\system32\wbem\vmstatsprovider.mof'
    2015-03-25 16:58:58| tools-build-2476743| End Logging
    2015-03-25 16:58:58| tools-build-2476743| Begin Logging
    2015-03-25 16:58:58| tools-build-2476743| Resetting the Icon Cache
    2015-03-25 16:58:58| tools-build-2476743| End Logging
    2015-03-25 16:58:58| tools-build-2476743| Begin Logging
    2015-03-25 16:58:58| tools-build-2476743| --- VMRun()
    2015-03-25 16:58:58| tools-build-2476743| Getting Property VM_Run =
    2015-03-25 16:58:58| tools-build-2476743| Getting Property CustomActionData = cscript.exe;"C:\Program Files\VMware\VMware Tools\guestproxy-cert-management.vbs" -g;0;0
    2015-03-25 16:58:58| tools-build-2476743| Found "cscript.exe"
    2015-03-25 16:58:58| tools-build-2476743| Attempting to launch ""cscript.exe" "C:\Program Files\VMware\VMware Tools\guestproxy-cert-management.vbs" -g"
    2015-03-25 16:58:58| tools-build-2476743| Create Process failed: error 216
    2015-03-25 16:58:58| tools-build-2476743| ERROR: Failed to run 'cscript.exe "C:\Program Files\VMware\VMware Tools\guestproxy-cert-management.vbs" -g'.
    2015-03-25 16:58:58| tools-build-2476743| End Logging
    2015-03-25 16:58:59| tools-build-2476743| Begin Logging
    2015-03-25 16:58:59| tools-build-2476743| --- VMUninstallAudioDriver() : Uninstalling audio driver
    2015-03-25 16:58:59| tools-build-2476743| Cannot query key value HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.\Wnd: 2
    2015-03-25 16:58:59| tools-build-2476743| Migrating device ID PCI\VEN_1274&DEV_1371&SUBSYS_13711274 to the best driver
    2015-03-25 16:58:59| tools-build-2476743| End Logging
    2015-03-25 16:58:59| instUtils-build-2476743| Begin Logging
    2015-03-25 16:58:59| instUtils-build-2476743| VMUninstallKernelDriver running
    Can anyone shed some light on this? I think it has something to do with cscript.exe, when I attempt to run it from a command prompt I get an error that the program or feature cannot start or run due to incompatibility with 64-bit version of windows. cscript located in syswow64 works, is there any way I can force it to use that?
    Thanks!

    OK, got a bit further... forced it to use the cscript.exe executable that actually works but now receiving this error:
    2015-03-25 17:44:07| tools-build-2476743| Getting Property VM_Run =
    2015-03-25 17:44:07| tools-build-2476743| Getting Property CustomActionData = cscript.exe;"C:\Program Files\VMware\VMware Tools\guestproxy-cert-management.vbs" -g;0;0
    2015-03-25 17:44:07| tools-build-2476743| Found "cscript.exe"
    2015-03-25 17:44:07| tools-build-2476743| Attempting to launch ""cscript.exe" "C:\Program Files\VMware\VMware Tools\guestproxy-cert-management.vbs" -g"
    2015-03-25 17:44:14| tools-build-2476743| Child exited with code 1
    2015-03-25 17:44:14| tools-build-2476743| Process returned 1
    2015-03-25 17:44:14| tools-build-2476743| ERROR: An error occurred while running 'cscript.exe "C:\Program Files\VMware\VMware Tools\guestproxy-cert-management.vbs" -g'.
    2015-03-25 17:44:14| tools-build-2476743| End Logging
    2015-03-25 17:44:14| tools-build-2476743| Begin Logging

  • How to install vmware tools in cucm on Vmware Player

    I'm running CUCM 8.0.1 and Unity Connection 8.0.1 on VMWare Player.  I need to install the VMWare Tools.  I'm using the COP file from the CCO (ciscocm.vmtoolsUpgrade4.1-8.3.2-257589-v14.cop.sgn).  However, it's not loading. I Clicked Install VMWare Tools from Player so the CDRom is mounted and has the COP file in it, but I can't seem to get the path.  The connection is use physical device /dev/cdrom and I have a burned COP file in the dvd drive.  I keep getting "The directory could not be located."
    I have NTP enabled and "the NTP Service is accessible"
    I tried the Remote File System but keep getting the error: "An unknown error occurred while accessing the upgrade file."  I tried different files, e.g. locale file, but get the same error.  Is there something else I need to do on the VM?  The Host machine is Ubuntu 12.04 32 bit.
    Is there a document on this?  VMWare Player is ver 6.0.  The VMs were built in VMWare server 2.0 a while back.

    Thanks for the link.  It is for vSphere and I'm using Player so Step 2 is a little different.  I choose Virtual Machine>Upgrade VMWare Tools.  The settings are set to "use ISO file" and the path is to the linux.iso file.
    When I run the 'utils vmtools upgrade' command, it says: "Executed command unsuccessfully, no valid command entered"
    Any other procedures to try?

Maybe you are looking for