MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.89k stars 498 forks source link

System | Disable TTY1 on headless systems #2442

Open MichaIng opened 5 years ago

MichaIng commented 5 years ago

Background

Disable TTY1 on headless systems

Jep so thinkable, not more than a tiny optimization (one backgroud process less), one more manual step required in emergency case, requires testing in combination with other software titles, possibly attempting to access TTY1.

Reference: https://askubuntu.com/a/1017325

Long term tests

MichaIng commented 5 years ago

Actually without local console access, console-setup (including keyboard-configuration etc) as well has no use. Saves another boot service and 15M disk space.

MichaIng commented 5 years ago

Further thoughts:

/ { compatible = "brcm,bcm2835";

    fragment@0 {
            target-path = "/soc/mailbox@7e00b840";
            __overlay__ {
                    status = "disabled";
            };
    };

    fragment@1 {
            target-path = "/soc/fb";
            __overlay__ {
                    status = "disabled";
            };
    };

}; EOF dtc -@ -I dts -O dtb -o /tmp/headless.dtbo /tmp/headless.dts mv /tmp/headless.dtbo /boot/overlays G_CONFIG_INJECT 'dtoverlay=headless' 'dtoverlay=headless' /DietPi/config.txt dtoverlay headless


- Allow to re-enable video + keyboard + tty1 via flag file `/boot/disable_headless`. This will be checked on preboot, if present fully enables all feature required to access local console, then does a reboot (since required for e.g. RPi to enable video).
MichaIng commented 3 years ago

Also the console-setup package wouldn't be required anymore then.

MichaIng commented 1 year ago

SBCs without video capabilities are btw shipped with getty@tty1.service disabled with recent images: https://github.com/MichaIng/DietPi/commit/fb2168c