Guide: NVIDIA Legacy Drivers & Multi-Monitor Setup on a ThinkPad W520 (Arch Linux)
Table of Contents 📑
This tutorial walks you through the process of setting up a ThinkPad W520 to run exclusively on its discrete NVIDIA GPU. This is essential for using external monitors connected via the docking station and achieving a stable, high-performance desktop environment on Arch Linux with the i3 window manager.
ℹ️ THE GOAL |
The primary objective is to enable the NVIDIA Quadro 1000M/2000M GPU in “Discrete Graphics” mode, install the required legacy |
Changelog
Date | Change |
---|---|
2025-07-29 | Initial version of the guide created. |
1. Correct BIOS Configuration
First, we need to instruct the system to use only the NVIDIA GPU, bypassing the integrated Intel graphics.
- Press F1 during startup to enter the BIOS setup utility.
- Navigate to the
Config
→Display
menu. - Set the Graphics Device option to Discrete Graphics. Do not use “Optimus” or “Integrated Graphics.”
- If the option exists, disable
OS Detection for Optimus
. - Save your changes and exit the BIOS. The system will now reboot.
💡 WHY DISCRETE GRAPHICS? |
On the ThinkPad W520, the physical display outputs (DisplayPort, DVI) on the laptop and its docking station are wired directly to the NVIDIA GPU. They will not function if the system is running on integrated graphics. |
2. Installing the NVIDIA Legacy Driver
The NVIDIA Quadro 1000M/2000M GPU found in the W520 belongs to the “Fermi” architecture. Mainline NVIDIA drivers no longer support it, so we must install the nvidia-390xx
legacy driver from the Arch User Repository (AUR).
2.1. Install an AUR Helper (yay)
If you don’t already have an AUR helper, yay
is a popular choice.
sudo pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
2.2. Install the NVIDIA 390xx Driver from the AUR
Now, use your AUR helper to install the driver and its utilities.
yay -S nvidia-390xx-dkms nvidia-390xx-utils
- The
-dkms
package ensures that the NVIDIA kernel module is automatically rebuilt every time your Linux kernel is updated, which prevents breakage. - During the installation, if prompted, allow the installer to blacklist the open-source
nouveau
driver, as it conflicts with the proprietary NVIDIA driver.
2.3. Ensure Kernel Headers are Present
DKMS requires kernel headers to build modules. Install them if they are not already on your system.
sudo pacman -S linux-headers
After installation, you can run sudo dkms autoinstall
to manually rebuild the module if needed.
2.4. Reboot and Verify
A reboot is necessary to load the new kernel module.
sudo reboot
After rebooting, check if the NVIDIA GPU is active and the driver is loaded correctly by running:
nvidia-smi
If this command displays your GPU details and driver version, the installation was successful.
3. Minimal Xorg Configuration
To ensure the X server starts correctly, we will create a minimal configuration file.
Create the directory if it doesn’t exist:
sudo mkdir -p /etc/X11/xorg.conf.d
Create and edit the configuration file:
sudo nano /etc/X11/xorg.conf.d/20-nvidia.conf
Add the following content to the file:
Section "Device"
Identifier "NVIDIA Card"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration"
EndSection
Reboot your system one more time. After this, Xorg should correctly detect all connected displays (both the internal laptop screen and any external monitors) and run them at their native resolutions.
4. Taming the Compositor (picom)
The nvidia-390xx
driver can have stability issues with modern compositors like picom
, often causing applications like rofi
or terminal emulators to freeze the entire desktop. Here are two solutions.
4.1. The Stable Solution: Configure picom
You can make picom
more stable by changing its rendering backend.
Open your picom
configuration file:
nano ~/.config/picom/picom.conf
Find and set the following lines:
backend = "xrender";
vsync = false;
The xrender
backend uses CPU-based rendering. While it may be slightly less performant than the GPU-based GLX backend, it is significantly more stable with this legacy driver.
4.2. The Rock-Solid Alternative: Disable picom
If you don’t need transparency or other compositor effects, the most stable option is to disable picom
entirely.
First, stop any running instance:
killall picom
Then, prevent it from starting automatically by commenting out or deleting the relevant line in your i3 config (~/.config/i3/config
):
# exec --no-startup-id picom
💡 ACHIEVING TEAR-FREE VIDEO WITHOUT A COMPOSITOR |
You can still get a tear-free experience by enabling the “Force Full Composition Pipeline” option in the NVIDIA settings.
|
5. Multi-Monitor Autostart in i3
To have i3 automatically arrange your monitors every time it starts, create a simple shell script.
First, create a directory for your layout scripts:
mkdir -p ~/.screenlayout
Create the script:
nano ~/.screenlayout/monitors.sh
Add your xrandr
command to the script. Use the xrandr
command with no arguments to find the names of your connected outputs (e.g., eDP-1
, DP-1
, DP-5
, etc.).
#!/bin/bash
xrandr --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal \
--output DP-1 --mode 1920x1080 --right-of eDP-1 --rotate normal
Make the script executable:
chmod +x ~/.screenlayout/monitors.sh
Finally, add this script to your i3 config to execute it on startup:
# In ~/.config/i3/config
exec --no-startup-id ~/.screenlayout/monitors.sh
You’re All Set!
Congratulations! You should now have a fully functional and stable setup.
- Your ThinkPad W520 is running on its powerful NVIDIA GPU.
- External monitors connected via the dock are recognized and working.
- Desktop freezes caused by the compositor have been resolved.
- Your i3 session automatically configures your monitor layout on startup.