How to change video drivers or configuration and troubleshoot

It is not necessary to change anything if you don't encounter serious display problems, or your applications run successfully.


If you believe there is a need to change the video driver or the current configuration, first try to find evidence that there is something wrong. Read the Troubleshooting section bellow.
Also make sure you have your system packages properly updated.


Preparation

If you decide to change the video driver, prepare for.. the worst, before you find yourself in front of a black screen and you don't know what to do. It is not unusual to be in this situation, when changing vital system settings, without knowing what you are doing, for example, doing "copy/paste" following a random tutorial on the web.

Get into the TTY and familiarize with it

In simple terms, when you are at TTY (black terminal with no GUI) you can fully control your system, if you know how. If you have internet working, you can install packages, update system packages etc. You can create, delete, edit text files, enable, disable , start and stop systemd services, or perform other system maintenance. You just don't have GUI (graphical interface).

Get into TTY

  • after you land in a black screen when you boot
    • press Ctrl+Alt+F2,F3,F4 etc).
  • using the GRUB boot menu
    • At the GRUB menu Manjaro option, press E to edit the menu
    • Navigate with the arrows to the line that starts with linux
    • Go to the end of the line and add a Space and a number 3
    • Press F10 to boot

Examples of what you can do in TTY

Edit a text file

Use nano to edit a configuration file

nano /etc/X11/xorg.conf.d/10-monitors.conf

This starts a text editor. Usage tips are shown at the bottom of the screen. Navigate with keyboard arrows. Delete, or add text. Save your file with Ctrl+O and Enter (here you may change the actual file name and path, but you normally leave the default). Then exit the program with Ctrl+X.

Check and control a systemd service

If you want to see if a service is failing or its condition and history, check status:

systemctl status bumblebeed
systemctl status lightdm

For example of changing DM from GDM to LightDM:

systemctl stop gdm
systemctl disable gdm
systemctl enable lightdm
systemctl start lightdm

Inspect a log file

Use less to inspect Xorg log files

less /var/log/Xorg.0.log

Navigate with the keyboard arrows or PgUp/PgDown. Exit less with Q.

Change Video driver with mhwd

(... at last!)

Check what video drivers are installed

mhwd --pci -li

Check available video drivers for your system (according to mhwd database)

mhwd --pci -l

If you are installing proprietary nvidia drivers, you don't need to uninstall the free video-linux drivers, unless you follow a tutorial or a forum support advice that suggests so.

Install the best/suggested driver for your hardware automatically

  • For free/open-source drivers (intel, nouveau, amdgpu or ati)
mhwd -a pci free 0300
  • For non-free/proprietary drivers (nvidia, or radeon)
mhwd -a pci non-free 0300

For a more complicated setup, you should research your available options and install a specific driver configuration.
For example:

  • Uninstall
mhwd -r pci video-nvidia-390xx
  • Install
mhwd -i pci video-nvidia

Troubleshoot your video card configuration

The usual scenario is you are stack in front a black screen after booting your PC.

Try to go to TTY (press Ctrl+Alt+F2 or Ctrl+Alt+F3).

If this is not giving you a screen with a message at the top, requesting login (username and password), then reboot and use the Grub menu method. If you have the default Silent Grub, during boot, press Shift, or Esc, or F8, until you see the Grub menu. Press E to edit the default menu entry (to stop grub countdown, press down arrow once, then go to your proper menu line). You will be presented to a "terminal-like" screen, that is editable. Navigate with the arrows to the line that starts with the word linux and press End keyboard button, to go to the end of the line. Write the number 3 and press F10 to boot. This will start booting and will bring you to the TTY screen (the system will be fully functional, except from the GUI/Xorg)

Log your troubleshooting info in a file

You should store your troubleshooting in a file, in order to later provide your troubleshooting report to your support request topic.

You can do that, appending this at the end of each command you run in TTY (use whatever file name):

| tee -a video-nvidia.log

So the next command could be:

systemctl start lightdm | tee -a video-nvidia.log

This command adds the terminal output to that file, without overwriting the previous contents.
You can also use >> for a command, to send the output to a file, but this will not show that output in the terminal/TTY. Example:

grep  "(EE)\|(WW)\|Time"  /var/log/Xorg.0.log >> video.nvidia.log

You may find this method more suitable, in some cases, so, use what is better and working.

