diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index ad152ba486..bf69748620 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -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 @@ -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 @@ -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 }