Skip to content

Commit

Permalink
Merge pull request #2280 from Fourdee/dev
Browse files Browse the repository at this point in the history
Dev > Beta
  • Loading branch information
Fourdee authored Nov 25, 2018
2 parents 7e10f01 + 8f99147 commit 52fbcd8
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 20 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ v6.18
Changes / Improvements / Optimisations:
- General | Concurrent execution detection: Now has a 5 second buffer to wait for exit (G_INIT_WAIT_CONCURRENT), before failing: https://github.com/Fourdee/DietPi/issues/2159#issuecomment-433619721
- DietPi-Config | Added support for changing the brightness of the RPi touchscreen: https://github.com/Fourdee/DietPi/issues/2169
- DietPi-Config | Added support for setting Xorg DPI scale.
- DietPi-Services | MariaDB: DietPi now uses the pre-installed "mariadb" systemd service instead of obsoleve "mysql" init.d service: https://github.com/Fourdee/DietPi/pull/2196
- DietPi-Software | Nextcloud Talk video calls with configured TURN server is now available for install: https://github.com/Fourdee/DietPi/pull/2197
- DietPi-Software | NAA Daemon: Added installation support for ARMv8 and x86_64. Thanks Jussi!
Expand All @@ -26,6 +27,7 @@ Bug Fixes:
- General | Resolved an issue, where entering passwords via our internal whiptail password box leads to "invalid match", when special characters are used, forcing a retry: https://github.com/Fourdee/DietPi/issues/2215#issuecomment-437683709
- DietPi-Cleaner | Resolved an issue where test runs on -dev package removal, would remove the packages.
- DietPi-Cleaner | Resolved a syntax error with function 'Run_Cleaners', disabling the ability to run cleaners. Many thanks to @optio50 for reporting this issue! https://github.com/Fourdee/DietPi/issues/2241
- DietPi-Config | Resovled an visual error when selecting network options due to 'G_CHECK_VALIDINT'.
- DietPi-Config | Locale: Resolved an issue where DietPi would always display en_GB as the current locale: https://github.com/Fourdee/DietPi/issues/2216#issuecomment-435599419
- DietPi-Config | Resolved an issue where on Odroid C1/2 with current kernel 3.5" LCD shield does not work anymore. Thanks to @Kreeblah for reporting this issue and solution: https://github.com/Fourdee/DietPi/issues/2256
- DietPi-Automation | CONFIG_NTP_MODE is now applied after APT cache, and, initial time sync is updated. Due to packages required for some modes: https://github.com/Fourdee/DietPi/issues/2181#issuecomment-433444882
Expand Down
4 changes: 4 additions & 0 deletions dietpi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ SOFTWARE_WIFI_HOTSPOT_SSID=DietPi-HotSpot
SOFTWARE_WIFI_HOTSPOT_KEY=dietpihotspot
SOFTWARE_WIFI_HOTSPOT_CHANNEL=3

#Xorg options
# DPI 96(default) 120(+25%) 144(+50%) 168(+75%) 192(+100%)
SOFTWARE_XORG_DPI=96

#Chromium Options
SOFTWARE_CHROMIUM_RES_X=1280
SOFTWARE_CHROMIUM_RES_Y=720
Expand Down
54 changes: 40 additions & 14 deletions dietpi/dietpi-config
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@

fi

local xorg_dpi_current=$(grep -m1 '^SOFTWARE_XORG_DPI=' /DietPi/dietpi.txt | sed 's/^[^=]*=//')
G_WHIP_MENU_ARRAY+=('17' ": Xorg DPI: [$xorg_dpi_current]")

#Display brightness
G_WHIP_MENU_ARRAY+=('16' ': Display Brightness')

Expand Down Expand Up @@ -725,12 +728,13 @@

elif (( $G_WHIP_RETURNED_VALUE == 16 )); then

# - Known FP's for setting brightness, do NOT re-order indexs
# - Known FP's for setting brightness
local afp_current_set_brightness=(

'/sys/class/backlight/intel_backlight/brightness' #0
'/sys/class/backlight/rpi_backlight/brightness' #1
'/sys/class/backlight/lcd0/brightness' #2
'/sys/class/backlight/intel_backlight'
'/sys/class/backlight/rpi_backlight'
'/sys/class/backlight/lcd0'
'/sys/class/backlight/backlight'

)