If you finally fail to resolve your issue, you may add some more info (presented later) and post the file to a web paste bin service, (from TTY) and provide the link to your support topic. An easy tool for this is pastebinit. You need to install it first.

Example:

sudo pacman -S pastebinit
cat video-nvidia.log | pastebinit

Post the resulting link to the Forum.

Exclude Display Manager from potential reason for black screen

Sometimes, it is only the DM that cannot start, while Xorg maybe fine. To exclude this possibility, try to start the DM. For LightDM:

systemctl start lightdm

The errors (if recorded and reported as advised above) will help troubleshooting.

Start Xorg manually to see errors

To start Xorg session manually:

startx

or, depending on your Display Environment (DE) (example for xfce)

startxfce

Do NOT use tee to log errors of startx, until you are sure the command fails to start GUI/DE. Only then, you may use it to log the errors to your troubleshooting log, like for example

startx | tee -a xfcefail.log

Looking for errors

In System Journal log

  • You can inspect system journal log for errors of the current boot, or the previous one:
journalctl -b -p3
journalctl -b -1 -p3

In Xorg log files

  • Inspect Xorg server (GUI administrator) current boot logs:
cat /var/log/Xorg.0.log | grep "(EE)"
  • Gnome and GDM (and maybe Cinnamon) keep(s) logs locally:
cat ~/.local/share/xorg/Xorg.0.log | grep "(EE)"
sudo cat  /var/lib/gdm/.local/share/xorg/Xorg.0.log  | grep "(EE)"
  • Depending your driver setup, Xorg logs names may vary at the number, so there maybe like:
Xorg.1.log Xorg.8.log etc...
  • Previous boot logs have .old added to their name.

  • You should always confirm that you are inspecting the proper Xorg logs (current or older), checking the "Time" they are written/renamed, either at the file attributes, or in the file contents.

Example:

ls -l /var/log/Xorg*
sudo ls -l /var/lib/gdm/.local/share/xorg

or in the file manager.

  • Checking the contents (example):
grep -F "Time" /var/log/Xorg*

Create a Support Request topic

In order to help forum experienced users help you solve your video drivers problems, you need to provide:

  • A good and as precise as possible description of the problem you are experiencing. A simple "the display is wrong" does not help.
  • When does the issue happen, during boot, before or after grub, before or after login screen (DM), immediately or after how long, sometimes (how often) or always.
  • If the problem is difficult to describe, post a screenshot or a photo (do not post photos/images with text unless it is absolutely necessary)
  • A set of terminal output info, as bellow:
