From a13190b7eaa95fe77326b081e4280923f84526f8 Mon Sep 17 00:00:00 2001 From: PROTechThor Date: Fri, 30 Oct 2020 16:26:50 +0100 Subject: [PATCH 1/2] Add Nvidia Troubleshooting --- doc.md | 16 +--- .../install-nvidia-driver.md | 40 +-------- .../troubleshooting/nvidia-troubleshooting.md | 86 ++++++++++++++++--- user/troubleshooting/remove-vm-manually.md | 36 -------- 4 files changed, 80 insertions(+), 98 deletions(-) rename {user/troubleshooting => external/configuration-guides}/install-nvidia-driver.md (61%) rename {user => external}/troubleshooting/nvidia-troubleshooting.md (52%) delete mode 100644 user/troubleshooting/remove-vm-manually.md diff --git a/doc.md b/doc.md index 97581ee9..1ed52cf0 100644 --- a/doc.md +++ b/doc.md @@ -263,6 +263,7 @@ For more, please see [Qubes Community Documentation](https://github.com/Qubes-Co * [Rxvt Guide](/doc/rxvt/) * [Adding SSD storage cache](https://groups.google.com/d/msgid/qubes-users/a08359c9-9eb0-4d1a-ad92-a8a9bc676ea6%40googlegroups.com) * [How to Make a Multimedia TemplateVM](/doc/multimedia/) + * [How to install an Nvidia driver in dom0](/doc/install-nvidia-driver/) ### Customization Guides @@ -272,22 +273,9 @@ For more, please see [Qubes Community Documentation](https://github.com/Qubes-Co * [Dark Theme in Dom0 and DomU](/doc/dark-theme/) * [Safely Removing TemplateVM Packages (Example: Thunderbird)](/doc/removing-templatevm-packages/) - ### Troubleshooting - - * [Installing on system with new AMD GPU (missing firmware problem)](https://groups.google.com/group/qubes-devel/browse_thread/thread/e27a57b0eda62f76) - * [How to install an Nvidia driver in dom0](/doc/install-nvidia-driver/) - * [Nvidia troubleshooting guide](/doc/nvidia-troubleshooting/) - * [Lenovo ThinkPad Troubleshooting](/doc/thinkpad-troubleshooting/) - * [Apple MacBook Troubleshooting](/doc/macbook-troubleshooting/) - * [Getting Sony Vaio Z laptop to work with Qubes](/doc/sony-vaio-tinkering/) - * [Intel Integrated Graphics Troubleshooting](/doc/intel-igfx-troubleshooting/) - - ### Troubleshooting - + * [Nvidia Troubleshooting](/doc/nvidia-troubleshooting/) * [Installing on system with new AMD GPU (missing firmware problem)](https://groups.google.com/group/qubes-devel/browse_thread/thread/e27a57b0eda62f76) - * [How to install an Nvidia driver in dom0](/doc/install-nvidia-driver/) - * [Nvidia troubleshooting guide](/doc/nvidia-troubleshooting/) * [Lenovo ThinkPad Troubleshooting](/doc/thinkpad-troubleshooting/) * [Apple MacBook Troubleshooting](/doc/macbook-troubleshooting/) * [Getting Sony Vaio Z laptop to work with Qubes](/doc/sony-vaio-tinkering/) diff --git a/user/troubleshooting/install-nvidia-driver.md b/external/configuration-guides/install-nvidia-driver.md similarity index 61% rename from user/troubleshooting/install-nvidia-driver.md rename to external/configuration-guides/install-nvidia-driver.md index 97b88269..d9b65ac4 100644 --- a/user/troubleshooting/install-nvidia-driver.md +++ b/external/configuration-guides/install-nvidia-driver.md @@ -135,43 +135,7 @@ mv /root/xorg.conf.new /etc/X11/xorg.conf Reboot to verify all this works. -# Troubleshooting lack of video output during installation +## Troubleshooting lack of video output during installation -Specifically, the notes below are aimed to help when the GRUB menu shows up fine, the installation environment starts loading, and then the display(s) go into standby mode. This is, typically, related to some sort of an issue with the kernel's KMS/video card modules. +The GRUB menu may show up fine, the installation environment starts loading, and then the display(s) go into standby mode. This is, typically, related to some sort of an issue with the kernel's KMS/video card modules. See the [Nvidia Troubleshooting](/doc/nvidia-troubleshooting/#lack-of-video-output-during-nvidia-driver-installation) guide for troubleshooting steps. -## Initial setup. -*Note*: The steps below do *not* produce a fully-functional Qubes OS install. Rather, only a dom0 instance is functional, and there is no networking there. However, they can be used to gather data in order to troubleshoot video card issues and/or possible other basic kernel module issues. - -1. Append `nomodeset ip=dhcp inst.nokill inst.vnc` to the kernel command line. Remove `rhgb` and `quiet` to see the kernel messages scroll by, which may help in further diagnostics. - * If DHCP is not available on the installation network, the syntax becomes a bit more involved. The full list of variants is documented in the [Dracut Command-line parameters] (http://man7.org/linux/man-pages/man7/dracut.cmdline.7.html) -2. The VGA console should switch into the installer's multi-virtual-terminal display. VNC may take a number of minutes to start, please be patient. - * Using the anaconda installer interface, switch to the "shell" TTY (ALT-F2), and use `ip a` command to display the IP addresses. -3. Using the Connect to the IP (remember the :1) using a VNC viewer. -4. Follow the installation UI. - * Since this won't be a usable install, skipping LUKS encryption is an option which will simplify this troubleshooting process. - * Do *not* reboot at the end of the installation. -5. Once the installation completes, use the local VGA console switch to TTY2 via ALT-F2 - * Switch to the chroot of the newly-installed system via `chroot /mnt/sysinstall` - * Set the root password (this will also enable the root account login) - * Double-check that `/boot/grub2/grub.cfg` contains a `nomodeset` kernel parameter. - * Exit out of the chroot environment (`exit` or CTRL-D) -6. Reboot - -*Note* If the kernel parameters do *not* include `quiet` and `rhgb`, the kernel messages can easily obscure the LUKS passphrase prompt. Additionally, each character entered will cause the LUKS passphrase prompt to repeat onto next line. Both of these are cosmetic. The trade-off between kernel messages and the easy-to-spot LUKS passphrase prompt is left as an exercise to the user. - -## Gather initial `dmesg` output -If all is well, the newly-installed Qubes OS instance should allow for user root to log in. -Run `dmesg > dmesg.nomodeset.out` to gather an initial dmesg output. - -## Gather the 'video no worky' `dmesg` output -1. Reboot and interrupt the Grub2's process, modifying the kernel parameters to no longer contain `nomodeset`. - * If the LUKS passphrase was set, blindly enter it. -2. Wait for the system to finish booting (about 5 minutes, typically). -3. Blindly switch to a TTY via CTRL-ALT-F2. -4. Blindly log in as user root -5. Blindly run `dmesg > dmesg.out` -6. Blindly run `reboot` (this will also serve to confirm that logging in as root, and running commands blindly is possible rather than, say, the kernel having hung or some such). - * Should this step fail, perhaps by the time step #3 was undertaken, the OS hasn't finished coming up yet. Please retry, possibly with a different TTY (say, 3 or 4 - so CTRL-ALT-F3?) - -## Exfiltrate the dmesg outputs -Allow the system to boot normally, log in as user root, and sneakernet the files off the system for analysis, review, bug logging, et cetera. diff --git a/user/troubleshooting/nvidia-troubleshooting.md b/external/troubleshooting/nvidia-troubleshooting.md similarity index 52% rename from user/troubleshooting/nvidia-troubleshooting.md rename to external/troubleshooting/nvidia-troubleshooting.md index af54891a..70dce192 100644 --- a/user/troubleshooting/nvidia-troubleshooting.md +++ b/external/troubleshooting/nvidia-troubleshooting.md @@ -8,21 +8,20 @@ redirect_from: - /wiki/NvidiaTroubleshooting/ --- -NVidia Troubleshooting Guide -============================ +# 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". +## System freezes during boot / Graphical login manager is not visible -Boot in failsafe ---------------------- +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 workaround so that you should be able to use your NVidia with X under Xen, however without any fancy "desktop effects". + +### Boot in failsafe Boot your system using the "failsafe" boot menu, that should have been automatically added to your `grub.conf` when you installed the Dom0 kernel. 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. -Configure X with nouveau ---------------------- +### Configure X with nouveau Assuming your X Window System works fine now when you booted from the "failsafe" configuration, do the next steps... @@ -78,14 +77,15 @@ Assuming your X Window System works fine now when you booted from the "failsafe" 8. Reboot and let the system boot from the normal boot configuration. You should be able to use X under Xen now. +## Boot failure after GRUB menu / System freezes followed by reboot -Disabling Nouveau ---------------------- 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. One way to get rid of this for now is to disable nouveau. -Example error +### Disabling Nouveau + +Example error: ~~~ nouveau E[ PGRAPH][0000:01:00.0] grctx template channel unload timeout @@ -97,6 +97,32 @@ Tip: In case you only have an external monitor it is advised to attach it direct 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. +#### EFI + + 1. Open a terminal in dom0. + + 2. To edit the `xen.cfg` file using the `nano` editor: + + ~~~ + sudo nano /boot/efi/EFI/qubes/xen.cfg + ~~~ + + 3. Locate the three `kernel=` lines. Press the left/right arrow keys to position the cursor at the end of the lines, after `rhgb quiet`. + + 4. Add the following: + + ~~~ + nouveau.modeset=0 rd.driver.blacklist=nouveau video=vesa:off + ~~~ + + This will temporarily disable nouveau until next boot. + + 5. Press either the `Ctrl+X` keys, then `y` to save changes. + + 6. Reboot + +#### GRUB + 1. Verify that that GRUB Boot Menu is displaying, you should be presented with two options and a progressbar/timer than goes rather fast. ~~~ @@ -157,3 +183,43 @@ You'll have to do the following to make this change persistent, so that it will sudo grub2-mkconfig -o /boot/grub2/grub.cfg ~~~ +## Lack of video output during Nvidia driver installation + +Specifically, the notes below are aimed to help when during Nvidia driver installation, the GRUB menu shows up fine, the installation environment starts loading, and then the display(s) go into standby mode. This is, typically, related to some sort of an issue with the kernel's KMS/video card modules. + +### Initial setup. +*Note*: The steps below do *not* produce a fully-functional Qubes OS install. Rather, only a dom0 instance is functional, and there is no networking there. However, they can be used to gather data in order to troubleshoot video card issues and/or possible other basic kernel module issues. + +1. Append `nomodeset ip=dhcp inst.nokill inst.vnc` to the kernel command line. Remove `rhgb` and `quiet` to see the kernel messages scroll by, which may help in further diagnostics. + * If DHCP is not available on the installation network, the syntax becomes a bit more involved. The full list of variants is documented in the [Dracut Command-line parameters] (http://man7.org/linux/man-pages/man7/dracut.cmdline.7.html) +2. The VGA console should switch into the installer's multi-virtual-terminal display. VNC may take a number of minutes to start, please be patient. + * Using the anaconda installer interface, switch to the "shell" TTY (ALT-F2), and use `ip a` command to display the IP addresses. +3. Using the Connect to the IP (remember the :1) using a VNC viewer. +4. Follow the installation UI. + * Since this won't be a usable install, skipping LUKS encryption is an option which will simplify this troubleshooting process. + * Do *not* reboot at the end of the installation. +5. Once the installation completes, use the local VGA console switch to TTY2 via ALT-F2 + * Switch to the chroot of the newly-installed system via `chroot /mnt/sysinstall` + * Set the root password (this will also enable the root account login) + * Double-check that `/boot/grub2/grub.cfg` contains a `nomodeset` kernel parameter. + * Exit out of the chroot environment (`exit` or CTRL-D) +6. Reboot + +*Note* If the kernel parameters do *not* include `quiet` and `rhgb`, the kernel messages can easily obscure the LUKS passphrase prompt. Additionally, each character entered will cause the LUKS passphrase prompt to repeat onto next line. Both of these are cosmetic. The trade-off between kernel messages and the easy-to-spot LUKS passphrase prompt is left as an exercise to the user. + +### Gather initial `dmesg` output +If all is well, the newly-installed Qubes OS instance should allow for user root to log in. +Run `dmesg > dmesg.nomodeset.out` to gather an initial dmesg output. + +### Gather the 'video no worky' `dmesg` output +1. Reboot and interrupt the Grub2's process, modifying the kernel parameters to no longer contain `nomodeset`. + * If the LUKS passphrase was set, blindly enter it. +2. Wait for the system to finish booting (about 5 minutes, typically). +3. Blindly switch to a TTY via CTRL-ALT-F2. +4. Blindly log in as user root +5. Blindly run `dmesg > dmesg.out` +6. Blindly run `reboot` (this will also serve to confirm that logging in as root, and running commands blindly is possible rather than, say, the kernel having hung or some such). + * Should this step fail, perhaps by the time step #3 was undertaken, the OS hasn't finished coming up yet. Please retry, possibly with a different TTY (say, 3 or 4 - so CTRL-ALT-F3?) + +### Exfiltrate the dmesg outputs +Allow the system to boot normally, log in as user root, and sneakernet the files off the system for analysis, review, bug logging, et cetera. diff --git a/user/troubleshooting/remove-vm-manually.md b/user/troubleshooting/remove-vm-manually.md deleted file mode 100644 index fbc1c145..00000000 --- a/user/troubleshooting/remove-vm-manually.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -layout: doc -title: How to Remove VMs Manually -permalink: /doc/remove-vm-manually/ ---- - -How to Remove VMs Manually -========================== - -How to Remove a TemplateVM Manually ------------------------------------ - -Try the [normal method] before resorting to this. -All of the following commands should be executed in a dom0 terminal. - -When a template is marked as 'installed by package manager', but cannot be uninstalled there, trying to uninstall manually will result in the error "ERROR: VM installed by package manager: template-vm-name". Do as follows to be able to uninstall the template: - -1. Check the state of `installed_by_rpm` - - $ qvm-prefs template-vm-name - -2. If `installed_by_rpm - True]`, mark the template as not installed by package manager - - $ qvm-prefs template-vm-name installed_by_rpm false - -3. Re-check the state of `installed_by_rpm` - -- If `installed_by_rpm - False`, remove the template like you would a regular qube: - - $ qvm-remove template-vm-name - -- If `installed_by_rpm` remains `True`, reboot your computer to bring qubes.xml in sync with qubesd, and try again to remove the template. - - -[normal method]: /doc/templates/#uninstalling - From 56ec6c2a0458e34afded621b54624093222059fe Mon Sep 17 00:00:00 2001 From: Enjeck Cleopatra <32180937+PROTechThor@users.noreply.github.com> Date: Sun, 1 Nov 2020 08:35:33 +0100 Subject: [PATCH 2/2] Update nvidia-troubleshooting.md --- external/troubleshooting/nvidia-troubleshooting.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/external/troubleshooting/nvidia-troubleshooting.md b/external/troubleshooting/nvidia-troubleshooting.md index 70dce192..ddd922f5 100644 --- a/external/troubleshooting/nvidia-troubleshooting.md +++ b/external/troubleshooting/nvidia-troubleshooting.md @@ -115,9 +115,9 @@ If you're seeing this error then that means another graphics card (most likely a nouveau.modeset=0 rd.driver.blacklist=nouveau video=vesa:off ~~~ - This will temporarily disable nouveau until next boot. + This will disable nouveau until the option is manually edited back to its original state. - 5. Press either the `Ctrl+X` keys, then `y` to save changes. + 5. Press the `Ctrl+X` keys, then `y` to save changes. 6. Reboot