Skip to content

Commit

Permalink
v7.1
Browse files Browse the repository at this point in the history
+ DietPi-Software | IPFS: Apply increased receive buffer directly on install, to have the error message addressed on first service start already
+ DietPi-Software | Do not call "dietpi-set_hardware headless 0" in every case but only if graphical software is installed
  • Loading branch information
MichaIng authored Apr 11, 2021
1 parent 0bbb3ca commit 73f736e
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -9961,6 +9961,7 @@ _EOF_

# Raise packet receive buffer: https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size
G_EXEC eval "echo 'net.core.rmem_max=2500000' > /etc/sysctl.d/dietpi-ipfs.conf"
G_EXEC sysctl -w net.core.rmem_max=2500000

fi

Expand Down Expand Up @@ -13250,9 +13251,6 @@ _EOF_

Install_Apply_GPU_Settings(){

# Disable headless mode based on installed software
local gpu_enabled=1

# RPi: Define minimal memory split based on installed software
local gpu_memory=0

Expand Down Expand Up @@ -13286,23 +13284,21 @@ _EOF_

fi

# RPi: Apply memory split
if (( $G_HW_MODEL < 10 && $gpu_memory > 0 )); then

# Never override a higher existing value
local current_gpu_mem=$(sed -n '/^[[:blank:]]*gpu_mem_1024=/{s/^[^=]*=//p;q}' /boot/config.txt)
G_WHIP_DEFAULT_ITEM='Ok'
if (( $current_gpu_mem < $gpu_memory )) && G_WHIP_YESNO "[ INFO ] DietPi has detected an increased GPU memory is required for your installed software:
- Current: $current_gpu_mem MiB\n - Recommended: $gpu_memory MiB\n\nWould you like DietPi to apply the recommended GPU memory split?\n\nIf unsure, select 'Ok'."; then
# Disable headless/enable GPU when graphics software was installed
(( $gpu_memory )) || return

/boot/dietpi/func/dietpi-set_hardware gpumemsplit $gpu_memory
/boot/dietpi/func/dietpi-set_hardware headless 0

fi
# RPi: Apply memory split
(( $G_HW_MODEL < 10 )) || return

fi
# Never override a higher existing value
local current_gpu_mem=$(sed -n '/^[[:blank:]]*gpu_mem_1024=/{s/^[^=]*=//p;q}' /boot/config.txt)
[[ $current_gpu_mem ]] || current_gpu_mem=64
(( $current_gpu_mem < $gpu_memory )) && G_WHIP_DEFAULT_ITEM='Ok' G_WHIP_YESNO "[ INFO ] DietPi has detected an increased GPU memory is required for your installed software:
- Current: $current_gpu_mem MiB\n - Recommended: $gpu_memory MiB\n\nWould you like DietPi to apply the recommended GPU memory split?\n\nIf unsure, select 'Ok'." || return

# Disable headless/enable GPU
(( $gpu_enabled )) && /boot/dietpi/func/dietpi-set_hardware headless 0
/boot/dietpi/func/dietpi-set_hardware gpumemsplit $gpu_memory

}

Expand Down

0 comments on commit 73f736e

Please sign in to comment.