inxi -SMGxxaz 
mhwd -li
pacman -Qs intel\|radeon\|amd\|nvidia\|optimus
[ xrandr &>/dev/null ] && xrandr
for Xconf in $(ls /etc/X11/xorg.conf.d/*.conf) /etc/X11/xorg.conf ; do echo -e "\n" $Xconf ; cat $Xconf ; done
for Xconf in $(ls /etc/modules-load.d/*.conf); do echo -e "\n" $Xconf ; cat $Xconf ; done
for Xconf in $(ls /etc/modprobe.d/*.conf); do echo -e "\n" $Xconf ; cat $Xconf ; done
journalctl -b -p3 --no-pager --no-hostname
for Xlog in $(ls /var/log/Xorg.?.log) $(ls $HOME/.local/xorg/Xorg.?.log); do echo -e "\n" $Xlog ; grep -E "(EE)|(WW)|failed|Time" $Xlog ; done
  • For bumblebee related setups, provide additionally these
optirun inxi -Gxxxaz
optirun xrandr  # if you have GUI/Xorg running
grep -v ^# /etc/bumblebee/bumblebee.conf
grep -v ^# /etc/bumblebee/xorg.conf.nvidia
systemctl status bumblebeed   --no-pager
journalctl -b -g "bbswitch|bumble"  --no-pager --no-hostname
  • For multihead (multi-monitor), or PRIME related issues, these may assist
xrandr | awk ' /connected/ { print $1, $2 }'
for p in /sys/class/drm/*/status; do con=${p%/status}; echo -n "${con#*/card?-}: "; cat $p; done

Find GPU BusID and Convert Hex(adecimal) number to Dec(imal)

When you have to add BusID to your xorg.conf (or other conf name :wink:), you have to convert the hexadecimal number reported from cli utilities to decimal.

  1. Find GPU BusID
  • Using Device Administrator
udevadm info -x /sys/class/drm/card0 | grep "ID_PATH=" | cut -d ":" -f3,4

00:02.0

Raise "card0" number for more than 1 card (card1, card2, etc).

  • Using lspci
lspci | grep -E "VGA|3D" | grep -i nvidia | cut -d " " -f 1

01:00.0

Change nvidia to amd or intel for other vendors.
Or find for all cards:

lspci | grep -E "VGA|3D" | cut -d " " -f 1
  1. Convert Hex(adecimal) number to Dec(imal)
    If the BusID has letters (not compatible to decimal values), convert that part using one of these methods:
# example BusID 00:2f.0 from above outputs
echo $((0x2f))
47

#  or
hexNum=2f
echo $((0x${hexNum}))
47

The final value should be 0:47:0. Insert this in the respective Device Section:

Section Device
...
   BusID    "PCI:0:47:0"
...
End Section


You should use proper formatting to make it easy to read, read how


Note: Be aware that some of the above commands that perform system administrative actions, require root privileges, so they have to be run as root, or with sudo. If you don't know what that means, then don't do it. It is possible that you may break your system.


Another tutorial for general troubleshooting


Disclaimer: This tutorial is a Work In Progress. If you find some mistakes, please post bellow and help improve it.

32 Likes
Can't boot after installing Nvidia drivers
Not able to boot into graphical session after 2018-12-31 update
Laptop failed to boot after installing video-hybrid-intel-nvidia-bumblebee
My System Is Broke? Newbie Needing Some Help
Display issue
How can I set up an eGPU to work with optimus-switch?
[Solved] Optimus Multi monitor setup, intel-virtual-output works but the screen remains black
[SOLVED] Manjaro installation & partition are successful. Black screen just after login with password
[SOLVED] Manjaro installation & partition are successful. Black screen just after login with password
Optimus + Ultra Wide monitor + i3
Manjaro goes black screen on boot up
Fstab booting error and graphics card replacement problem
Monitor doesn't detect DisplayPort connection, if it's turned on after the computer
[SOLVED] No boot after removing the dedicated graphic card
when booting xfce screen all garbled till it boots
Fresh installation, garbled graphics when logging in
Booting to black screen after update (cursor visible)
Dual Monitor Stopped Working
Computer boots to black screen after using Nvidia PRIME
Computer powers on but only shows black screen + cursor
Can no longer boot after system update. (2019-11-14)
nvidia x driver errors
Dedicated graphics card not being recognised
Fresh install unbootable after system update
Problem when booting from a hard disk in a different pc
Fresh install on MSI laptop (GP62 6QE leonard pro with NVIDIA-GTX950M)
Fresh install freezes after logging in.
Optimus laptop issues
Cannot startx after adding second nvidia gpu
Manjaro stuck at black screen after starting services
Help with a few minor issues after upgrading from Intel to AMD Ryzen 3000
Dual display blacks out 15 seconds after login
Cannot load Geforce GTX 1650 nonfree/free drivers
[求助]无法安装intel+nVidia混合驱动
Manjaro KDE works perfectly live but freezes once installed
Problem with video card in Dell Inspiron 7520 (Intel/AMD dual graphics)
ThinkPad Pro Dock USB 3.0 external display not detected
DELL workstation huge performance problem on battery
Graphics driver
Vega 64 installation problems
X1 extreme i5, so far I could not get bumblebee to work
Boot issues (cannot boot)
Display driver problem & how to repair with live CD or USB support?
Stuck booting up after manually installing a Nvidia driver
Boot problems - only seeing 1 out of 3 distros installed
Manjaro stuck on boot after latest update
After switching from a nvidia GPU to a Radeon RX580, can't boot to desktop
Boot Failure - Unrecognizable Error
Black screen on boot after grub on fresh install
Laptop won't completely turn on after hard power off
Setting up nvidia optimus; nvidia not detected
Black screen after install Ati proprietary drivers -- Do not install this buggy drivers ! work no more with Xorg
GDM becoming unstable after switching to Nvidia-driver
X11 NVIDIA config probleme and become unbootable
Display resolution different between "live" and "installed" XFCE
Installation Problem caused by nvidia card
Second monitor with Radeon 570
Issue with multiple nvidia graphics cards (maybe MSI specific)
Problem with nvidia graphic card
Black screen after login only mouse shows and access to tty
Unable to access computer
How to - Switch from legacy to UEFI?
How to install drivers from usb
HP Pavillion Notebook - hybrid Intel UHD 630 Nvidia GeForce GTX 1050 - frezees when trying to use or query graphics
Manjaro not booting. Blackscreen after Grub
[SOLVED] Dell Latitude E6420 Manjaro KDE [Fresh install] HDMI Port Not Recognised Hybrid Intel/Nvidia
NVIDIA GeForce 7300 GT drivers
Boot error after update: "Failed to Start Load Kernel Modules"
Multi-monitor setup acting weird
First update hangs at "Updating Grub-Bootmenu"
Black Screen after install nvidia
HDMI to DVI-D monitor connection is not working.
Manjaro freezes at login screen and touchpad not working after install
Problems with Manjaro KDE Edition
nvidia - unable to make driver work properly
optimus-prime Nvidia driver won't load
X won't start after Nvidia drivers
Manjaro XFCE runs from USB fine but won't boot when installed; just a black screen no message.
How do I install Nvidia Drivers?
Black screen after trying to install proprietary drivers on Manjaro
Unable to boot after install, stuck getting a blinking "_"
Black Screen on Every Boot
Hard to read texts
Manjaro freezes on the desktop screen after identification
You are in Emergency mode (How to leave and stay out of the ER)
Freezing at login screen after hitting login
How can change screen resolution while booting with Nomodeset?
No Boot (with "Failed to start Light Display Manager" error) after Nvidia-drivers configuration
Manjaro KDE won't install from Live USB
Computer boots to black screen after using Nvidia PRIME
Sapphire nitro RX 5700 XT
nVidia GK106GLM Quadro K2100M driver
Manjaro fails to start after 2019-10-10 update
如何安装nvidia440显卡驱动?
Dual monitor problem
Output only from iGPU and not GPU (Desktop)
Possible to force Manjaro to use specific discrete GPU as primary display device?
Unable to boot - Failed to start Load Kernel Modules error displayed
Black Screen Nvidia Driver Lightdm Archlinux
reboot fails
I can't set my screen resolution (Intel Graphics HD 4400)
Separate intel and amd graphics, pci, odd behavior
HDMI port not working on Optimus laptop after lid close
Project to a projector or second screen
Black Screen after updating to [Stable Update] 2019-11-14
Can no longer boot after system update. (2019-11-14)
Multiple monitor setup on docking station
RX580 Dual Monitor Display Issue
[Stable Update] 2019-11-14 - Kernels, Plasma, KDE Apps, KDE Frameworks, Mesa, Nvidia
Cant access right click options on various apps
Unable to create multiple X Screens with Manjaro
Laptop screen black & undetectable but external monitor is working (using NVIDIA graphics)
Nvidia - Prime issues
nvidia x settings not persisten
Manjaro randomly shutdown
X Server fails / NVIDIA: A GPU exception occurred during X server initialization(EE)
X Server fails / NVIDIA: A GPU exception occurred during X server initialization(EE)
Can't access secondary GPU (NVIDIA non-free driver), bumblebee
Clean Install Problem
[ERROR]Cannot access secondary GPU - error: Could not enable discrete graphics card
Manjaro KDE Graphics glitch
Booting into black screen after downloaded non-free drivers for nvidia
Manjaro is not booting, showing black screen
Manjaro XFCE won’t start
proprietary nvidia-drivers (GPU) fan on full speed
Install drivers for Nvidia GeForce GTX 1050 without bumblebee
Kde login screen - display does not update even though mouse cursor works
Second Screen does not work properly after installing Nvidia Drivers
Stuck at low display resolution
Dual booting windows 10 and Manjaro to a blinking cursor
Black screen after screen resolution change
Multi-monitor: Windows opening on wrong screen (KDE Plasma desktop)
systemd-backlight@backlight:acpi_video0.service failed
No Desktop after Login
Display monitors don't work after nvidia drivers update
Fresh install of Manjaro Architect with non-free drivers not working
System hangs on Intel NUC8i7HNK
[SOLVED] Problems fter interrupted update process. (First missing kernel img then seems there's problems with mesa-vdpau package)
GT740m not being detected
Screen freezes while online streaming

Forum kindly sponsored by