1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-16 03:32:02 +03:00

razer-cheryl2: Add workaround for weirdness in normal boot

This commit is contained in:
Samuel Dionne-Riel 2020-10-09 18:21:51 -04:00
parent d517a14b24
commit b48ff3db07

View File

@ -65,4 +65,23 @@
mobile.usb.gadgetfs.functions = {
rndis = "gsi.rndis";
};
mobile.boot.stage-1.tasks = [
# This works around an issue with the default boot and the panel.
# Instead we reboot in recovery mode where it just works :/
(pkgs.writeText "reboot_recovery.rb" ''
class Tasks::MaybeRebootToRecovery < SingletonTask
def initialize()
add_dependency(:Files, "/proc/cmdline")
end
def run()
if File.read("/proc/cmdline").match(/mdss_dsi_nt36830_wqhd_dualdsi_extclk_cmd_10bit/)
$logger.info("HACK!! Rebooting to recovery to have a working display...")
System.run("reboot", "recovery")
end
end
end
'')
];
}