2013-01-08 07:05:31 -05:00
---
2015-04-10 16:17:45 -04:00
layout: doc
2015-10-13 23:31:03 -04:00
title: Linux HVM Tips
2015-10-28 18:14:40 -04:00
permalink: /doc/linux-hvm-tips/
2015-10-11 03:04:59 -04:00
redirect_from:
2015-10-28 18:14:40 -04:00
- /en/doc/linux-hvm-tips/
2015-10-11 03:04:59 -04:00
- /doc/LinuxHVMTips/
- /wiki/LinuxHVMTips/
2013-01-08 07:05:31 -05:00
---
Tips for Linux in HVM domain
============================
2016-09-24 20:56:57 -04:00
How to fix bootup kernel error
-------------------------------
2016-09-24 12:38:18 -04:00
2017-04-19 18:27:01 -04:00
The HVM may pause on boot, showing a fixed cursor.
After a while a series of warnings may be shown similar to this:
2016-09-24 20:56:57 -04:00
BUG: soft lockup - CPU#0 stuck for 23s! [systemd-udevd:244]
2017-04-19 18:27:01 -04:00
To fix this:
2016-09-24 20:56:57 -04:00
2017-04-19 18:27:01 -04:00
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
2016-09-24 12:38:18 -04:00
2017-04-19 18:27:01 -04:00
If this solves the problem then you will want to make the change permanent:
2016-09-24 12:38:18 -04:00
2017-04-19 18:27:01 -04:00
1. Edit the file `/etc/default/grub` .
1. Find the line which starts:
2016-09-24 12:38:18 -04:00
~~~
GRUB_CMDLINE_LINUX=
~~~
2017-04-19 18:27:01 -04:00
1. Remove this text from that line:
2016-09-24 12:38:18 -04:00
~~~
rhgb
~~~
2017-04-19 18:27:01 -04:00
1. Add this text to that line:
2016-09-24 12:38:18 -04:00
~~~
modprobe.blacklist=bochs_drm
~~~
2017-04-19 18:27:01 -04:00
1. Run this command:
2016-09-24 12:38:18 -04:00
~~~
grub2-mkconfig --output=/boot/grub2/grub.cfg
~~~
2017-04-19 18:27:01 -04:00
The HVM should now start normally.
2016-09-24 12:38:18 -04:00
2013-01-08 07:05:31 -05:00
Screen resolution
-----------------
2017-04-19 18:27:01 -04:00
Some kernel/Xorg combinations use only 640x480 in HVM, which is quite small.
To enable maximum resolution, some changes in the Xorg configuration are needed:
2013-01-08 07:05:31 -05:00
1. Force "vesa" video driver
2. Provide wide horizontal synchronization range
2017-04-19 18:27:01 -04:00
To achieve it (all commands to be run as root):
2013-01-08 07:05:31 -05:00
2016-01-10 18:41:30 -05:00
1. Generate XOrg configuration (if you don't have it):
2015-09-26 19:00:33 -04:00
~~~
2013-01-08 07:05:31 -05:00
X -configure :1 & & mv ~/xorg.conf.new /etc/X11/xorg.conf
2015-09-26 19:00:33 -04:00
~~~
2013-01-08 07:05:31 -05:00
2017-04-19 18:27:01 -04:00
1. Add HorizSync line to Monitor section, it should look something like:
2015-09-26 19:00:33 -04:00
~~~
2013-01-08 07:05:31 -05:00
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
HorizSync 30.0 - 60.0
EndSection
2015-09-26 19:00:33 -04:00
~~~
2013-01-08 07:05:31 -05:00
2017-04-19 18:27:01 -04:00
1. Change driver to "vesa" in Device section:
2015-09-26 19:00:33 -04:00
~~~
2013-01-08 07:05:31 -05:00
Section "Device"
# (...)
Identifier "Card0"
Driver "vesa"
VendorName "Technical Corp."
BoardName "Unknown Board"
BusID "PCI:0:2:0"
EndSection
2015-09-26 19:00:33 -04:00
~~~
2013-01-08 07:05:31 -05:00
2017-04-19 18:27:01 -04:00
Now you should get resolution of at least 1280x1024 and should be able to choose other modes.
2013-01-08 07:05:31 -05:00
Qubes agents
------------
2017-04-19 18:27:01 -04:00
Linux Qubes agents are written primarily for PV qubes, but it is possible to run them also in a HVM qube.
However some work may be required to achieve this. Check [this thread ](https://groups.google.com/group/qubes-devel/browse_thread/thread/081df4a43e49e7a5 ).