Setting up Ubuntu 17.04 on a laptop with hybrid graphics with full 2D/3D acceleration
Hello everybody. I’ve written a couple of blogs on “how to set up linux on a laptop with hybrid graphics”. In both of those blogs I had used fedora. So, this time I’m going to change it. Let’s get it running with ubuntu 17.04. For those who prefer to stick to the LTS (Long term support) releases, or any other older release, I’d recommed you to upgrade. Sticking to an older version makes it difficult for the developers to cater to the needs of consumer. This leads to fragmentation. This is why many companies like Apple forces its users to upgrade. While upgrading might seem like a “pain in the @$$”, it’s also important to maintain the quality and uniformity of software available. Many of the newer technologies which were not present, say, a year or two ago are not supported on these older platforms. For utilising the full potential of the hardware, the kernel developers keep optimizing the kernels. While building your own kernel for older operating system is possible, do remember that it’s more of a problem than a solution, for the average consumer. Unless, the data on your system is extremely important or confidential (as is the case with many enterprises and military), I won’t recommend sticking to an older OS. If documentation is your concern, then do note that most of the things are just the same for newer versions too and they are mostly just copied over.
Anyways, let’s get back to our objective i.e. setting up Ubuntu 17.04 on a laptop with hybrid graphics. While changing the OS of choice from fedora to Ubuntu might not seem to be as big a change, there’s something more this time. With the earlier setups, we didn’t have 2D/3D acceleration available. Well this time, we do have it. This means, smooth transitions and desktop effects and no more screen tearing in high resolution videos (Yippie :) ). I’ll be using MSI GP62 6QE Leopard pro for this.
So, here’s the step by step procedure:
Part 1: Installing it on your laptop.
Boot from the live DVD or USB stick.
As soon as you get to the bootloader, press F6.
Enter the following in the boot options: “idle=nomwait nouveau.blacklist=1 nomodeset”
This should be enough to get you to the live session.
Proceed with the installation procedure as you would, otherwise.
Part 2: Setting up bbswitch kernel module.
After you reboot your device, and get to the login screen, you’ll probably see individual frames loading, since we don’t have hardware acceleration available until now.
After that, you’ll have to either install git via apt and use it to download bbswitch or download it manually from GitHub. Here’s the link for the repository: bbswitch
After you’re done, open up a terminal and change your directory to the downloaded one.
Set it up using dkms, so that you don’t have to set it up again and again.
Open /boot/grub/grub.cfg in your preferred text editor and remove “nomodeset” from the entries that you are actually going to use (this will probably be the first entry) and add “nouveau.modeset=0” to it. (idle=nomwait should already be present, if not, add it).
Part 3: Loading the module:
On the next reboot, the system should be working fine, but, you still need to load the module for switching.
# tee /proc/acpi/bbswitch <<<OFF
If you want to automate the this procedure, have a look at my earlier blog
Here’s a link to the Switcher repository (this script helps you to set everything up automatically, provided you follow the instructions in the Readme): Switcher
Once you’re done setting it up, you can test it by running the following two commands: glxinfo and glxgears. Here’s a screenshot of glxgears running.