Skip to content

Commit bcd31d7

Browse files
committed
Fix some more compatibility issues with the PI setup
1 parent 91ff63c commit bcd31d7

File tree

4 files changed

+101
-1
lines changed

4 files changed

+101
-1
lines changed

rpi/.xinitrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,12 @@ xset s noblank
77
# Hide mouse pointer
88
unclutter -idle 0 &
99

10+
# Disable composite output
11+
xrandr --output Composite-1 --off
12+
# Turn monitor to portrait mode
13+
xrandr --output DSI-1 --rotate right
14+
# Also turn touch input
15+
xinput set-prop "raspberrypi-ts" --type=float "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1
16+
1017
# Start browser in kiosk mode
1118
chromium-browser http://localhost:8083 --start-fullscreen --kiosk --incognito --noerrdialogs --no-first-run --disk-cache-dir=/dev/null

rpi/bootstrap.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ function installBrowser() {
3333
sudo apt-get install --no-install-recommends -y \
3434
xserver-xorg-video-all xserver-xorg-input-all xserver-xorg-core xinit x11-xserver-utils \
3535
unclutter \
36+
xrandr \
3637
chromium-browser
3738

3839
# Enable Auto-Login on console
@@ -46,7 +47,18 @@ function installBrowser() {
4647
cp "${SCRIPT_DIR}/.bash_profile" ~/.bash_profile
4748
}
4849

50+
function configurePi() {
51+
sudo cp "${SCRIPT_DIR}/config.txt" /boot/config.txt
52+
}
53+
4954
sudo apt-get update
5055
installService
5156
installRemoteControl
5257
installBrowser
58+
configurePi
59+
60+
echo "You may need to restart the system to apply some settings. Reboot now? (y/n)"
61+
read -r response
62+
if [[ "${response}" == "y" ]]; then
63+
sudo reboot
64+
fi

rpi/config.txt

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# For more options and information see
2+
# http://rpf.io/configtxt
3+
# Some settings may impact device functionality. See link above for details
4+
5+
# uncomment if you get no picture on HDMI for a default "safe" mode
6+
#hdmi_safe=1
7+
8+
# uncomment the following to adjust overscan. Use positive numbers if console
9+
# goes off screen, and negative if there is too much border
10+
#overscan_left=16
11+
#overscan_right=16
12+
#overscan_top=16
13+
#overscan_bottom=16
14+
15+
# uncomment to force a console size. By default it will be display's size minus
16+
# overscan.
17+
#framebuffer_width=1280
18+
#framebuffer_height=720
19+
20+
# uncomment if hdmi display is not detected and composite is being output
21+
#hdmi_force_hotplug=1
22+
23+
# uncomment to force a specific HDMI mode (this will force VGA)
24+
#hdmi_group=1
25+
#hdmi_mode=1
26+
27+
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
28+
# DMT (computer monitor) modes
29+
#hdmi_drive=2
30+
31+
# uncomment to increase signal to HDMI, if you have interference, blanking, or
32+
# no display
33+
#config_hdmi_boost=4
34+
35+
# uncomment for composite PAL
36+
#sdtv_mode=2
37+
38+
#uncomment to overclock the arm. 700 MHz is the default.
39+
#arm_freq=800
40+
41+
# Uncomment some or all of these to enable the optional hardware interfaces
42+
#dtparam=i2c_arm=on
43+
#dtparam=i2s=on
44+
#dtparam=spi=on
45+
46+
# Uncomment this to enable infrared communication.
47+
#dtoverlay=gpio-ir,gpio_pin=17
48+
#dtoverlay=gpio-ir-tx,gpio_pin=18
49+
50+
# Additional overlays and parameters are documented /boot/overlays/README
51+
52+
# Enable audio (loads snd_bcm2835)
53+
dtparam=audio=on
54+
55+
# Automatically load overlays for detected cameras
56+
#camera_auto_detect=1
57+
58+
# Automatically load overlays for detected DSI displays
59+
display_auto_detect=1
60+
61+
# Enable DRM VC4 V3D driver
62+
dtoverlay=vc4-fkms-v3d
63+
max_framebuffers=2
64+
65+
# Disable compensation for displays with overscan
66+
disable_overscan=1
67+
68+
[cm4]
69+
# Enable host mode on the 2711 built-in XHCI USB controller.
70+
# This line should be removed if the legacy DWC2 controller is required
71+
# (e.g. for USB device mode) or if USB support is not required.
72+
otg_mode=1
73+
74+
[all]
75+
76+
[pi4]
77+
# Run as fast as firmware / board allows
78+
arm_boost=1
79+
80+
[all]

rpi/ssl-remote-control.service

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
[Unit]
2-
description=Launches SSL Remote Control
32
Wants=network-online.target
43
After=network-online.target
54

65
[Service]
76
Type=simple
87
ExecStart=%h/.local/bin/ssl-remote-control -team YELLOW
98
Restart=always
9+
RestartSec=5
10+
StartLimitInterval=0
1011

1112
[Install]
1213
WantedBy=default.target

0 commit comments

Comments
 (0)