summaryrefslogtreecommitdiffstats
path: root/core/modules/vmware-common/data
diff options
context:
space:
mode:
authorSimon Rettberg2023-01-17 17:45:53 +0100
committerSimon Rettberg2023-01-17 17:45:53 +0100
commite6cbc5d31129f9d6e2a3bf98be92cccb26fd05d4 (patch)
tree41e590b5a2cd45f02612b177279b926b5fec226a /core/modules/vmware-common/data
parent[xorg] Add logout hang bug workaround (diff)
downloadmltk-e6cbc5d31129f9d6e2a3bf98be92cccb26fd05d4.tar.gz
mltk-e6cbc5d31129f9d6e2a3bf98be92cccb26fd05d4.tar.xz
mltk-e6cbc5d31129f9d6e2a3bf98be92cccb26fd05d4.zip
[vmware-common/run-virt] Subtract more RAM for larger VRAM
Diffstat (limited to 'core/modules/vmware-common/data')
-rw-r--r--core/modules/vmware-common/data/opt/openslx/vmchooser/plugins/vmware/includes/write_final_vmx.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/modules/vmware-common/data/opt/openslx/vmchooser/plugins/vmware/includes/write_final_vmx.inc b/core/modules/vmware-common/data/opt/openslx/vmchooser/plugins/vmware/includes/write_final_vmx.inc
index 7c5c40e1..6a1b0a34 100644
--- a/core/modules/vmware-common/data/opt/openslx/vmchooser/plugins/vmware/includes/write_final_vmx.inc
+++ b/core/modules/vmware-common/data/opt/openslx/vmchooser/plugins/vmware/includes/write_final_vmx.inc
@@ -271,14 +271,14 @@ setup_graphics() {
vram=$( < "${TMPCONFIG}" grep -m1 -i '^svga\.graphicsMemoryKB' \
| sed -r 's/^[^=]+//;s/^(\s|=|")*//;s/(\s|")+$//' )
existing="$vram"
- if [ -z "$vram" ]; then # Nothing, default to half of max
- vram="$(( max_vram / 2 ))"
+ if [ -z "$vram" ]; then # Nothing, default to third of max
+ vram="$(( max_vram / 3 ))"
elif (( vram > max_vram )); then # Explicitly set, cap if too excessive
vram="$max_vram"
fi
(( vram < 131072 )) && vram=131072
- # Subtract a querter of VRAM from main RAM to be safe
- VM_MEM="$(( VM_MEM - ( (vram / 4096) / 4 ) * 4 ))"
+ # Subtract half of VRAM from main RAM to be safe
+ VM_MEM="$(( VM_MEM - ( (vram / 2048) / 4 ) * 4 ))"
if [ -z "$existing" ]; then
echo 'svga.graphicsMemoryKB = "'"$vram"'"' >> "${TMPCONFIG}"
else