2010-04-06 18:07:48 -04:00
---
2015-04-10 16:17:45 -04:00
layout: doc
2015-10-13 23:31:03 -04:00
title: Nvidia Troubleshooting
2015-10-28 18:14:40 -04:00
permalink: /doc/nvidia-troubleshooting/
2015-10-11 03:04:59 -04:00
redirect_from:
2015-10-28 18:14:40 -04:00
- /en/doc/nvidia-troubleshooting/
2015-10-11 03:04:59 -04:00
- /doc/NvidiaTroubleshooting/
- /wiki/NvidiaTroubleshooting/
2010-04-06 18:07:48 -04:00
---
NVidia Troubleshooting Guide
============================
If you have an NVidia graphics card it will probably not work under Xen out of the box. If your system freezes during boot and you don't see the graphical login manager after you installed Xen, then this problem most likely affects you. The following steps should provide a work around so that you should be able to use your NVidia with X under Xen, however without any fancy "desktop effects".
2016-09-16 15:48:48 -04:00
Boot in failsafe
---------------------
2016-09-17 20:19:42 -04:00
Boot your system using the "failsafe" boot menu, that should have been automatically added to your `grub.conf` when you installed the Dom0 kernel.
2010-04-06 18:07:48 -04:00
If the X Window System doesn't start now, this is probably a non-Xen related issue and this guide will probably not help you.
2016-09-16 15:48:48 -04:00
Configure X with nouveau
---------------------
2010-04-06 18:07:48 -04:00
Assuming your X Window System works fine now when you booted from the "failsafe" configuration, do the next steps...
2016-09-17 20:19:42 -04:00
1. Do not log into X, but instead switch to a text console (press Ctrl-Alt-F2)
2010-04-06 18:07:48 -04:00
2016-09-17 20:19:42 -04:00
2. Log in as root
2010-04-06 18:07:48 -04:00
2016-09-17 20:19:42 -04:00
3. Switch to runlevel 3 (this should kill your X server):
2010-04-06 18:07:48 -04:00
2016-09-17 20:19:42 -04:00
~~~
init 3
~~~
2010-04-06 18:07:48 -04:00
2016-09-17 20:19:42 -04:00
4. Run X-autoconfiguration:
2010-04-06 18:07:48 -04:00
2016-09-17 20:19:42 -04:00
~~~
Xorg -configure
~~~
2010-04-06 18:07:48 -04:00
2016-09-17 20:19:42 -04:00
This should generate a file `xorg.conf.new` in the `/root` directory.
2010-04-06 18:07:48 -04:00
2016-09-17 20:19:42 -04:00
In most cases you can ignore any warning or error messages displayed by the X server, assuming it generated the xorg.conf.new file.
2010-04-06 18:07:48 -04:00
2016-09-17 20:19:42 -04:00
5. Edit this newly generated `xorg.conf.new` file and introduce the following two modifications:
2010-04-06 18:07:48 -04:00
2016-09-17 20:19:42 -04:00
First, uncomment the ShadowFB option, so that you should now have something like this:
2010-04-06 18:07:48 -04:00
2015-09-26 19:00:33 -04:00
~~~
2010-04-06 18:07:48 -04:00
Option "ShadowFB" # [< bool > ]
2015-09-26 19:00:33 -04:00
~~~
2010-04-06 18:07:48 -04:00
2016-09-17 20:19:42 -04:00
Second, change the driver name to `nouveau` (you will probably have `nv` written there):
2010-04-06 18:07:48 -04:00
2015-09-26 19:00:33 -04:00
~~~
2010-04-06 18:07:48 -04:00
Driver "nouveau"
2015-09-26 19:00:33 -04:00
~~~
2010-04-06 18:07:48 -04:00
2016-09-17 20:19:42 -04:00
Save the modification, exit the editor.
2010-04-06 18:07:48 -04:00
2016-09-17 20:19:42 -04:00
6. Move the file to `/etc/X11` and rename it as `xorg.conf` :
2010-04-06 18:07:48 -04:00
2016-09-17 20:19:42 -04:00
~~~
mv /root/xorg.conf.new /etc/X11/xorg.conf
~~~
2010-04-06 18:07:48 -04:00
2016-09-17 20:19:42 -04:00
7. Verify that X will work with those new settings:
2010-04-06 18:07:48 -04:00
2016-09-17 20:19:42 -04:00
~~~
xinit
~~~
2010-04-06 18:07:48 -04:00
2016-09-17 20:19:42 -04:00
If you see a terminal window in the top left corner, it means you most likely succeeded, even if your keyboard or mouse do not work now (don't worry about them).
2010-04-06 18:07:48 -04:00
2016-09-17 20:19:42 -04:00
8. Reboot and let the system boot from the normal boot configuration. You should be able to use X under Xen now.
2010-04-06 18:07:48 -04:00
2016-09-15 14:07:58 -04:00
Disabling Nouveau
---------------------
2016-09-18 11:19:15 -04:00
If Qubes fails to properly boot after the GRUB Boot menu and you are stuck on a black screen that displays messages starting with `nouveau` then it means that the nouveau driver failed to launch properly.
2016-09-15 14:07:58 -04:00
2016-09-16 15:48:48 -04:00
One way to get rid of this for now is to disable nouveau.
2016-09-15 14:07:58 -04:00
Example error
2016-09-17 20:19:42 -04:00
2016-09-15 14:07:58 -04:00
~~~
nouveau E[ PGRAPH][0000:01:00.0] grctx template channel unload timeout
nouveau E[ PGRAPH][0000:01:00.0] failed to construct context
nouveau E[ PGRAPH][0000:01:00.0] init failed, -16
~~~
2016-09-18 11:38:57 -04:00
Tip: In case you only have an external monitor it is advised to attach it directly to a connector of the motherboard if it is present, this should ensure that you're using the integrated graphics card instead of the nvidia graphics card.
2016-09-17 12:07:55 -04:00
2017-05-11 20:12:02 -04:00
If you're seeing this error then that means another graphics card (most likely an integrated one) acted as failsafe. Disabling nouveau has the consequences of disabling nvidia support altogether.
2016-09-15 14:07:58 -04:00
2016-09-17 20:19:42 -04:00
1. Verify that that GRUB Boot Menu is displaying, you should be presented with two options and a progressbar/timer than goes rather fast.
~~~
Qubes
Qubes with advanced Xen options
~~~
2016-09-15 14:07:58 -04:00
2016-09-17 20:19:42 -04:00
2. Quickly press the "E" key before the time is up.
2016-09-15 14:07:58 -04:00
2016-09-18 11:19:15 -04:00
3. An editor will open up that allows you to temporarily change the grub options for the next boot.
2016-09-15 14:07:58 -04:00
2016-09-18 11:19:15 -04:00
4. Press the down arrow key and move the cursor to the line after the line with the kernel options. The line with the kernel options will look like this:
2016-09-15 14:07:58 -04:00
2016-09-17 20:19:42 -04:00
~~~
module /vmlinux-4.1.13-9.pvops.qubes.x86_64 placeholder root=/dev/mapper/qubes_dom0-root ro ... rhgb quiet
~~~
2016-09-18 11:19:15 -04:00
2016-09-18 11:38:57 -04:00
It is not an exact copy as it may differ from system to system.
2016-09-15 14:07:58 -04:00
2017-05-11 20:12:02 -04:00
Please note: choose the module that starts with `vmlinux` !
2016-09-15 14:07:58 -04:00
2016-09-17 20:19:42 -04:00
5. Press the left/right arrow keys to position the cursor at the end of kernel options line, after `rhgb quiet` in this case.
2016-09-15 14:07:58 -04:00
2016-09-17 20:19:42 -04:00
6. Add the following:
2016-09-15 14:07:58 -04:00
2016-09-17 20:19:42 -04:00
~~~
nouveau.modeset=0 rd.driver.blacklist=nouveau video=vesa:off
~~~
2016-09-15 14:07:58 -04:00
2017-05-11 20:12:02 -04:00
This will temporarily disable nouveau until next boot.
2016-09-15 14:07:58 -04:00
2016-09-17 20:19:42 -04:00
7. Press either the F10 key or Ctrl+X to start the boot process.
2016-09-15 14:07:58 -04:00
2016-09-17 20:19:42 -04:00
Qubes should now boot properly, if that's the case then we should make this change permanent such that the GRUB config knows to not run nouveau.
2016-09-15 14:07:58 -04:00
2016-09-18 11:38:57 -04:00
You'll have to do the following to make this change persistent, so that it will work properly on every boot :
2016-09-15 14:07:58 -04:00
2016-09-18 11:19:15 -04:00
1. Open a terminal (do this by clicking on Q > 'run command' > type 'terminal' and hit enter)
2016-09-15 14:07:58 -04:00
2016-09-17 20:19:42 -04:00
2. type following commands:
~~~
cd /etc/default/
sudo nano grub
~~~
3. Edit `GRUB_CMDLINE_LINUX` , add the following to it at the end:
~~~
nouveau.modeset=0 rd.driver.blacklist=nouveau video=vesa:off
~~~
4. ctrl + X and then y to save the file.
5. The final step is to compile the configuration file to something the bootloader can read.
~~~
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
~~~
2016-09-15 14:07:58 -04:00