The Random Ramblings

lost? dazed? confused? dont come here then as this aint goona help!!

Vino-server Ubuntu 14.04 using 100% cpu

I have a media server, a small HP microserver, hooked up directly to my TV. It a great little workhorse, moving from just being able to play music and media to running all sorts of things now.

While its great for these little things you can't throw anything that needs cpu, that's its weak point, it also means that its very quick to notice if the cpu is being hammered, in particular when playing video files.

Things were stuttering while watching a video so a little bit of digging, well not much really, showed that vino-server was running at 98%.

I am currently running Ubuntu 14.04 on the server, having taken the risk of upgrading fairly early on, this is not the first time that I have been required to fight vino-server, the built-in vnc service. I should have written up on how it didn't like any vnc client and kept refusing due to password problems but I was in a rush. So this problem is just another in a list of things around the vino server.

Just to give a full walk through, how did I know is was using all that cpu? Easy I just ran this command


this gives a list of all the processes running and with real-time data. If you haven't played with it it automatically sorts the processes by most cpu usage, certainly a very quick way to find out.

How did I fix it? Well that was even easier, I just killed the process. Ok, yeah here is how to do that. First thing to do is find the process id, more commonly know as the Pid

ps aux | grep vino-server

it should return something like this

bleachin         2582   0.0  0.0  2442000    628 s001  S+    9:45pm   0:00.00 grep vino-server

the key bit of information from this is the second value, in this case 2582, normally above 1000 but it can be pretty much anything depending on how the machine is used. All you need to do now is kill it, be brave, it will be fine

sudo kill -9 2582

As I didn't know what the actual problem was, using the -9 is most likely similar to using a sledgehammer to crack a hazelnut but I know it will work. the 2582 is the number I got from the previous command, as I said that could be anything so make sure you run the ps command and get the value for your machine.

Woohoo, no more cpu consumption but, you guessed it, you can't vnc into the server. The whole point of vino is getting access to the main screen, similar to ilo service, so a little bit of magic now need to be applied. to do this you need to be root, attach to the first display, allow all to access x and then, finally, start the service and all will be good. Here we go

sudo su-
export DISPLAY=:0.0
xhost +
/usr/lib/vino/vino-server &

there you go all working again and you can once again leave the command line for the pretty GUI

Find Me
Javascript learning