@@ -103,6 +103,7 @@ if [ "$DISTRO" == "raspbian" ] || [ "$DISTRO" == "debian" ]; then
103103 sudo apt-get install -y dnsutils || true
104104 sudo apt-get install -y lightdm || true
105105 sudo apt-get install -y openbox || true
106+ sudo apt-get install -y x11-xserver-utils || true
106107 sudo apt-get install -y udevil || true
107108 sudo apt-get install -y libnotify-bin || true
108109 sudo apt-get install -y exfatprogs || true
@@ -169,11 +170,6 @@ sudo chmod +x /usr/local/bin/thinos-devmon || true
169170# Add user to plugdev group
170171sudo usermod -aG plugdev " $USER " || true
171172
172- #
173- # # Remove udisks2 entirely to prevent it from auto-mounting optical media to /media/cdrom0
174- # sudo apt-get purge -y udisks2 2>/dev/null || true
175- # sudo apt-get autoremove -y 2>/dev/null || true
176-
177173# Disable udisks2 automount (we use devmon/udevil instead to mount as the session user)
178174sudo systemctl disable --now udisks2.service udisks2.socket 2> /dev/null || true
179175sudo systemctl mask udisks2.service udisks2.socket 2> /dev/null || true
@@ -251,9 +247,14 @@ EOL'
251247log_step 10 " Disabling verbose boot and enabling Plymouth theme..."
252248FILE=/boot/firmware/cmdline.txt
253249if [ -f " $FILE " ]; then
250+ # Append splash and quiet to the existing cmdline if not already present, while preserving existing parameters
254251 if ! grep -q " splash" " $FILE " ; then
255252 sudo sed -i ' s/$/ splash quiet plymouth.ignore-serial-consoles/' " $FILE "
256253 fi
254+ # prepend vc4.force_hotplug=3 to ensure HDMI is forced on for both ports on Raspberry Pi
255+ if ! grep -q " vc4.force_hotplug=3" " $FILE " ; then
256+ sudo sed -i ' 1s/^/vc4.force_hotplug=3 /' " $FILE "
257+ fi
257258fi
258259if [ " $DISTRO " == " debian" ]; then
259260 log_step " 10a" " Enabling splash and quiet mode via GRUB on Debian..."
0 commit comments