From e73ae9a342f0359723ac6b929dbc88f824156a34 Mon Sep 17 00:00:00 2001 From: PROTechThor Date: Sat, 10 Oct 2020 09:50:00 +0100 Subject: [PATCH 01/25] Replace wireless troubleshooting with resume/suspend troubleshooting --- doc.md | 8 +++++-- .../resume-suspend-troubleshooting.md | 22 +++++++++++-------- 2 files changed, 19 insertions(+), 11 deletions(-) rename external/troubleshooting/wireless-troubleshooting.md => user/troubleshooting/resume-suspend-troubleshooting.md (83%) diff --git a/doc.md b/doc.md index df16c6ed..ce3d6589 100644 --- a/doc.md +++ b/doc.md @@ -135,13 +135,18 @@ Core documentation for Qubes users. * [Making Any File Persistent Using `bind-dirs`](/doc/bind-dirs/) * [GUI Configuration](/doc/gui-configuration/) * [Resizing Disk Images](/doc/resize-disk-image/) - * [Troubleshooting UEFI](/doc/uefi-troubleshooting/) * [Troubleshooting Newer Hardware](/doc/newer-hardware-troubleshooting/) * [Mounting and Decrypting Qubes Partitions from Outside Qubes](/doc/mount-from-other-os/) * [KDE](/doc/kde/) * [i3 Window Manager](/doc/i3/) * [awesome Window Manager](/doc/awesome/) +### Troubleshooting + + * [Installation Troubleshooting](/doc/installation-troubleshooting/) + * [UEFI Troubleshooting](/doc/uefi-troubleshooting/) + * [Suspend/Resume Troubleshooting](/doc/suspend-resume-troubleshooting/) + ### Reference Pages * [Command-line Tools](/doc/tools/) @@ -294,7 +299,6 @@ Unofficial, third-party documentation from the Qubes community and others. * [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/) - * [Fixing wireless on suspend & resume](/doc/wireless-troubleshooting/) * [How to remove VMs manually](/doc/remove-vm-manually/) * [Intel Integrated Graphics Troubleshooting](/doc/intel-igfx-troubleshooting/) diff --git a/external/troubleshooting/wireless-troubleshooting.md b/user/troubleshooting/resume-suspend-troubleshooting.md similarity index 83% rename from external/troubleshooting/wireless-troubleshooting.md rename to user/troubleshooting/resume-suspend-troubleshooting.md index 9c8ea33d..124465d3 100644 --- a/external/troubleshooting/wireless-troubleshooting.md +++ b/user/troubleshooting/resume-suspend-troubleshooting.md @@ -1,19 +1,18 @@ --- layout: doc -title: Wireless Troubleshooting -permalink: /doc/wireless-troubleshooting/ +title: Suspend/Resume Troubleshooting +permalink: /doc/suspend-resume-troubleshooting/ redirect_from: - /en/doc/wireless-troubleshooting/ +- /doc/wireless-troubleshooting/ --- -Wireless Troubleshooting Guide -============================== +# Troubleshooting problems relating to suspend/resume # + +## Network-Manager says “Device not ready” after suspend/resume ## These instructions may help with suspend/resume issues for more devices than just wireless cards, that is just the (unfortunately not uncommon) example used here. -Resetting wireless cards by reloading drivers ---------------------------------------------- - If your wireless card works, but after suspending and resuming your computer, the Network-Manager applet just says "Device not ready", then try un-loading and re-loading the driver. ### Determining your wireless card driver ### @@ -104,8 +103,7 @@ depends: cfg80211 [user@sys-net ~]$ sudo modprobe iwlmvm ~~~ -Automatically reloading drivers on suspend/resume -------------------------------------------------- +## Drivers do not reload automatically on suspend/resume ## If reloading the driver (which resets the hardware into a known-state) resolves your issue when done manually, you can have Qubes automatically un/reload them on suspend & resume by listing the relevant modules in `/rw/config/suspend-module-blacklist`. @@ -119,3 +117,9 @@ In the above example, it would look like this: iwlmvm iwlwifi ~~~ + +## Power consumption increases after suspend/resume ## + +This problem is related to the software method used to disable sibling threads and how it interacts with suspend/resume. +To solve the problem, disable hyperthreading in the BIOS. This [external guide](https://www.pcmag.com/news/how-to-disable-hyperthreading) explains how to disable hyperthreading. +Since Qubes does disable hyperthreading by default (by not using secondary threads), you won't pay any performance cost. From 49963f6e5598e4fc819eba84b7fbe7f5ee6b8c98 Mon Sep 17 00:00:00 2001 From: Enjeck Cleopatra <32180937+PROTechThor@users.noreply.github.com> Date: Sat, 10 Oct 2020 09:55:22 +0100 Subject: [PATCH 02/25] Minor word change --- user/troubleshooting/resume-suspend-troubleshooting.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user/troubleshooting/resume-suspend-troubleshooting.md b/user/troubleshooting/resume-suspend-troubleshooting.md index 124465d3..4844ccae 100644 --- a/user/troubleshooting/resume-suspend-troubleshooting.md +++ b/user/troubleshooting/resume-suspend-troubleshooting.md @@ -9,7 +9,7 @@ redirect_from: # Troubleshooting problems relating to suspend/resume # -## Network-Manager says “Device not ready” after suspend/resume ## +## Network-Manager says “Device not ready” on suspend/resume ## These instructions may help with suspend/resume issues for more devices than just wireless cards, that is just the (unfortunately not uncommon) example used here. @@ -118,7 +118,7 @@ iwlmvm iwlwifi ~~~ -## Power consumption increases after suspend/resume ## +## Power consumption increases on suspend/resume ## This problem is related to the software method used to disable sibling threads and how it interacts with suspend/resume. To solve the problem, disable hyperthreading in the BIOS. This [external guide](https://www.pcmag.com/news/how-to-disable-hyperthreading) explains how to disable hyperthreading. From 24c86d459c1bbc29dc34267a226522e0f2bf6a1c Mon Sep 17 00:00:00 2001 From: PROTechThor Date: Sat, 10 Oct 2020 11:02:41 +0100 Subject: [PATCH 03/25] Add VM Troubleshooting --- doc.md | 10 ++- .../troubleshooting/remove-vm-manually.md | 36 ---------- .../managing-vm-kernel.md | 7 +- user/managing-os/debian/debian.md | 12 +--- user/troubleshooting/vm-troubleshooting.md | 70 +++++++++++++++++++ 5 files changed, 79 insertions(+), 56 deletions(-) delete mode 100644 external/troubleshooting/remove-vm-manually.md create mode 100644 user/troubleshooting/vm-troubleshooting.md diff --git a/doc.md b/doc.md index df16c6ed..9e3600e5 100644 --- a/doc.md +++ b/doc.md @@ -135,13 +135,19 @@ Core documentation for Qubes users. * [Making Any File Persistent Using `bind-dirs`](/doc/bind-dirs/) * [GUI Configuration](/doc/gui-configuration/) * [Resizing Disk Images](/doc/resize-disk-image/) - * [Troubleshooting UEFI](/doc/uefi-troubleshooting/) * [Troubleshooting Newer Hardware](/doc/newer-hardware-troubleshooting/) * [Mounting and Decrypting Qubes Partitions from Outside Qubes](/doc/mount-from-other-os/) * [KDE](/doc/kde/) * [i3 Window Manager](/doc/i3/) * [awesome Window Manager](/doc/awesome/) +### Troubleshooting + + * [Installation Troubleshooting](/doc/installation-troubleshooting/) + * [UEFI Troubleshooting](/doc/uefi-troubleshooting/) + * [Suspend/Resume Troubleshooting](/doc/suspend-resume-troubleshooting/) + * [VM Troubleshooting](/doc/vm-troubleshooting/) + ### Reference Pages * [Command-line Tools](/doc/tools/) @@ -294,8 +300,6 @@ Unofficial, third-party documentation from the Qubes community and others. * [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/) - * [Fixing wireless on suspend & resume](/doc/wireless-troubleshooting/) - * [How to remove VMs manually](/doc/remove-vm-manually/) * [Intel Integrated Graphics Troubleshooting](/doc/intel-igfx-troubleshooting/) ### Building Guides diff --git a/external/troubleshooting/remove-vm-manually.md b/external/troubleshooting/remove-vm-manually.md deleted file mode 100644 index fbc1c145..00000000 --- a/external/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 - diff --git a/user/advanced-configuration/managing-vm-kernel.md b/user/advanced-configuration/managing-vm-kernel.md index 42dbd75d..c8948b37 100644 --- a/user/advanced-configuration/managing-vm-kernel.md +++ b/user/advanced-configuration/managing-vm-kernel.md @@ -355,12 +355,7 @@ The output should look like this: #### Troubleshooting -In case of problems, you can access the VM console using `qvm-console-dispvm VMNAME` in dom0, then access the GRUB menu. -You need to call it just after starting the VM (until `GRUB_TIMEOUT` expires); for example, in a separate dom0 terminal window. - -In any case you can later access the VM's logs (especially the VM console log `/var/log/xen/console/guest-VMNAME.log`). - -You can always set the kernel back to some dom0-provided value to fix a VM kernel installation. +In case of problems, visit the [VM Troubleshooting guide](/doc/vm-troubleshooting/#vm-kernel-troubleshooting) to learn how to access the VM console, view logs and fix a VM kernel installation. [dom0-kernel-upgrade]: /doc/software-update-dom0/#kernel-upgrade diff --git a/user/managing-os/debian/debian.md b/user/managing-os/debian/debian.md index 236c2d8e..a688e87e 100644 --- a/user/managing-os/debian/debian.md +++ b/user/managing-os/debian/debian.md @@ -99,17 +99,7 @@ The lesson is that you should carefully look at what is being installed to your ### Package installation errors in Qubes 4.0 -By default, templates in 4.0 only have a loopback interface. - -Some packages will throw an error on installation in this situation. -For example, Samba expects to be configured using a network interface post installation. - -One solution is to add a dummy interface to allow the package to install correctly: - - ip link add d0 type dummy - ip addr add 192.168.0.1/24 dev d0 - ip link set d0 up - +If some packages throw installation errors, see [this guide.](/doc/vm-troubleshooting/#fixing-package-installation-errors) [TemplateVM]: /doc/templates/ [Minimal TemplateVMs]: /doc/templates/minimal/ diff --git a/user/troubleshooting/vm-troubleshooting.md b/user/troubleshooting/vm-troubleshooting.md new file mode 100644 index 00000000..ece7b968 --- /dev/null +++ b/user/troubleshooting/vm-troubleshooting.md @@ -0,0 +1,70 @@ +--- +layout: doc +title: Suspend/Resume Troubleshooting +permalink: /doc/vm-troubleshooting/ +redirect_from: +- /doc/remove-vm-manually/ +--- + +# VM troubleshooting # + +## VM Kernel troubleshooting ## + +In case of problems, you can access the VM console using `qvm-console-dispvm VMNAME` in dom0, then access the GRUB menu. +You need to call it just after starting the VM (until `GRUB_TIMEOUT` expires); for example, in a separate dom0 terminal window. + +In any case you can later access the VM's logs (especially the VM console log `/var/log/xen/console/guest-VMNAME.log`). + +You can always set the kernel back to some dom0-provided value to fix a VM kernel installation. + +## Qubes starts, but no VMs load ## + +This issue may occur if a dom0 update is interrupted halfway through and/or a hard power off is done without shutting down Qubes, which results in files getting corrupted. +In this case, the best fix is to reinstall Qubes and restore your files from a backup. +Even if you have not backed up data in a while, you should be able to mount the volumes to pull data from them. + +## Can not uninstall a VM / “ERROR: VM installed by package manager: template-vm-name” + +Try the [normal method] before resorting to this method to remove a VM manually. +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 + + +## Fixing package installation errors ## + +By default, templates in 4.0 only have a loopback interface. + +Some packages will throw an error on installation in this situation. +For example, Samba expects to be configured using a network interface post installation. + +One solution is to add a dummy interface to allow the package to install correctly: + + ip link add d0 type dummy + ip addr add 192.168.0.1/24 dev d0 + ip link set d0 up + +## "Cannot connect to qrexec agent" error ## + +If you face this error when starting a VM, it may be due to too little initial memory. +A solution is to increase the initial memory from 200MB to 400MB by navigating to VM settings » Advanced » Initial memory. + From 2ca7c01b74ba38e469bfa0411af66a1e3ed4d9be Mon Sep 17 00:00:00 2001 From: PROTechThor Date: Sat, 10 Oct 2020 11:50:35 +0100 Subject: [PATCH 04/25] Add HVM Troubleshooting --- doc.md | 11 +++- external/os-guides/linux-hvm-tips.md | 36 +----------- user/troubleshooting/hvm-troubleshooting.md | 64 +++++++++++++++++++++ 3 files changed, 73 insertions(+), 38 deletions(-) create mode 100644 user/troubleshooting/hvm-troubleshooting.md diff --git a/doc.md b/doc.md index df16c6ed..9a65323f 100644 --- a/doc.md +++ b/doc.md @@ -135,13 +135,20 @@ Core documentation for Qubes users. * [Making Any File Persistent Using `bind-dirs`](/doc/bind-dirs/) * [GUI Configuration](/doc/gui-configuration/) * [Resizing Disk Images](/doc/resize-disk-image/) - * [Troubleshooting UEFI](/doc/uefi-troubleshooting/) * [Troubleshooting Newer Hardware](/doc/newer-hardware-troubleshooting/) * [Mounting and Decrypting Qubes Partitions from Outside Qubes](/doc/mount-from-other-os/) * [KDE](/doc/kde/) * [i3 Window Manager](/doc/i3/) * [awesome Window Manager](/doc/awesome/) +### Troubleshooting + + * [Installation Troubleshooting](/doc/installation-troubleshooting/) + * [UEFI Troubleshooting](/doc/uefi-troubleshooting/) + * [Suspend/Resume Troubleshooting](/doc/suspend-resume-troubleshooting/) + * [VM Troubleshooting](/doc/vm-troubleshooting/) + * [HVM Troubleshooting](/doc/hvm-troubleshooting/) + ### Reference Pages * [Command-line Tools](/doc/tools/) @@ -294,8 +301,6 @@ Unofficial, third-party documentation from the Qubes community and others. * [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/) - * [Fixing wireless on suspend & resume](/doc/wireless-troubleshooting/) - * [How to remove VMs manually](/doc/remove-vm-manually/) * [Intel Integrated Graphics Troubleshooting](/doc/intel-igfx-troubleshooting/) ### Building Guides diff --git a/external/os-guides/linux-hvm-tips.md b/external/os-guides/linux-hvm-tips.md index c1c99fa3..4bf5dde3 100644 --- a/external/os-guides/linux-hvm-tips.md +++ b/external/os-guides/linux-hvm-tips.md @@ -14,41 +14,7 @@ Tips for Linux in HVM domain How to fix bootup kernel error ------------------------------- -The HVM may pause on boot, showing a fixed cursor. -After a while a series of warnings may be shown similar to this: - - BUG: soft lockup - CPU#0 stuck for 23s! [systemd-udevd:244] - -To fix this: - -1. Kill the HVM. -1. Start the HVM -1. Press "e" at the grub screen to edit the boot parameters -1. Find the /vmlinuz line, and edit it to replace "rhgb" with "modprobe.blacklist=bochs_drm" -1. Press "Ctrl-x" to start the HVM - -If this solves the problem then you will want to make the change permanent: - -1. Edit the file `/etc/default/grub`. -1. Find the line which starts: - ~~~ - GRUB_CMDLINE_LINUX= - ~~~ -1. Remove this text from that line: - ~~~ - rhgb - ~~~ -1. Add this text to that line: - ~~~ - modprobe.blacklist=bochs_drm - ~~~ -1. Run this command: - ~~~ - grub2-mkconfig --output=/boot/grub2/grub.cfg - ~~~ - -The HVM should now start normally. - +If the HVM pauses on boot and shows a series of warnings, visit [HVM Troubleshooting](/doc/hvm-troubleshooting/#hvm-pauses-on-boot-followed-by-kernel-error) for a fix. Screen resolution ----------------- diff --git a/user/troubleshooting/hvm-troubleshooting.md b/user/troubleshooting/hvm-troubleshooting.md new file mode 100644 index 00000000..2287ffb3 --- /dev/null +++ b/user/troubleshooting/hvm-troubleshooting.md @@ -0,0 +1,64 @@ +--- +layout: doc +title: HVM Troubleshooting +permalink: /doc/hvm-troubleshooting/ +redirect_from: +- /en/doc/wireless-troubleshooting/ +- /doc/wireless-troubleshooting/ +--- + +# HVM Troubleshooting # + +## HVM pauses on boot, followed by kernel error ## + +The HVM may pause on boot, showing a fixed cursor. +After a while a series of warnings may be shown similar to this: + + BUG: soft lockup - CPU#0 stuck for 23s! [systemd-udevd:244] + +To fix this: + +1. Kill the HVM. +1. Start the HVM +1. Press "e" at the grub screen to edit the boot parameters +1. Find the /vmlinuz line, and edit it to replace "rhgb" with "modprobe.blacklist=bochs_drm" +1. Press "Ctrl-x" to start the HVM + +If this solves the problem then you will want to make the change permanent: + +1. Edit the file `/etc/default/grub`. +1. Find the line which starts: + ~~~ + GRUB_CMDLINE_LINUX= + ~~~ +1. Remove this text from that line: + ~~~ + rhgb + ~~~ +1. Add this text to that line: + ~~~ + modprobe.blacklist=bochs_drm + ~~~ +1. Run this command: + ~~~ + grub2-mkconfig --output=/boot/grub2/grub.cfg + ~~~ + +The HVM should now start normally. + +## Can't start an OS in an HVM / "Probing EDD (edd=off to disable!... ok" message ## + +If you see a screen popup with SeaBios and 4 lines, last one being `Probing EDD (edd=off to disable!... ok`, then enter the following command from a `dom0` prompt: + + qvm-prefs kernel "" + +## HVM crashes when booting from ISO ## +If your HVM crashes when trying to boot an ISO, first ensure that ` qvm-prefs ` is empty, as shown above. +If this doesn't help, then disable memory balancing and set the minimum memory to 2GB. + +You can disable memory-balancing in the settings, under the “Advanced” tab. + +To give the VM a RAM of 2GB, open a terminal in `dom0` and enter: + + qvm-prefs memory 2000 + From 4f36d2534baea93fb29a9bbe53c1965cef2fbbfd Mon Sep 17 00:00:00 2001 From: Enjeck Cleopatra <32180937+PROTechThor@users.noreply.github.com> Date: Sat, 10 Oct 2020 12:25:36 +0100 Subject: [PATCH 05/25] Remove redirects --- user/troubleshooting/hvm-troubleshooting.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/user/troubleshooting/hvm-troubleshooting.md b/user/troubleshooting/hvm-troubleshooting.md index 2287ffb3..7dddd235 100644 --- a/user/troubleshooting/hvm-troubleshooting.md +++ b/user/troubleshooting/hvm-troubleshooting.md @@ -2,9 +2,7 @@ layout: doc title: HVM Troubleshooting permalink: /doc/hvm-troubleshooting/ -redirect_from: -- /en/doc/wireless-troubleshooting/ -- /doc/wireless-troubleshooting/ + --- # HVM Troubleshooting # From 747055c29436a0fc1028414028e89d9c10ac875e Mon Sep 17 00:00:00 2001 From: Enjeck Cleopatra <32180937+PROTechThor@users.noreply.github.com> Date: Sat, 10 Oct 2020 18:10:19 +0100 Subject: [PATCH 06/25] Minor changes --- user/troubleshooting/vm-troubleshooting.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/user/troubleshooting/vm-troubleshooting.md b/user/troubleshooting/vm-troubleshooting.md index ece7b968..5fbbf2a4 100644 --- a/user/troubleshooting/vm-troubleshooting.md +++ b/user/troubleshooting/vm-troubleshooting.md @@ -1,6 +1,6 @@ --- layout: doc -title: Suspend/Resume Troubleshooting +title: VM Troubleshooting permalink: /doc/vm-troubleshooting/ redirect_from: - /doc/remove-vm-manually/ @@ -10,6 +10,8 @@ redirect_from: ## VM Kernel troubleshooting ## +This troubleshoot applies to the non-default kernel choice described in the [Managing VM docs](https://www.qubes-os.org/doc/managing-vm-kernel/#using-kernel-installed-in-the-vm). + In case of problems, you can access the VM console using `qvm-console-dispvm VMNAME` in dom0, then access the GRUB menu. You need to call it just after starting the VM (until `GRUB_TIMEOUT` expires); for example, in a separate dom0 terminal window. @@ -19,9 +21,9 @@ You can always set the kernel back to some dom0-provided value to fix a VM kerne ## Qubes starts, but no VMs load ## -This issue may occur if a dom0 update is interrupted halfway through and/or a hard power off is done without shutting down Qubes, which results in files getting corrupted. -In this case, the best fix is to reinstall Qubes and restore your files from a backup. -Even if you have not backed up data in a while, you should be able to mount the volumes to pull data from them. +First, try to start a particular VM, check any failure message and direct further steps based on that. + +This issue has been seen to occur if a dom0 update is interrupted halfway through and/or a hard power off is done without shutting down Qubes, which results in files getting corrupted. ## Can not uninstall a VM / “ERROR: VM installed by package manager: template-vm-name” @@ -65,6 +67,7 @@ One solution is to add a dummy interface to allow the package to install correct ## "Cannot connect to qrexec agent" error ## -If you face this error when starting a VM, it may be due to too little initial memory. -A solution is to increase the initial memory from 200MB to 400MB by navigating to VM settings » Advanced » Initial memory. +If you face this error when starting a VM, look into the VM logs at `/var/log/xen/console/guest-VMNAME.log`. +Common reasons that may be revealed are: too low memory, corrupted files or a VM crash on startup. +If the error occurs as a result of too little initial memory, increase the initial memory from 200MB to 400MB by navigating to VM settings » Advanced » Initial memory. From ad67bdef1921fa1bca4b8f13e6e407b58008a214 Mon Sep 17 00:00:00 2001 From: Enjeck Cleopatra <32180937+PROTechThor@users.noreply.github.com> Date: Sat, 10 Oct 2020 18:25:17 +0100 Subject: [PATCH 07/25] Rearrange section links --- doc.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc.md b/doc.md index 9e3600e5..787379cc 100644 --- a/doc.md +++ b/doc.md @@ -135,6 +135,7 @@ Core documentation for Qubes users. * [Making Any File Persistent Using `bind-dirs`](/doc/bind-dirs/) * [GUI Configuration](/doc/gui-configuration/) * [Resizing Disk Images](/doc/resize-disk-image/) + * [Troubleshooting UEFI](/doc/uefi-troubleshooting/) * [Troubleshooting Newer Hardware](/doc/newer-hardware-troubleshooting/) * [Mounting and Decrypting Qubes Partitions from Outside Qubes](/doc/mount-from-other-os/) * [KDE](/doc/kde/) @@ -143,9 +144,6 @@ Core documentation for Qubes users. ### Troubleshooting - * [Installation Troubleshooting](/doc/installation-troubleshooting/) - * [UEFI Troubleshooting](/doc/uefi-troubleshooting/) - * [Suspend/Resume Troubleshooting](/doc/suspend-resume-troubleshooting/) * [VM Troubleshooting](/doc/vm-troubleshooting/) ### Reference Pages @@ -300,6 +298,7 @@ Unofficial, third-party documentation from the Qubes community and others. * [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/) + * [Fixing wireless on suspend & resume](/doc/wireless-troubleshooting/) * [Intel Integrated Graphics Troubleshooting](/doc/intel-igfx-troubleshooting/) ### Building Guides From dee255455555dba8a73ea2ebdf493a8b8f6710b6 Mon Sep 17 00:00:00 2001 From: Enjeck Cleopatra <32180937+PROTechThor@users.noreply.github.com> Date: Sat, 10 Oct 2020 18:32:18 +0100 Subject: [PATCH 08/25] Add "kernel" word --- user/troubleshooting/hvm-troubleshooting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/troubleshooting/hvm-troubleshooting.md b/user/troubleshooting/hvm-troubleshooting.md index 7dddd235..63ef9870 100644 --- a/user/troubleshooting/hvm-troubleshooting.md +++ b/user/troubleshooting/hvm-troubleshooting.md @@ -51,7 +51,7 @@ If you see a screen popup with SeaBios and 4 lines, last one being `Probing EDD qvm-prefs kernel "" ## HVM crashes when booting from ISO ## -If your HVM crashes when trying to boot an ISO, first ensure that ` qvm-prefs ` is empty, as shown above. +If your HVM crashes when trying to boot an ISO, first ensure that ` qvm-prefs kernel` is empty, as shown above. If this doesn't help, then disable memory balancing and set the minimum memory to 2GB. You can disable memory-balancing in the settings, under the “Advanced” tab. From 3b8e054d8179d40cdfc8a128c18fb2bdd1f472e6 Mon Sep 17 00:00:00 2001 From: Enjeck Cleopatra <32180937+PROTechThor@users.noreply.github.com> Date: Sat, 10 Oct 2020 18:35:05 +0100 Subject: [PATCH 09/25] Rearrange index links --- doc.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc.md b/doc.md index 9a65323f..c4e9c80a 100644 --- a/doc.md +++ b/doc.md @@ -135,6 +135,7 @@ Core documentation for Qubes users. * [Making Any File Persistent Using `bind-dirs`](/doc/bind-dirs/) * [GUI Configuration](/doc/gui-configuration/) * [Resizing Disk Images](/doc/resize-disk-image/) + * [Troubleshooting UEFI](/doc/uefi-troubleshooting/) * [Troubleshooting Newer Hardware](/doc/newer-hardware-troubleshooting/) * [Mounting and Decrypting Qubes Partitions from Outside Qubes](/doc/mount-from-other-os/) * [KDE](/doc/kde/) @@ -143,10 +144,6 @@ Core documentation for Qubes users. ### Troubleshooting - * [Installation Troubleshooting](/doc/installation-troubleshooting/) - * [UEFI Troubleshooting](/doc/uefi-troubleshooting/) - * [Suspend/Resume Troubleshooting](/doc/suspend-resume-troubleshooting/) - * [VM Troubleshooting](/doc/vm-troubleshooting/) * [HVM Troubleshooting](/doc/hvm-troubleshooting/) ### Reference Pages @@ -301,6 +298,8 @@ Unofficial, third-party documentation from the Qubes community and others. * [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/) + * [Fixing wireless on suspend & resume](/doc/wireless-troubleshooting/) + * [How to remove VMs manually](/doc/remove-vm-manually/) * [Intel Integrated Graphics Troubleshooting](/doc/intel-igfx-troubleshooting/) ### Building Guides From 7d71d0c86917370faf8f998e4a8b4b2b4b4361a6 Mon Sep 17 00:00:00 2001 From: Enjeck Cleopatra <32180937+PROTechThor@users.noreply.github.com> Date: Sun, 11 Oct 2020 04:42:43 +0100 Subject: [PATCH 10/25] Remove non-existent link --- doc.md | 1 - 1 file changed, 1 deletion(-) diff --git a/doc.md b/doc.md index ce3d6589..18a0e0a8 100644 --- a/doc.md +++ b/doc.md @@ -143,7 +143,6 @@ Core documentation for Qubes users. ### Troubleshooting - * [Installation Troubleshooting](/doc/installation-troubleshooting/) * [UEFI Troubleshooting](/doc/uefi-troubleshooting/) * [Suspend/Resume Troubleshooting](/doc/suspend-resume-troubleshooting/) From afd71051d3c85c2b7f90f85e3cfff9bea77d8e1e Mon Sep 17 00:00:00 2001 From: Enjeck Cleopatra <32180937+PROTechThor@users.noreply.github.com> Date: Sun, 11 Oct 2020 04:43:58 +0100 Subject: [PATCH 11/25] Add hyphen to "hyperthreading" --- user/troubleshooting/resume-suspend-troubleshooting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/troubleshooting/resume-suspend-troubleshooting.md b/user/troubleshooting/resume-suspend-troubleshooting.md index 4844ccae..fec66d85 100644 --- a/user/troubleshooting/resume-suspend-troubleshooting.md +++ b/user/troubleshooting/resume-suspend-troubleshooting.md @@ -121,5 +121,5 @@ iwlwifi ## Power consumption increases on suspend/resume ## This problem is related to the software method used to disable sibling threads and how it interacts with suspend/resume. -To solve the problem, disable hyperthreading in the BIOS. This [external guide](https://www.pcmag.com/news/how-to-disable-hyperthreading) explains how to disable hyperthreading. +To solve the problem, disable hyper-threading in the BIOS. This [external guide](https://www.pcmag.com/news/how-to-disable-hyperthreading) explains how to disable hyper-threading. Since Qubes does disable hyperthreading by default (by not using secondary threads), you won't pay any performance cost. From e5c73616f9b55aad73aa146e60704938d9fc90c5 Mon Sep 17 00:00:00 2001 From: Enjeck Cleopatra <32180937+PROTechThor@users.noreply.github.com> Date: Mon, 12 Oct 2020 05:25:34 +0100 Subject: [PATCH 12/25] Remove space --- doc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc.md b/doc.md index 787379cc..cfab61f9 100644 --- a/doc.md +++ b/doc.md @@ -135,7 +135,7 @@ Core documentation for Qubes users. * [Making Any File Persistent Using `bind-dirs`](/doc/bind-dirs/) * [GUI Configuration](/doc/gui-configuration/) * [Resizing Disk Images](/doc/resize-disk-image/) - * [Troubleshooting UEFI](/doc/uefi-troubleshooting/) + * [Troubleshooting UEFI](/doc/uefi-troubleshooting/) * [Troubleshooting Newer Hardware](/doc/newer-hardware-troubleshooting/) * [Mounting and Decrypting Qubes Partitions from Outside Qubes](/doc/mount-from-other-os/) * [KDE](/doc/kde/) From 01ba1a27d7f93872c7871a01e99007979a4a9904 Mon Sep 17 00:00:00 2001 From: Enjeck Cleopatra <32180937+PROTechThor@users.noreply.github.com> Date: Thu, 15 Oct 2020 08:44:39 +0100 Subject: [PATCH 13/25] Add new section about PCI devices --- user/troubleshooting/resume-suspend-troubleshooting.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/user/troubleshooting/resume-suspend-troubleshooting.md b/user/troubleshooting/resume-suspend-troubleshooting.md index fec66d85..5acacc81 100644 --- a/user/troubleshooting/resume-suspend-troubleshooting.md +++ b/user/troubleshooting/resume-suspend-troubleshooting.md @@ -123,3 +123,12 @@ iwlwifi This problem is related to the software method used to disable sibling threads and how it interacts with suspend/resume. To solve the problem, disable hyper-threading in the BIOS. This [external guide](https://www.pcmag.com/news/how-to-disable-hyperthreading) explains how to disable hyper-threading. Since Qubes does disable hyperthreading by default (by not using secondary threads), you won't pay any performance cost. + +## Attached devices in HVM stop working on suspend/resume ## + +After the whole system gets suspended into S3 sleep and subsequently resumed, some attached devices may stop working. To make the devices work, they should be restarted within the VM. +This can be achieved under a Windows HVM by opening the Device Manager, selecting the actual device (such as a USB controller), 'Disabling' the device, and then 'Enabling' the device again. +This is illustrated on the screenshot below: + +![r2b1-win7-usb-disable.png](/attachment/wiki/HvmCreate/r2b1-win7-usb-disable.png) + From e34f84618600cf737bff8c72ee7d2055164c358c Mon Sep 17 00:00:00 2001 From: Enjeck Cleopatra <32180937+PROTechThor@users.noreply.github.com> Date: Sun, 18 Oct 2020 04:32:16 +0100 Subject: [PATCH 14/25] Add "Windows" word --- user/troubleshooting/resume-suspend-troubleshooting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/troubleshooting/resume-suspend-troubleshooting.md b/user/troubleshooting/resume-suspend-troubleshooting.md index 5acacc81..e16871c6 100644 --- a/user/troubleshooting/resume-suspend-troubleshooting.md +++ b/user/troubleshooting/resume-suspend-troubleshooting.md @@ -124,7 +124,7 @@ This problem is related to the software method used to disable sibling threads a To solve the problem, disable hyper-threading in the BIOS. This [external guide](https://www.pcmag.com/news/how-to-disable-hyperthreading) explains how to disable hyper-threading. Since Qubes does disable hyperthreading by default (by not using secondary threads), you won't pay any performance cost. -## Attached devices in HVM stop working on suspend/resume ## +## Attached devices in Windows HVM stop working on suspend/resume ## After the whole system gets suspended into S3 sleep and subsequently resumed, some attached devices may stop working. To make the devices work, they should be restarted within the VM. This can be achieved under a Windows HVM by opening the Device Manager, selecting the actual device (such as a USB controller), 'Disabling' the device, and then 'Enabling' the device again. From 5138bcaf199096af0a43d39536f071950825f489 Mon Sep 17 00:00:00 2001 From: PROTechThor Date: Sun, 18 Oct 2020 07:24:25 +0100 Subject: [PATCH 15/25] Add Disk Troubleshooting --- doc.md | 4 +- user/troubleshooting/disk-troubleshooting.md | 96 ++++++++++++++++++++ user/troubleshooting/out-of-memory.md | 46 ---------- 3 files changed, 98 insertions(+), 48 deletions(-) create mode 100644 user/troubleshooting/disk-troubleshooting.md delete mode 100644 user/troubleshooting/out-of-memory.md diff --git a/doc.md b/doc.md index 743c6477..37364941 100644 --- a/doc.md +++ b/doc.md @@ -112,7 +112,6 @@ Core documentation for Qubes users. * [Making Any File Persistent Using `bind-dirs`](/doc/bind-dirs/) * [GUI Configuration](/doc/gui-configuration/) * [Resizing Disk Images](/doc/resize-disk-image/) - * [Troubleshooting UEFI](/doc/uefi-troubleshooting/) * [Troubleshooting Newer Hardware](/doc/newer-hardware-troubleshooting/) * [Mounting and Decrypting Qubes Partitions from Outside Qubes](/doc/mount-from-other-os/) * [KDE](/doc/kde/) @@ -122,7 +121,8 @@ Core documentation for Qubes users. ### Troubleshooting * [Installation Troubleshooting](/doc/installation-troubleshooting) - * [Home directory is out of disk space error](/doc/out-of-memory/) + * [UEFI Troubleshooting](/doc/uefi-troubleshooting/) + * [Disk Troubleshooting](/doc/disk-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/) diff --git a/user/troubleshooting/disk-troubleshooting.md b/user/troubleshooting/disk-troubleshooting.md new file mode 100644 index 00000000..d281bdf1 --- /dev/null +++ b/user/troubleshooting/disk-troubleshooting.md @@ -0,0 +1,96 @@ +--- +layout: doc +title: Disk Troubleshooting +permalink: /doc/disk-troubleshooting/ +redirect_from: +- /en/doc/out-of-memory/ +- /doc/OutOfmemory/ +- /wiki/OutOfmemory/ +- /doc/out-of-memory/ +--- + +# Disk Troubleshooting Guide # + +## "Out of disk space" error ## + +VMs (especially templates) use pre-allocated space. +The default private storage max size is 2 GB, but it's very easy to increase as needed. +If the disk is completely full, you will get an `Out of disk space` error that may crash your system because Dom0 does not have enough disk space to work. +So it's good practice to regularly check disk space usage with the command `df -h` in dom0 terminal. + +A system that's out of space should be able to boot, but may be unable to load a desktop manager. +In this case it is possible to login to dom0 terminal with Alt + Ctrl + F2. +To recover disk space it may be possible to delete files in a userVM by connecting to the userVM terminal: + +~~~ +qvm-start +qvm-console-dispvm +~~~ + +If this does not work, check the size of /var/lib/qubes/qubes.xml. +If it is zero, you'll need to use one of the file backup (stored in /var/lib/qubes/backup), hopefully you have the current data there. +Find the most recent one and place in /var/lib/qubes/qubes.xml instead of the empty file. + +In any case you'll need some disk space to start the VM. Check `df -h` output if you have some. +If not, here are some hints how to free some disk space: + +1. Clean yum cache. + + ~~~ + sudo yum clean all + ~~~ + +2. Delete `.img` files of a less important VM, which can be found in `/var/lib/qubes/appvms/`. + Then, when the system is working again, clean up the rest. + + ~~~ + qvm-remove + ~~~ + + With this method, you lose the data of one VM, but it'll work more reliably. + +3. Decrease the filesystem safety margin (5% by default). + + ~~~ + sudo tune2fs -m 4 /dev/mapper/vg_dom0-lv_root + ~~~ + +4. Remove some unneeded files in dom0 home (if you have any, most likely not). + +## Can't resize VM storage / "resize2fs: Permission denied" error ## + +[Resizing a volume](/doc/resize-disk-image/) in the Qubes interface should be a straightforward process. +But sometimes, an attempt to resize will look like it worked, when it in fact fails silently. +If you then try the same operation in the dom0 console using the `qvm-volume extend` command, it fails with the error message: `resize2fs: Permission denied to resize filesystem`. +This error indicates that a `resize2fs` will not work, unless `fsck` is run first. +Qubes OS utilities cannot yet handle this case. + +To fix this issue: + +1. In the dom0 terminal get a root console on the vm (eg. sys-usb) with: + + ~~~ + sudo xl console -t pv sys-usb + ~~~ + +2. Unmount everything mounted on the private volume `/dev/xvdb partition`. +There are typically several mounts listed in `/etc/mtab`. + +3. When you attempt to unmount the `/home` directory using the `umount /home` command, you will encounter an error because there are processes using the `/home` directory. You can view a list of these processes with the `fuser` command: + + ~~~ + fuser -m /home + ~~~ + +Kill these process until they are all gone using `kill `. + +4. Finally, run: + + ~~~ + umount /home + fsck /dev/xvdb + resize2fs /dev/xvdb + ~~~ + +After restarting your VM, everything should now work as expected. +The private volume size shown externally in the VM's settings interface is the same as that seen within the VM. diff --git a/user/troubleshooting/out-of-memory.md b/user/troubleshooting/out-of-memory.md deleted file mode 100644 index 869da993..00000000 --- a/user/troubleshooting/out-of-memory.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -layout: doc -title: Out of Memory -permalink: /doc/out-of-memory/ -redirect_from: -- /en/doc/out-of-memory/ -- /doc/OutOfmemory/ -- /wiki/OutOfmemory/ ---- - -VMs (especially templates) use pre-allocated space. The default private storage max size is 2 GB, but it's very easy to increase as needed. If the disk is completely full, you will get an `Out of disk space` error that may crash your system because Dom0 does not have enough disk space to work. So it's good practice to regularly check disk space usage with the command `df -h` in dom0 terminal. - -A system that's out of space should be able to boot, but may be unable to load a desktop manager. In this case it is possible to login to dom0 terminal with Alt + Ctrl + F2. To recover disk space it may be possible to delete files in a userVM by connecting to the userVM terminal: - -~~~ -qvm-start -qvm-console-dispvm -~~~ - -If this does not work, check the size of /var/lib/qubes/qubes.xml. If it is zero, you'll need to use one of the file backup (stored in /var/lib/qubes/backup), hopefully you have the current data there. Find the most recent one and place in /var/lib/qubes/qubes.xml instead of the empty file. - -In any case you'll need some disk space to start the VM. Check `df -h` output if you have some. If not, here are some hints how to free some disk space: - -1. Clean yum cache. - - ~~~ - sudo yum clean all - ~~~ - -2. Delete `.img` files of a less important VM, which can be found in `/var/lib/qubes/appvms/`. - Then, when the system is working again, clean up the rest. - - ~~~ - qvm-remove - ~~~ - - With this method, you lose the data of one VM, but it'll work more reliably. - -3. Decrease the filesystem safety margin (5% by default). - - ~~~ - sudo tune2fs -m 4 /dev/mapper/vg_dom0-lv_root - ~~~ - -4. Remove some unneeded files in dom0 home (if you have any, most likely not). - From aaf4b691f4fecda2a9108d97f9ea2597a8359cf4 Mon Sep 17 00:00:00 2001 From: Enjeck Cleopatra <32180937+PROTechThor@users.noreply.github.com> Date: Mon, 19 Oct 2020 14:09:42 +0100 Subject: [PATCH 16/25] Delete wireless-troubleshooting.md All the content here is already available at Suspend-resume-troubleshooting.md. Plus, this page should redirect to /doc/suspend-resume-troubleshooting --- .../wireless-troubleshooting.md | 121 ------------------ 1 file changed, 121 deletions(-) delete mode 100644 user/troubleshooting/wireless-troubleshooting.md diff --git a/user/troubleshooting/wireless-troubleshooting.md b/user/troubleshooting/wireless-troubleshooting.md deleted file mode 100644 index 9c8ea33d..00000000 --- a/user/troubleshooting/wireless-troubleshooting.md +++ /dev/null @@ -1,121 +0,0 @@ ---- -layout: doc -title: Wireless Troubleshooting -permalink: /doc/wireless-troubleshooting/ -redirect_from: -- /en/doc/wireless-troubleshooting/ ---- - -Wireless Troubleshooting Guide -============================== - -These instructions may help with suspend/resume issues for more devices than just wireless cards, that is just the (unfortunately not uncommon) example used here. - -Resetting wireless cards by reloading drivers ---------------------------------------------- - -If your wireless card works, but after suspending and resuming your computer, the Network-Manager applet just says "Device not ready", then try un-loading and re-loading the driver. - -### Determining your wireless card driver ### - -First, determine which kernel module corresponds to your wireless card. There are several ways to do this. - -The easiest is via the output of `lspci -k` in your sys-net VM: - -~~~ -[user@sys-net ~]$ lspci -k -00:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a) - Subsystem: Intel Corporation Device 0130 - Kernel driver in use: iwlwifi - Kernel modules: iwlwifi -~~~ - -Here we see that the machine in question has an Intel wireless card, being used by the `iwlwifi` kernel module. - - -### Checking logs for relevant messages ### - -View the output of `dmesg` in sys-net, and check if you see a bunch of wireless related errors. Depending on your hardware, they may look like the following (or not): - -~~~ -iwlwifi 0000:00:00.0: loaded firmware version 16.242414.0 op_mode iwlmvm -iwlwifi 0000:00:00.0: Detected Intel(R) Dual Band Wireless AC 8260, REV=0x208 -... -IPv6: ADDRCONF(NETDEV_UP): wlp0s0: link is not ready -iwlwifi 0000:00:00.0: L1 Enabled - LTR Enabled -iwlwifi 0000:00:00.0: L1 Enabled - LTR Enabled -iwlwifi 0000:00:00.0: Failed to load firmware chunk! -iwlwifi 0000:00:00.0: Could not load the [0] uCode section -iwlwifi 0000:00:00.0: Failed to start INIT ucode: -110 -iwlwifi 0000:00:00.0: Failed to run INIT ucode: -110 -... -iwlwifi 0000:00:00.0: Direct firmware load for iwlwifi-8000C-18.ucode failed with error -2 -~~~ - -### Seeing what modules you have loaded ### - -You can check which drivers are currently loaded with `lsmod`, and view details about a module with `modinfo `. - -For example, we list what modules we have loaded: - -~~~ -[user@sys-net ~]$ lsmod -Module Size Used by -iwlmvm 315392 0 -iwlwifi 155648 1 iwlmvm -mac80211 708608 1 iwlmvm -cfg80211 557056 3 iwlwifi,mac80211,iwlmvm -... -~~~ - -and check one: - -~~~ -[user@sys-net ~]$ modinfo iwlmvm | grep -E '^(description|author|depends):' -author: Copyright(c) 2003- 2015 Intel Corporation -description: The new Intel(R) wireless AGN driver for Linux -depends: iwlwifi,mac80211,cfg80211 -~~~ - -Hey, it's our wireless driver! - -Now, check if reloading the module makes wireless work again: - -~~~ -[user@sys-net ~]$ sudo rmmod iwlmvm -[user@sys-net ~]$ sudo modprobe iwlmvm -~~~ - -and try reconnecting to a network that is known to work. - -If that is successful, see below about having Qubes automatically reload the driver for you. If not, try also reloading some dependent modules, in our example we must also reload iwlwifi: - -~~~ -[user@sys-net ~]$ modinfo iwlwifi | grep -E '^(description|author|depends):' -author: Copyright(c) 2003- 2015 Intel Corporation -description: Intel(R) Wireless WiFi driver for Linux -depends: cfg80211 -~~~ - -~~~ -[user@sys-net ~]$ sudo rmmod iwlmvm -[user@sys-net ~]$ sudo rmmod iwlwifi -[user@sys-net ~]$ sudo modprobe iwlwifi # note the reverse order of loading/unloading -[user@sys-net ~]$ sudo modprobe iwlmvm -~~~ - -Automatically reloading drivers on suspend/resume -------------------------------------------------- - -If reloading the driver (which resets the hardware into a known-state) resolves your issue when done manually, you can have Qubes automatically un/reload them on suspend & resume by listing the relevant modules in `/rw/config/suspend-module-blacklist`. - -In the above example, it would look like this: - -~~~ -[user@sys-net config]$ cat /rw/config/suspend-module-blacklist -# You can list here modules you want to be unloaded before going to sleep. This -# file is used only if the VM has any PCI device assigned. Modules will be -# automatically loaded after resume. -iwlmvm -iwlwifi -~~~ From 243a582bbb222b6985ae7c8350a41688c136f7b4 Mon Sep 17 00:00:00 2001 From: Enjeck Cleopatra <32180937+PROTechThor@users.noreply.github.com> Date: Mon, 19 Oct 2020 14:22:38 +0100 Subject: [PATCH 17/25] Add section about attached devices in Windows HVM --- user/troubleshooting/hvm-troubleshooting.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/user/troubleshooting/hvm-troubleshooting.md b/user/troubleshooting/hvm-troubleshooting.md index 63ef9870..a8c5f039 100644 --- a/user/troubleshooting/hvm-troubleshooting.md +++ b/user/troubleshooting/hvm-troubleshooting.md @@ -60,3 +60,6 @@ To give the VM a RAM of 2GB, open a terminal in `dom0` and enter: qvm-prefs memory 2000 +## Attached devices in Windows HVM stop working on suspend/resume ## + +After the whole system gets suspended into S3 sleep and subsequently resumed, some attached devices may stop working. To know how to make the devices work, see [Suspend/resume Troubleshooting](/doc/suspend-resume-troubleshooting/). From fa5793af9f97339ab4751ed483e7e518613c95dd Mon Sep 17 00:00:00 2001 From: Enjeck Cleopatra <32180937+PROTechThor@users.noreply.github.com> Date: Mon, 19 Oct 2020 14:24:18 +0100 Subject: [PATCH 18/25] Edit link to Suspend/resume Troubleshooting --- user/troubleshooting/hvm-troubleshooting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/troubleshooting/hvm-troubleshooting.md b/user/troubleshooting/hvm-troubleshooting.md index a8c5f039..904d1a16 100644 --- a/user/troubleshooting/hvm-troubleshooting.md +++ b/user/troubleshooting/hvm-troubleshooting.md @@ -62,4 +62,4 @@ To give the VM a RAM of 2GB, open a terminal in `dom0` and enter: ## Attached devices in Windows HVM stop working on suspend/resume ## -After the whole system gets suspended into S3 sleep and subsequently resumed, some attached devices may stop working. To know how to make the devices work, see [Suspend/resume Troubleshooting](/doc/suspend-resume-troubleshooting/). +After the whole system gets suspended into S3 sleep and subsequently resumed, some attached devices may stop working. To know how to make the devices work, see [Suspend/resume Troubleshooting](/doc/suspend-resume-troubleshooting/#attached-devices-in-windows-hvm-stop-working-on-suspendresume). From 7d365f1083d016d8e4b9e957a0566047adf5366a Mon Sep 17 00:00:00 2001 From: Enjeck Cleopatra <32180937+PROTechThor@users.noreply.github.com> Date: Mon, 19 Oct 2020 17:42:33 +0100 Subject: [PATCH 19/25] Update disk-troubleshooting.md --- user/troubleshooting/disk-troubleshooting.md | 70 +++++++++++++++++--- 1 file changed, 60 insertions(+), 10 deletions(-) diff --git a/user/troubleshooting/disk-troubleshooting.md b/user/troubleshooting/disk-troubleshooting.md index d281bdf1..946b4397 100644 --- a/user/troubleshooting/disk-troubleshooting.md +++ b/user/troubleshooting/disk-troubleshooting.md @@ -16,17 +16,24 @@ redirect_from: VMs (especially templates) use pre-allocated space. The default private storage max size is 2 GB, but it's very easy to increase as needed. If the disk is completely full, you will get an `Out of disk space` error that may crash your system because Dom0 does not have enough disk space to work. -So it's good practice to regularly check disk space usage with the command `df -h` in dom0 terminal. - -A system that's out of space should be able to boot, but may be unable to load a desktop manager. -In this case it is possible to login to dom0 terminal with Alt + Ctrl + F2. -To recover disk space it may be possible to delete files in a userVM by connecting to the userVM terminal: +So it's good practice to regularly check disk space usage. +Running the `df -h` command in dom0 terminal will show some information, but not include all the relevant details. +The Qubes user interface provides a disk space widget. +If you are unable to access the interface, the command line version is running `sudo lvs | head` and looking at top entry for LVM pool. +For example: ~~~ -qvm-start -qvm-console-dispvm + LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert + pool00 qubes_dom0 twi-aotz-- 453.17g 89.95 69.78 + root qubes_dom0 Vwi-aotz-- 453.17g pool00 5.87 + swap qubes_dom0 -wi-ao---- 7.57g ~~~ +If you run `df -h`, it only shows the information in the `root` line (which is already included in the `pool00` line). +As you can see, the `sudo lvs | head` command includes additional important columns `Data%` and `Meta%`, shown in the above example to have the values 89% and 69% respectively. + +If your system is able to boot, but cannot load a desktop environment, it is possible to login to dom0 terminal with Alt + Ctrl + F2. + If this does not work, check the size of /var/lib/qubes/qubes.xml. If it is zero, you'll need to use one of the file backup (stored in /var/lib/qubes/backup), hopefully you have the current data there. Find the most recent one and place in /var/lib/qubes/qubes.xml instead of the empty file. @@ -37,7 +44,7 @@ If not, here are some hints how to free some disk space: 1. Clean yum cache. ~~~ - sudo yum clean all + sudo dnf clean all ~~~ 2. Delete `.img` files of a less important VM, which can be found in `/var/lib/qubes/appvms/`. @@ -55,7 +62,50 @@ If not, here are some hints how to free some disk space: sudo tune2fs -m 4 /dev/mapper/vg_dom0-lv_root ~~~ -4. Remove some unneeded files in dom0 home (if you have any, most likely not). +4. Remove some unneeded files in dom0 home (if you have any, most likely not). Also look for unneeded files in `/var/log` in dom0, and `/var/log/qubes`. + +The above steps applies to old VM disks format. These steps may work on Qubes 4.0, but are not default anymore. By default, Qubes 4.0 now uses LVM. The equivalent steps are: + +1. Get a list of VM disks using `sudo lvs`. + +2. Use `sudo lvremove qubes_dom0/` to remove backup copies of some less important VMs -- entries with `-back` in their name. + +3. If that isn't enough, remove actual disks of less important VMs. NOTE: You will lose the data of that VM, but your system will resume working. + +For example: + +~~~ +$ sudo lvs + LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert + pool00 qubes_dom0 twi-aotz-- 453.17g 89.95 69.78 + root qubes_dom0 Vwi-aotz-- 453.17g pool00 5.87 + swap qubes_dom0 -wi-ao---- 7.57g +(...) + vm-d10test-private qubes_dom0 Vwi-a-tz-- 2.00g pool00 vm-d10test-private-1600961860-back 29.27 + vm-d10test-private-1600961860-back qubes_dom0 Vwi-a-tz-- 2.00g pool00 4.87 + vm-d10test-standalone-private qubes_dom0 Vwi-a-tz-- 2.00g pool00 vm-d10test-standalone-private-1580772439-back 4.90 + vm-d10test-standalone-private-1580772439-back qubes_dom0 Vwi-a-tz-- 2.00g pool00 4.87 + vm-d10test-standalone-root qubes_dom0 Vwi-a-tz-- 10.00g pool00 vm-d10test-standalone-root-1580772439-back 43.37 + vm-d10test-standalone-root-1580772439-back qubes_dom0 Vwi-a-tz-- 10.00g pool00 42.05 + vm-debian-10-my-private qubes_dom0 Vwi-a-tz-- 2.00g pool00 4.96 + vm-debian-10-my-root qubes_dom0 Vwi-a-tz-- 10.00g pool00 vm-debian-10-my-root-1565013689-back 57.99 + vm-debian-10-my-root-1565013689-back qubes_dom0 Vwi-a-tz-- 10.00g pool00 56.55 + vm-debian-10-private qubes_dom0 Vwi-a-tz-- 2.00g pool00 4.94 + vm-debian-10-root qubes_dom0 Vwi-a-tz-- 10.00g pool00 vm-debian-10-root-1601126126-back 93.44 + vm-debian-10-root-1601126126-back qubes_dom0 Vwi-a-tz-- 10.00g pool00 88.75 +(...) +$ sudo lvremove qubes_dom0/vm-d10test-standalone-root-1580772439-back +Do you really want to remove and DISCARD active logical volume qubes_dom0/vm-d10test-standalone-root-1580772439-back? [y/n]: y + Logical volume "vm-d10test-standalone-root-1580772439-back" successfully removed +~~~ + +After freeing some intial space, it may be possible to recover more space by deleting files in a userVM after connecting to the userVM terminal: + +qvm-start +qvm-console-dispvm +~~~ + +Since `qvm-console-dispvm` requires working graphical user interface login, you must first free enough space to be able to start a VM and login to graphical UI. ## Can't resize VM storage / "resize2fs: Permission denied" error ## @@ -70,7 +120,7 @@ To fix this issue: 1. In the dom0 terminal get a root console on the vm (eg. sys-usb) with: ~~~ - sudo xl console -t pv sys-usb + qvm-console-dispvm sys-usb ~~~ 2. Unmount everything mounted on the private volume `/dev/xvdb partition`. From 6f217dccbdc8c8e4071a57ed53e741e2e8c16ac3 Mon Sep 17 00:00:00 2001 From: Enjeck Cleopatra <32180937+PROTechThor@users.noreply.github.com> Date: Mon, 19 Oct 2020 17:44:54 +0100 Subject: [PATCH 20/25] Add ~~~ --- user/troubleshooting/disk-troubleshooting.md | 1 + 1 file changed, 1 insertion(+) diff --git a/user/troubleshooting/disk-troubleshooting.md b/user/troubleshooting/disk-troubleshooting.md index 946b4397..8b02c5f7 100644 --- a/user/troubleshooting/disk-troubleshooting.md +++ b/user/troubleshooting/disk-troubleshooting.md @@ -101,6 +101,7 @@ Do you really want to remove and DISCARD active logical volume qubes_dom0/vm-d10 After freeing some intial space, it may be possible to recover more space by deleting files in a userVM after connecting to the userVM terminal: +~~~ qvm-start qvm-console-dispvm ~~~ From e87bb670ee6e460395388b29e1841f64002dca1b Mon Sep 17 00:00:00 2001 From: Andrew David Wong Date: Mon, 19 Oct 2020 11:39:51 -0700 Subject: [PATCH 21/25] Add instructions for installing contributed packages --- developer/general/package-contributions.md | 4 +++ .../installing-contributed-packages.md | 33 +++++++++++++++++++ user/common-tasks/software-update-dom0.md | 5 +++ user/common-tasks/software-update-domu.md | 4 +++ 4 files changed, 46 insertions(+) create mode 100644 user/advanced-configuration/installing-contributed-packages.md diff --git a/developer/general/package-contributions.md b/developer/general/package-contributions.md index 1fcbd412..0c8bd9d5 100644 --- a/developer/general/package-contributions.md +++ b/developer/general/package-contributions.md @@ -7,6 +7,9 @@ permalink: /doc/package-contributions/ Package Contributions ===================== +_This page is for developers who wish to contribute packages. +If you want to install contributed packages, please see [installing contributed packages]._ + We're very grateful to the talented and hard-working community members who contribute software packages to Qubes OS. This page explains the inclusion criteria and procedures for such packages, as well as the roles and responsibilities of those involved. @@ -94,6 +97,7 @@ If you do not wish to be the maintainer of your package, please let us know. If you do not act on your maintainer duties for a given package for an extended period of time and after at least one reminder, we will assume that you no longer wish to be the maintainer for that package. +[installing contributed packages]: /doc/installing-contributed-packages/ [Inclusion Criteria]: #inclusion-criteria [Contribution Procedure]: #contribution-procedure [Update Procedure]: #update-procedure diff --git a/user/advanced-configuration/installing-contributed-packages.md b/user/advanced-configuration/installing-contributed-packages.md new file mode 100644 index 00000000..24a1905a --- /dev/null +++ b/user/advanced-configuration/installing-contributed-packages.md @@ -0,0 +1,33 @@ +--- +layout: doc +title: Installing contributed packages +permalink: /doc/installing-contributed-packages/ +--- + +# Installing contributed packages + +_This page is for users who wish to install contributed packages. +If you want to contribute a package, please see [package contributions]._ + + +Qubes OS contributed packages are available under the [QubesOS-contrib] GitHub Project. +This is a place where our community can [contribute Qubes OS related packages, additions and various customizations][package contributions]. + +If you want to install one of these packages, first you need to enable the repository in your system (dom0 and/or templates). This can be done by installing the `qubes-repo-contrib` package. This package includes the repository definition and keys necessary to download, verify, and install [QubesOS-contrib] packages. + +In dom0, use `qubes-dom0-update`: + + sudo qubes-dom0-update qubes-repo-contrib + +In a Fedora-based template, use `dnf`: + + sudo dnf install qubes-repo-contrib + +In a Debian-based template, use `apt`: + + sudo apt update && sudo apt install qubes-repo-contrib + + +[package contributions]: /doc/package-contributions/ +[QubesOS-contrib]: https://github.com/QubesOS-contrib/ + diff --git a/user/common-tasks/software-update-dom0.md b/user/common-tasks/software-update-dom0.md index 5f4aaa74..4512605a 100644 --- a/user/common-tasks/software-update-dom0.md +++ b/user/common-tasks/software-update-dom0.md @@ -122,6 +122,10 @@ sudo qubes-dom0-update --enablerepo=qubes-dom0-unstable To enable or disable any of these repos permanently, change the corresponding `enabled` value to `1` in `/etc/yum.repos.d/qubes-dom0.repo`. +## Contributed package repository + +Please see [installing contributed packages]. + ## Kernel upgrade This section describes upgrading the kernel in dom0 and domUs. @@ -219,4 +223,5 @@ For example: sys-whonix. [testing]: /doc/testing/ [troubleshooting newer hardware]: /doc/newer-hardware-troubleshooting/ [Managing VM kernel]: /doc/managing-vm-kernel/ +[installing contributed packages]: /doc/installing-contributed-packages/ diff --git a/user/common-tasks/software-update-domu.md b/user/common-tasks/software-update-domu.md index f5bfa68e..0962819b 100644 --- a/user/common-tasks/software-update-domu.md +++ b/user/common-tasks/software-update-domu.md @@ -43,6 +43,9 @@ Advanced users can execute the standard update command for that operating system If you wish to install updates that are still in [testing], you must enable the appropriate testing repositories. +## Contributed package repository + +Please see [installing contributed packages]. ### Fedora @@ -314,4 +317,5 @@ Note that the app will autostart only when the AppVM starts. If you would like t [RPM Fusion]: http://rpmfusion.org/ [service framework]: /doc/qubes-service/ [How to Reinstall a TemplateVM]: /doc/reinstall-template/ +[installing contributed packages]: /doc/installing-contributed-packages/ From 510bbfe73a0adf5190d1a1f12f3dae8d7263b3fb Mon Sep 17 00:00:00 2001 From: Andrew David Wong Date: Mon, 19 Oct 2020 11:44:15 -0700 Subject: [PATCH 22/25] Improve instructions for installing contributed packages Related issues: QubesOS/qubes-issues#953 QubesOS/qubes-issues#6124 --- .../installing-contributed-packages.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/user/advanced-configuration/installing-contributed-packages.md b/user/advanced-configuration/installing-contributed-packages.md index 24a1905a..b1af5a71 100644 --- a/user/advanced-configuration/installing-contributed-packages.md +++ b/user/advanced-configuration/installing-contributed-packages.md @@ -13,6 +13,8 @@ If you want to contribute a package, please see [package contributions]._ Qubes OS contributed packages are available under the [QubesOS-contrib] GitHub Project. This is a place where our community can [contribute Qubes OS related packages, additions and various customizations][package contributions]. +## Installing the repositories + If you want to install one of these packages, first you need to enable the repository in your system (dom0 and/or templates). This can be done by installing the `qubes-repo-contrib` package. This package includes the repository definition and keys necessary to download, verify, and install [QubesOS-contrib] packages. In dom0, use `qubes-dom0-update`: @@ -27,6 +29,12 @@ In a Debian-based template, use `apt`: sudo apt update && sudo apt install qubes-repo-contrib +## Installing packages + +After you've installed the repositories, you can install contributed packages. +For example, to install `qvm-screenshot-tool` in dom0: + + sudo qubes-dom0-update --clean qvm-screenshot-tool [package contributions]: /doc/package-contributions/ [QubesOS-contrib]: https://github.com/QubesOS-contrib/ From 50dab3b8e00f3bcfc0e2099a1a70b3cd0bea40a8 Mon Sep 17 00:00:00 2001 From: Andrew David Wong Date: Mon, 19 Oct 2020 12:05:34 -0700 Subject: [PATCH 23/25] Improve instructions for installing contributed packages Closes QubesOS/qubes-issues#6124 --- .../installing-contributed-packages.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/user/advanced-configuration/installing-contributed-packages.md b/user/advanced-configuration/installing-contributed-packages.md index b1af5a71..31fb395e 100644 --- a/user/advanced-configuration/installing-contributed-packages.md +++ b/user/advanced-configuration/installing-contributed-packages.md @@ -29,13 +29,23 @@ In a Debian-based template, use `apt`: sudo apt update && sudo apt install qubes-repo-contrib +The new repository definition will be in the usual location for your distro, and it will follow the naming pattern `qubes-contrib-*`, depending on your Qubes release and whether it is in dom0 or a TemplateVM. +For example, in a Fedora TemplateVM on Qubes 4.0, the new repository definition would be: + + /etc/yum.repos.d/qubes-contrib-vm-r4.0.repo + ## Installing packages After you've installed the repositories, you can install contributed packages. + +**Note:** The first time you install a contrib package in dom0, you must use the `--clean` flag. + For example, to install `qvm-screenshot-tool` in dom0: sudo qubes-dom0-update --clean qvm-screenshot-tool +Please see the package's README for specific installation and setup instructions. + [package contributions]: /doc/package-contributions/ [QubesOS-contrib]: https://github.com/QubesOS-contrib/ From f66797d2b63927946043eac025512e7be02d3efc Mon Sep 17 00:00:00 2001 From: Enjeck Cleopatra <32180937+PROTechThor@users.noreply.github.com> Date: Wed, 21 Oct 2020 04:51:21 +0100 Subject: [PATCH 24/25] Remove sentences --- user/troubleshooting/disk-troubleshooting.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/user/troubleshooting/disk-troubleshooting.md b/user/troubleshooting/disk-troubleshooting.md index 8b02c5f7..6b3788b8 100644 --- a/user/troubleshooting/disk-troubleshooting.md +++ b/user/troubleshooting/disk-troubleshooting.md @@ -13,8 +13,6 @@ redirect_from: ## "Out of disk space" error ## -VMs (especially templates) use pre-allocated space. -The default private storage max size is 2 GB, but it's very easy to increase as needed. If the disk is completely full, you will get an `Out of disk space` error that may crash your system because Dom0 does not have enough disk space to work. So it's good practice to regularly check disk space usage. Running the `df -h` command in dom0 terminal will show some information, but not include all the relevant details. From 9de3cd2ce4c887626be5719db2c6957515e633a0 Mon Sep 17 00:00:00 2001 From: Andrew David Wong Date: Sat, 24 Oct 2020 04:24:30 -0700 Subject: [PATCH 25/25] Fix typo (#1059) --- user/troubleshooting/disk-troubleshooting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/troubleshooting/disk-troubleshooting.md b/user/troubleshooting/disk-troubleshooting.md index 6b3788b8..c7891dd3 100644 --- a/user/troubleshooting/disk-troubleshooting.md +++ b/user/troubleshooting/disk-troubleshooting.md @@ -97,7 +97,7 @@ Do you really want to remove and DISCARD active logical volume qubes_dom0/vm-d10 Logical volume "vm-d10test-standalone-root-1580772439-back" successfully removed ~~~ -After freeing some intial space, it may be possible to recover more space by deleting files in a userVM after connecting to the userVM terminal: +After freeing some initial space, it may be possible to recover more space by deleting files in a userVM after connecting to the userVM terminal: ~~~ qvm-start