Expand All @@ -742,9 +746,15 @@
for ((i=0; i<${#afp_current_set_brightness[@]}; i++))
do

if [[ -f ${afp_current_set_brightness[$i]} ]]; then
if [[ -f ${afp_current_set_brightness[$i]}/brightness ]]; then

current_brightness=$(<${afp_current_set_brightness[$i]}/brightness)
if [[ -f ${afp_current_set_brightness[$i]}/max_brightness ]]; then

MAX_VALUE=$(<${afp_current_set_brightness[$i]}/max_brightness)

fi

current_brightness=$(<${afp_current_set_brightness[$i]})
index_apply=$i
break

Expand All @@ -754,21 +764,14 @@

if disable_error=1 G_CHECK_VALIDINT $current_brightness; then

# - Get max value (intel|0)
if (( $index_apply == 0 )) && [[ -f /sys/class/backlight/intel_backlight/max_brightness ]]; then

MAX_VALUE=$(</sys/class/backlight/intel_backlight/max_brightness)

fi

G_WHIP_DEFAULT_ITEM=$current_brightness
G_WHIP_INPUTBOX "Please enter a brightness value:\n - Min = $MIN_VALUE | Max = $MAX_VALUE"
if (( $? == 0 )) && [[ $G_WHIP_RETURNED_VALUE ]]; then

if G_CHECK_VALIDINT $G_WHIP_RETURNED_VALUE $MIN_VALUE $MAX_VALUE; then

# - apply
echo $G_WHIP_RETURNED_VALUE > ${afp_current_set_brightness[$index_apply]}
echo $G_WHIP_RETURNED_VALUE > ${afp_current_set_brightness[$index_apply]}/brightness

fi

Expand All @@ -782,6 +785,29 @@

unset afp_current_set_brightness

elif (( $G_WHIP_RETURNED_VALUE == 17 )); then

G_WHIP_MENU_ARRAY=(

'96' ': Default'
'120' ": +25% larger"
'144' ": +50% larger"
'168' ": +75% larger"
'192' ": +100% larger"

)

G_WHIP_DEFAULT_ITEM=$xorg_dpi_current
G_WHIP_MENU "Please select a DPI value for Xorg:\n - A higher value will make text and windows larger\n - Has no effect on local terminal (eg: no desktop installed)\n\nNB: Setting will only take effect, once system is restarted."
if (( $? == 0 )); then

G_CONFIG_INJECT 'SOFTWARE_XORG_DPI=' "SOFTWARE_XORG_DPI=$G_WHIP_RETURNED_VALUE" /DietPi/dietpi.txt
mkdir -p /etc/X11/Xsession.d
echo -e "xrandr --dpi $G_WHIP_RETURNED_VALUE" > /etc/X11/Xsession.d/99-dietpi-dpi
REBOOT_REQUIRED=1

fi

fi

fi
Expand Down
12 changes: 11 additions & 1 deletion dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -11200,7 +11200,17 @@ _EOF_
Banner_Configuration

#Allow root, start maximized and disable sandbox under root (blank screen without)
local export_options="export CHROMIUM_FLAGS=\"\$CHROMIUM_FLAGS --test-type --no-sandbox --temp-profile --user-data-dir "
local export_options="export CHROMIUM_FLAGS=\"\$CHROMIUM_FLAGS \
--test-type \
--no-sandbox \
--temp-profile \
--user-data-dir \
--disable-smooth-scrolling \
--disable-low-res-tiling \
--enable-low-end-device-mode \
--num-raster-threads=$G_HW_CPU_CORES \
--profiler-timing=0 \
--disable-composited-antialiasing "

#RPi
if (( $G_HW_MODEL < 10 )); then
Expand Down
4 changes: 2 additions & 2 deletions dietpi/func/dietpi-globals
Original file line number Diff line number Diff line change
Expand Up @@ -1992,7 +1992,7 @@ $print_logfile_info

# - Native PC + possibily others, due to vast sensors /sys/class/thermal/thermal_zone[0-9], all of which we are unsure is CPU, check for possible invalid entries and set N/A
# EG: Z83 = 0, also seen some results as a minus value
if ! G_CHECK_VALIDINT $cpu_temp_current || (( $cpu_temp_current <= 0 )); then
if ! disable_error=1 G_CHECK_VALIDINT $cpu_temp_current || (( $cpu_temp_current <= 0 )); then

cpu_temp_current='N/A'

Expand Down Expand Up @@ -2095,7 +2095,7 @@ $print_logfile_info

return_value=0

else
elif (( ! $disable_error )); then

G_WHIP_MSG "Input value \"$input\" is higher than allowed \"$max\". No changes applied."

Expand Down
4 changes: 2 additions & 2 deletions dietpi/func/dietpi-set_hardware
Original file line number Diff line number Diff line change
Expand Up @@ -1216,8 +1216,8 @@ _EOF_

aWIFI_MODULES+=('8189es')

# + Pine A64 / Asus tinker board (onboard)
elif (( $G_HW_MODEL == 40 || $G_HW_MODEL == 52 )); then
# + Pine A64 / PB / Asus tinker board (onboard)
elif (( $G_HW_MODEL == 40 || $G_HW_MODEL == 44 || $G_HW_MODEL == 52 )); then

aWIFI_MODULES+=('8723bs')

Expand Down
2 changes: 1 addition & 1 deletion dietpi/server_version-6
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
6
18
10
11

0 comments on commit 52fbcd8

Please sign in to comment.