I had been using PopOS on my laptop for a couple of years, but wanted to shift back to using the i3 window manager. My laptop has the NVIDIA MX150 graphics chipset along with the inbuilt Intel GPU and the primary reason to use PopOS was to get switchable NVIDIA graphics working properly. I had trouble getting this to work back in June, 2018 but I expect it to work now with recent versions of the X.Org Server and the NVIDIA graphics driver.
To get recent versions of the Linux kernel and various packages I will be install the testing version of Debian code-named Bullseye. This may vary based on the time when you are reading this post.
This is part 1 in a series of blogs regarding setup of Debian Bullseye on a Laptop with i3 window manager.
This blog post will touch on important points to consider when setting up Debian Bullseye on a laptop, and the setup of X.org server with NVIDIA graphics drivers.
Note: A lot of the software recommendations and configurations are my personal preferences. Hence this blog will not always go into details expanding why something is being installed.
I use an Asus Vivobook S15, 2018 model. My laptop configuration is as follows:
- CPU: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
- RAM: 16 GB
- Network Chipset: Intel® Dual Band Wireless-AC 8265
- Storage: 128 GB SATA SSD, 128 GB + 1TB SATA HDD 5400rpm
- Audio: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
- NVIDIA Corporation GP108M [GeForce MX150]
- Intel Corporation UHD Graphics 620
We will use the network install ISO (netinst). I will not go into the details of the installation process but just mention a couple of noteworthy things,
- I encrypted my home partition by following the instructions here. This will add an additional step during each boot cycle to enter the password, in order to decrypt the hard drive.
- The WiFi chip needs a bit of additional configuration which I’ve covered in blog post here.
During the install I did not install any desktop environments, as I will be setting up the i3 window manager later.
Post install setup
Since I did not install any desktop environment, the first boot-up displays a command line prompt.
Let’s get some basic utilities setup,
sudoand add the current user to the sudoer’s list –
usermod -a -G sudo <username>. Run the previous commands as root.
ncdu– NCurses Disk Usage
htop– Interactive Process Viewer
less– Man page
zip– Unzip / zip an archive in Linux
wget– Retrieving files using HTTP, HTTPS, FTP and FTPS
curl– command line tool and library for transferring data with URLs
The commands below can be used to complete the steps above:
# Run as root apt-get update apt-get install sudo usermod -a -G sudo
exit # re-login as ; sudo apt-get install ncdu htop less unzip wget cur
X.Org server setup
I’m using X.Org server with Xinput:
sudo apt-get install xorg xinput xserver-xorg-input-all
NVIDIA driver installation
All the information regarding NVIDIA driver installation is available in the Debian documentation.
My output for the command:
lspci -nn | egrep -i "3d|display|vga" returns:
$ lspci -nn | egrep -i "3d|display|vga" 00:02.0 VGA compatible controller : Intel Corporation UHD Graphics 620 [8086:5917] (rev 07) 01:00.0 3D controller : NVIDIA Corporation GP108M [GeForce MX150] [10de:1d10] (rev a1)
This means that I have a hybrid graphics chipset, and need to look at this additional documentation after installing the driver. This allows certain applications to be rendered on the dedicated MX150 GPU while the basic UI still uses the low powered Intel HD GPU.
Update apt sources to add non-free:
deb http://deb.debian.org/debian/ bullseye main non-free contrib deb-src http://deb.debian.org/debian/ bullseye main non-free contrib
Then run the following to install the Linux headers and the GPU driver:
sudo apt install linux-headers-amd64 sudo apt install nvidia-driver
This installed NVIDIA driver version: 440.100-2
Using NVIDIA PRIME render offload
At the time of writing this blog, Nvidia driver version 450.xx is available in Debian bullseye repositories, so these should not be necessary anymore. To identify the driver version, you can run:
The documentation states that this should work out of the box, but on my laptop running:
did not display a provider named NVIDIA-G0 which is mentioned here.
I decided to install NVIDIA driver version: 450.xx from Debian sid. To do that, I added the following to the
sources.list and then used apt-pinning:
# sources.list file changes deb http://ftp.uk.debian.org/debian/ sid main non-free contrib deb http://ftp.uk.debian.org/debian/ unstable main non-free contrib deb http://deb.debian.org/debian experimental main non-free contrib
# /etc/apt/preferences Package: * Pin: release sid Pin-Priority: 101 Package: * Pin: release o=Debian,a=unstable Pin-Priority: -10
Once a window manager is setup (we will do this in the next blog), run
nvidia-settings to configure application and power profile for the dedicated GPU.
In the next blog, I will share my i3 window manager configuration and go through some of finer details while setting it up.
One thought on “Debian Bullseye setup with NVIDIA hybrid graphics”