Linux kernel yield() functionality
Solution 1
Create a file called /etc/sysctl.d/99-awakeFromNib-vmware.conf
containing the line
kernel.sched_compat_yield=1
This file is read at boot time. For this session, just click OK.
You can view or change the setting at any time by reading or writing the file /proc/sys/kernel/sched_compat_yield
.
ADDED: Settings like these are called kernel parameters, or sysctl's for short. (They are not the same thing as kernel command line parameters that you can set in your bootloader, though you can set sysctl's on the kernel command line.) The principle is documented in man sysctl
, and most settings are documented in Documentation/sysctl/*.txt
in the Linux kernel documentation.
Solution 2
Using Ubuntu 10.10, VMware Workstation creates the 30-vmware-player file in /etc/sysctl.d
but Ubuntu is looking for files that end in .conf
- it seems to ignore all others.
Rename the 30-vmware-player
file to 30-vmware-player.conf
sudo mv /etc/sysctl.d/30-vmware-player /etc/sysctl.d/30-vmware-player.conf
Solution 3
Tested on 11.04 (Natty Narwahl) - I edited /etc/sysctl.conf
sudo gedit /etc/sysctl.conf
and added this line at the bottom of the file:
kernel.sched_compat_yield=1
Save the file and exit then initialize the new settings with:
sudo sysctl -p
You should never see the message again.
Solution 4
I just wrote the line above: kernel.sched_compat_yield=1
directly to /etc/sysctl
, and the app (vmware-workstation) never showed the message again (screen shot at the top of this page).
If I just said yes to the message, the app would create the file 30-vmware-player
in /etc/sysctl.d/
but I would still get the message after running vmware-workstation after rebooting (maybe because the name of the file -player, instead of -workstation).
Solution 5
I have failed to set kernel.sched_compat_yield=1
but have given up trying.
Using Ubuntu 9.10, VMware Workstation 7.1.2 build-301548
If I click OK then my Windows 7 VM grabs my USB keyboard and mouse and hangs, requiring a hard reboot.
If I just cancel then the mouse and keyboard work well inside and outside the VM.
Related videos on Youtube
tony_sid
Born and raised in California. Computers are my main hobby.
Updated on September 17, 2022Comments
-
tony_sid over 1 year
When I start VMWare Player it gives me this message:
How can I setup my system so that this yield() functionality is automatically enabled?
-
tony_sid over 13 yearsI don't get it. What's the difference between creating the vmware.conf file and editing the one in /proc/sys/kernel?
-
Gilles 'SO- stop being evil' over 13 yearsThe settings in
/proc/sys
apply to the running kernel. They're lost when you reboot. The settings in/etc/sysctl.d
are applied during the boot process. -
tony_sid over 13 yearsIn /proc/sys/kernel/sched_compat_yield there is only one thing written in it: 1. Does this mean that it's already turned on? Shouold this be replaced with kernel.sched_compat_yield=1?
-
Gilles 'SO- stop being evil' over 13 years@awakeFromNib:
/proc/sys/foo/bar
contains the value of thefoo.bar
setting.kernel.sched_compat_yield
is a boolean setting, so it's on if/proc/sys/kernel/sched_compat_yield
contains 1 and off if/proc/sys/kernel/sched_compat_yield
contains 0. (In fact the file contains a final newline when you read it; if you write to the it manually you can omit that final newline.) So the answers to your questions are 1: yes; 2: no.