Posted in Linux

VirtualBox settings for Linux Guest

First, set Paravisualization Interface as KVM.

Make sure you allocate enough CPU and RAM. If you’re running Desktop Environment, you should allocate at least 2G RAM. 4G RAM recommended.

If you meet any graphic problems, turn off 3D Acceleration. It will solve most graphic problems.

If you find disk I/O is very slow, go to Storage setting page, click “Controller: SATA”, then check “Use Host I/O Cache”. You will find your Virtual Machine run fast beyond your imagination, even thought the disk is on HDD, not SSD. So you should enable this before installing Operating System, it will speed up your installation. (VirtualBox disable this by default)

Set sound hardware as AC 97, not Intel HD, to get best compatibility. Otherwise, you will meet some strange problems while playing sound, especially laggy or stuck.

Finally, don’t forget to install the VirtualBox Guest Additions, it will give you full power. Instructions here:

Last thing last, remember Snapshot will record the hardware settings too. After restoring snapshot, you should set your hardware settings again.

Posted in Linux, Python

If you run Pygame too slowly in VirtualBox or VMware, just change a setting to work fast

Try to turn off 3D Acceleration in VirtualBox or VMware.

VirtualBox settings
VMware settings

When you turn off 3D Acceleration, CPU will load much heavier instead of GPU so that you should increase your CPU power (increase your Virtual Machine CPU number, or upgrade your physical machine CPU). Though CPU will load heavier than before, that’s worthy because it only takes heavy load while running Pygame. While using other applications, CPU behaves as usual.

The system will pop this warning notification, just ignore it.

For VirtualBox users, maybe you find after switching VMSVGA to VBoxVGA or VBoxSVGA, it works more normally. That is because VBoxVGA and VBoxSVGA won’t enable 3D Acceleration. I recommend using VMSVGA by default.

So when you face the graphic problem, don’t waste your time like me, just turn off 3D Acceleration.

If you meet other problems while using VirtualBox for Linux Guest, see this post:

Posted in Linux

“Processing triggers for man-db” takes too much CPU time or disk I/O

Recently I found a problem: while apt upgrade, it’s always being stuck at “Processing triggers for man-db”. In fact, the process is still running, just too slow.

I guess triggering man-db will take too much CPU time to finish so it looks like being stuck. I didn’t monitor the disk I/O status, I guess it needs a number of disk I/O actions. If you’re using HDD, that would be slow.

Maybe there’s a bug. As far as I know, man-db problem exists in every Debian-based Linux distribution, including Debian and Ubuntu. The earliest report I see is in 2012, and Debian 11, the latest stable Debian version, also has this problem.

Because triggering man-db is nearly the last step of the upgrade, it seems like organizing and concluding something. It doesn’t upgrade man-db package itself, so using apt-mark hold man-db command is useless.

Some tutorials say that removing the man-db package or deleting the cache folder of man-db, may cause other problems.

So my suggestion is that make sure your machine has a high enough CPU to calculate power and disk I/O amount.

Posted in Hardware

RAM Overclock: Frequency, Voltage, Temperature, CAS

Higher Frequence requires higher Voltage, or you will find the PC cannot boot or the applications will close automatically, especially games.

But higher Voltage will cause higher Temperature. If the Temperature is too high, it will cause errors in RAM, and applications will crash, games will freeze. Sometimes the PC will shutdown.

In summer, the indoor Temperature is higher, we must watch out.

If you don’t install extras fans to ventilate the air from the rear to the front, you should not set Frequency and Voltage too high.

So you should make sure the balance between Frequency and Voltage. You can look for some guides about your RAM models online. But you must set and test by yourself.

While playing games, almost every parts of PC works at best and the Temperature is up to its highest. So don’t trust those posts which only works as normal conditions, unless you don’t play any 3A games. The best way to test RAM is playing games, especially 3A or MMO, like Dota2 and CSGO.

CAS is positive correlation to Frequence, so don’t set CAS too low. But the lower CAS, the lower latency. It’s up to you, but most DDR4 RAMs can only get 16 as CAS at best.

Posted in History



Continue reading “中华上古传说与周文明的暧昧”
Posted in Comment





Continue reading “货拉拉跳车案宣判后,我的心情已经无法用语言来表达”
Posted in History, Politics




Continue reading “宗法制度的本质究竟是什么?浅谈嘉靖“大礼议”事件”
Posted in Windows

One command to find out which process prevents your PC from sleeping

When you click down the button of sleep, only screen is off but the PC is still running. After rebooting, sleep will work.

Why? Because some process is running and preventing your PC from sleeping. After rebooting the PC, the process will be terminated so that you can sleep the PC.

We can use just one command to find out the process.

Open your CMD or Powershell, and input this command:

powercfg /requests

The result:

Well, we can find that a process named NeatDM.exe is preventing sleeping. It’s a download software. After closing it, I can sleep my PC at once.

Remember, this is for the situation where you sleep your PC but it wakes up at once.

However, sometimes you would face the situation where the PC slept successfully, but it wakes up later for a while. For this situation, you need to use this command to check which device woke your PC up last time:

powercfg /lastwake

However, sometimes things get wired. You just see the woke device is Fixed Power Button, but you didn’t press the button! OK, for this strange thing, I find it caused by Wake on LAN. Some devices in your LAN woke your PC up but Windows recorded it as Fixed Power Button.

Finally, maybe you need to check your Power Plan settings. Disabling Wake Timer is very useful. Many programmes, including Microsoft, will use some methods to wake your PC up. If you want to control the PC by yourself, just disable Wake Timer.

Posted in Impression