Markus_Lankeit
June 4th, 2016, 01:54 AM
The new server I had just setup was nearly brought down to its knees with CPU utilization above 50% across all cores! But, I just barely installed lubuntu 16.04 server--I wasn't running anything yet... some quick research pointed me to a process called "m6502" that was running in multiple iterations (one per CPU core) and that was solely responsible for the excessive load.
Researching on "m6502," I found it is part of the standard XScreenSaver distribution. Apparently, the default behavior for XScreenSaver is to randomly pick from the installed screen savers and change every 10 min. So, sometimes you just get lucky and get the one that consumes your entire system. I also came across previous posts, noting that XScreenSaver has been causing high CPU loads for nearly a decade. Previous posts resolved the issue by having the user manually change the screen saver preferences in the GUI. None addressed how to change this globally, which would be appropriate for a server setting. After some research, I came across a simple solution that worked for me:
Edit this file: /etc/X11/Xresources/x11-common
Add this line to the bottom:
xscreensaver.mode: blank
Then, restart the window server or reboot the system. Now, XScreenSaver is set to produce a blank screen (meaning 0 CPU load). Individual users can still defy this and have their own preferences, but the default system behavior is the blank screen.
As a side-note, m6502 is the absolute worst in causing CPU load of all the screen savers in the distro. Some of the others also cause CPU load, but not nearly as bad as m6502. Also, none of the doc's talk about how to uninstall a screen saver... maybe just delete the binary from /usr/lib/xscreensaver? Finally, why in the world does the server distribution ship with a screen saver that is well known to overload the CPU? Maybe everyone expects a server to never run a GUI...
Researching on "m6502," I found it is part of the standard XScreenSaver distribution. Apparently, the default behavior for XScreenSaver is to randomly pick from the installed screen savers and change every 10 min. So, sometimes you just get lucky and get the one that consumes your entire system. I also came across previous posts, noting that XScreenSaver has been causing high CPU loads for nearly a decade. Previous posts resolved the issue by having the user manually change the screen saver preferences in the GUI. None addressed how to change this globally, which would be appropriate for a server setting. After some research, I came across a simple solution that worked for me:
Edit this file: /etc/X11/Xresources/x11-common
Add this line to the bottom:
xscreensaver.mode: blank
Then, restart the window server or reboot the system. Now, XScreenSaver is set to produce a blank screen (meaning 0 CPU load). Individual users can still defy this and have their own preferences, but the default system behavior is the blank screen.
As a side-note, m6502 is the absolute worst in causing CPU load of all the screen savers in the distro. Some of the others also cause CPU load, but not nearly as bad as m6502. Also, none of the doc's talk about how to uninstall a screen saver... maybe just delete the binary from /usr/lib/xscreensaver? Finally, why in the world does the server distribution ship with a screen saver that is well known to overload the CPU? Maybe everyone expects a server to never run a GUI...