2018-11-15 12:05:13 -05:00
---
layout: doc
title: GUI Configuration and Troubleshooting
permalink: /doc/gui-configuration/
---
GUI Configuration and Troubleshooting
=====================================
2018-11-15 22:08:37 -05:00
Video RAM adjustment for high-resolution displays
-------------------------------------------------
2018-11-15 12:05:13 -05:00
2018-11-15 22:08:37 -05:00
**Problem:** You have a 4K external display, and when you connect it, you can't click on anything but a small area in the upper-right corner.
2018-11-15 12:05:13 -05:00
2018-11-15 22:08:37 -05:00
When a qube starts, a fixed amount of RAM is allocated to the graphics buffer called video RAM.
This buffer needs to be at least as big as the whole desktop, accounting for all displays that are or will be connected to the machine.
By default, it is as much as needed for the current display and an additional full HD (FHD) display (1920× 1080 8 bit/channel RGBA).
This logic fails when the machine has primary display in FHD resolution and, after starting some qubes, a 4K display is connected.
The buffer is too small, and internal desktop resize fails.
2018-11-15 12:05:13 -05:00
2018-11-15 22:08:37 -05:00
**Solution:** Increase the minimum size of the video RAM buffer.
2018-11-15 12:05:13 -05:00
```sh
qvm-features dom0 gui-videoram-min $(($WIDTH * $HEIGHT * 4 / 1024))
qvm-features dom0 gui-videoram-overhead 0
```
2018-11-15 22:08:37 -05:00
Where `$WIDTH` × `$HEIGHT` is the maximum desktop size that you anticipate needing.
For example, if you expect to use a 1080p display and a 4k display side-by-side, that is `(1920 + 3840) × 2160 × 4 / 1024 = 48600` , or slightly more than 48 MiB per qube.
After making these adjustments, the qubes need to be restarted.
2018-11-15 12:05:13 -05:00
2018-11-15 22:08:37 -05:00
The amount of memory allocated per qube is the maximum of:
2018-11-15 12:05:13 -05:00
- `gui-videoram-min`
2018-11-15 22:08:37 -05:00
- current display + `gui-videoram-overhead`
2018-11-15 12:05:13 -05:00
2018-11-15 22:08:37 -05:00
Default overhead is about 8 MiB, which is enough for a 1080p display (see above).
So, the `gui-videoram-overhead` zeroing is not strictly necessary; it only avoids allocating memory that will not be used.