Skip to content

Commit

Permalink
gpu: enable disable_gpu in debian_live and use fbdev (#6)
Browse files Browse the repository at this point in the history
* Create xorg.conf

* Update install.sh

* Update README.md

* Update init_live_session.sh
  • Loading branch information
1 parent 178e719 commit c35987e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Hood firewall now is possible to be installed to debian-based Linux systems. Thi
On boot menu, press 'e' to goto edit prompt, and then add following to the end of the 'linux' line

```
module_blacklist=mei,bluetooth ipv6.disable=1 toram=filesystem.squashfs
module_blacklist=mei,bluetooth,i915 ipv6.disable=1 toram=filesystem.squashfs
```

### Step 1. Get Hood
Expand Down
4 changes: 3 additions & 1 deletion init_live_session.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ elif [ $machine = "Linux" ]; then
#lspci -D |grep hunderbolt | grep "PCI" |cut -d " " -f 1|xargs -L 1 -I {} sh -c "echo {} | sudo tee /sys/bus/pci/drivers/pcieport/unbind"
#lspci -D |grep hunderbolt | grep "PCI\|NHI" |sed -E "s|(\w+:\w+)([^ ]+).*|\1/\1\2|"|xargs -I "{}" cat /sys/devices/pci{}/vendor /sys/devices/pci{}/device|xargs -L 2 bash -c "echo \$0 \$1|sudo tee /sys/bus/pci/drivers/vfio-pci/new_id"
rfkill block all
bluetoothctl power off
if lsmod |grep -q bluetooth; then
bluetoothctl power off
fi
boltctl config global.auth-mode disabled
sudo systemctl disable avahi-daemon
sudo systemctl stop NetworkManager ntpd avahi-daemon.socket avahi-daemon cups cups-browsed exim4
Expand Down
14 changes: 11 additions & 3 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ for arg in "$@"; do
target=*) target=$(echo $arg|sed "s/[^=]*=//");;
wan_port_device_path=*) wan_port_device_path=$(echo $arg|sed "s/[^=]*=//");;
yongbin) yongbin=1;harden_only=1;;
debian_live) debian_live=1;raspberrypi=0;harden_only=1;usb_tether=0;disable_wireless=0;disable_gpu=0;;
debian_live) debian_live=1;raspberrypi=0;harden_only=1;usb_tether=0;disable_wireless=0;;
esac
done

Expand Down Expand Up @@ -231,6 +231,7 @@ fi

sudo tee $prefix/etc/modprobe.d/bin-y-blacklist.conf > /dev/null <<EOF
blacklist ipv6
blacklist mei
blacklist hci_uart
blacklist i2c_brcmstb
blacklist i2c_dev
Expand Down Expand Up @@ -269,7 +270,7 @@ if [ $disable_gpu -eq 1 ]; then
sudosedi "s/dtoverlay=vc4-f?kms-v3d//g" $prefix/boot/firmware/config.txt
fi
if test -f $prefix/etc/systemd/system/display-manager.service; then
sudo rm $prefix/etc/systemd/system/display-manager.service
# sudo rm $prefix/etc/systemd/system/display-manager.service
echo "GPU is disabled."
echo "Default lightdm stopped working."
echo "Please use startx command instead."
Expand All @@ -296,8 +297,15 @@ EOF
blacklist v3d
blacklist drm
blacklist drm_panel_orientation_quirks
blacklist i915
EOF
find /usr/lib/modules/ -name "gpu" -type d|sudo xargs rm -r
if [ $raspberrypi -eq 1 ]; then
find /usr/lib/modules/ -name "gpu" -type d|sudo xargs rm -r
fi
if test -f $prefix/etc/gdm3/daemon.conf; then
sudo sed -i -e "s/\[daemon\]/\0\nWaylandEnable=false/g" $prefix/etc/gdm3/daemon.conf
fi
sudocpcontent ./xorg.conf $prefix/etc/X11/xorg.conf.d/hood.conf
fi


Expand Down
7 changes: 7 additions & 0 deletions scripts/xorg.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

Section "Device"
Identifier "FB"
Option "UseFBDev" "true"
Driver "fbdev"
Option "fbdev" "/dev/fb0"
EndSection

0 comments on commit c35987e

Please sign in to comment.