Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions astroarch_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ systemctl stop smb
# Link a zsh config for astronaut
ln -s /home/astronaut/.astroarch/configs/.zshrc /home/astronaut/.zshrc

# NetworkManager WiFi Power Saving
ln -s /home/astronaut/.astroarch/configs/default-wifi-powersave-on.conf /etc/NetworkManager/conf.d

# Start NetworkManager and sleep to create the hotspot
systemctl start NetworkManager
sleep 5
Expand All @@ -109,6 +112,7 @@ rm -f /usr/lib/systemd/system/novnc.service

# Synchronize the system time with the GPS if there is no Real Time Clock (RTC) or network connection to the Raspberry Pi
sed -i '$a\refclock SHM 0 offset 0.5 delay 0.2 refid NMEA' /etc/chrony.conf
sed -i '$a\driftfile /var/lib/chrony/drift' /etc/chrony.conf

# Disable systemd-timesyncd and enable chronyd
systemctl disable systemd-timesyncd
Expand Down Expand Up @@ -160,8 +164,13 @@ chown root:xrdp /etc/xrdp/rsakeys.ini
chmod u=rw,g=r /etc/xrdp/rsakeys.ini
chmod 755 /etc/xrdp/cert.pem
chmod 755 /etc/xrdp/key.pem
# Allows adding devices from the xorg.conf.d section
sed -i '/Option "AutoAddDevices" "off"/s/^/#/' /etc/X11/xrdp/xorg.conf
# Disables the display's power management features
sed -i 's/Option "DPMS"/& "false"/' /etc/X11/xrdp/xorg.conf
# Disabling compression can speed up local connections on low-power devices
sed -i 's|bitmap_compression=true|bitmap_compression=false|g' /etc/xrdp/xrdp.ini
sed -i 's|bulk_compression=true|bulk_compression=false|g' /etc/xrdp/xrdp.ini
# Improve xrdp & network
cp /home/astronaut/.astroarch/configs/99-sysctl.conf /etc/sysctl.d

#
su astronaut -c "cat <<EOF >/home/astronaut/.config/plasmanotifyrc
Expand Down
26 changes: 26 additions & 0 deletions configs/99-sysctl.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
vm.swappiness=10
net.core.somaxconn=1024
net.ipv4.tcp_fastopen = 3

net.core.rmem_default = 1048576
net.core.rmem_max = 16777216
net.core.wmem_default = 1048576
net.core.wmem_max = 16777216
net.core.optmem_max = 65536
net.ipv4.tcp_rmem = 4096 1048576 2097152
net.ipv4.tcp_wmem = 4096 65536 16777216

net.ipv4.tcp_keepalive_time = 60
net.ipv4.tcp_keepalive_intvl = 10
net.ipv4.tcp_keepalive_probes = 6

net.ipv4.tcp_mtu_probing = 1

net.ipv4.tcp_timestamps = 0

net.ipv4.tcp_sack = 1

vm.vfs_cache_pressure = 50

vm.dirty_background_bytes = 4194304
vm.dirty_bytes = 4194304
19 changes: 19 additions & 0 deletions scripts/2.0.6.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

# Add drift file for chrony
sudo sed -i '$a\driftfile /var/lib/chrony/drift' /etc/chrony.conf

# Xrdp
#Set AutoAddDevices to disabled to avoid device management conflicts between different sessions
sudo sed -i -E '/AutoAddDevices/ s/^([[:space:]]*)#/\1/' /etc/X11/xrdp/xorg.conf
# Disables the display's power management features
sudo sed -i 's/Option "DPMS"/& "false"/' /etc/X11/xrdp/xorg.conf
# Disabling compression can speed up local connections on low-power devices
sudo sed -i 's|bitmap_compression=true|bitmap_compression=false|g' /etc/xrdp/xrdp.ini
sudo sed -i 's|bulk_compression=true|bulk_compression=false|g' /etc/xrdp/xrdp.ini
# Improve xrdp & network
sudo cp /home/astronaut/.astroarch/configs/99-sysctl.conf /etc/sysctl.d

# NetworkManager WiFi Power Saving
sudo ln -s /home/astronaut/.astroarch/configs/default-wifi-powersave-on.conf /etc/NetworkManager/conf.d