Skip to content

Commit

Permalink
Merge pull request #15 from fayaaz/fkms-fix
Browse files Browse the repository at this point in the history
Fkms fix
  • Loading branch information
fayaaz authored Apr 22, 2021
2 parents df68df2 + 1c093d4 commit b679d11
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stage1/00-boot-files/files/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1
disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
Expand Down
2 changes: 1 addition & 1 deletion stage3/00-install-packages/00-packages-nr
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
xserver-xorg xinit xserver-xorg-video-fbdev xserver-xorg-video-fbturbo
xserver-xorg xinit xserver-xorg-video-fbdev
mousepad
zenity lightdm
4 changes: 4 additions & 0 deletions stage3/03-kernel-setup/00-run.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Add threadirqs kernel command line argument
on_chroot << EOF
sed -i 's/$/ threadirqs/' /boot/cmdline.txt
EOF

# Use the performance governor instead of ondemand which is default
install -m 755 files/raspi-performance-config.sh ${ROOTFS_DIR}/etc/init.d/raspi-config
39 changes: 39 additions & 0 deletions stage3/03-kernel-setup/files/raspi-performance-config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: raspi-config
# Required-Start: udev mountkernfs $remote_fs
# Required-Stop:
# Default-Start: S 2 3 4 5
# Default-Stop:
# Short-Description: Switch to performance cpu governor (unless shift key is pressed)
# Description:
### END INIT INFO

. /lib/lsb/init-functions

case "$1" in
start)
log_daemon_msg "Checking if shift key is held down"
if [ -x /usr/sbin/thd ] && timeout 1 thd --dump /dev/input/event* | grep -q "LEFTSHIFT\|RIGHTSHIFT"; then
printf " Yes. Not enabling performance scaling governor"
log_end_msg 0
else
printf " No. Switching to performance scaling governor"
SYS_CPUFREQ_GOVERNOR=/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
if [ -e $SYS_CPUFREQ_GOVERNOR ]; then
echo "performance" > $SYS_CPUFREQ_GOVERNOR
fi
log_end_msg 0
fi
;;
stop)
;;
restart)
;;
force-reload)
;;
*)
echo "Usage: $0 start" >&2
exit 3
;;
esac

0 comments on commit b679d11

Please sign in to comment.