Setting up an Ubuntu server on a laptop

I wanted to share some tips for setting up a server on a laptop with an Nvidia card. In particular handling Optimus, which I haven’t seen mentioned anywhere here and which tripped me up.

I’m running a Gigabyte Aero 15 with a GeForce 1060.

I dual-booted Ubuntu Mate. Standard Ubuntu caused a lot of issues for me.

Anyway, the important thing to note is that most modern gaming laptops will come with Nvidia Optimus technology. This means you actually have two graphics cards – the powerful GeForce card and then a low-power Intel card, which is used by default to save battery.

In order to force Ubuntu to use your GeForce card:

  1. Go here to find out the latest driver number:

  2. You can search this link to find out if your graphics card supports the latest driver:

  3. Follow this guide to set up and switch to Nvidia drivers:

(It doesn’t matter if you have a Dell or not, the instructions are generic. If you Google Ubuntu Optimus you can find other guides, but the Dell steps seem to be the simplest and up-to-date.)

You can run the command glxgears to make sure your graphics rendering is working.

After that, you can run the paperspace script on your local Ubuntu install to set up the server. I recommend running the commands one by one instead of the whole script so you can trace where things might go wrong.

But is it really needed?

To use your GPU all time…

GPU not only computed thing, but it will also be then used for displays, copying etc…

It will drain laptop battery at an exponential rate…

Optimus technology in Window’s automatically switches when I want it to use the GPU by passing .cuda()

In Ubuntu, the GPU won’t automatically switch. You have to do it manually using the sudo prime-select commands, which are explained in the links I posted.

Thanks for the knowledge point…