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:
parent
d517a14b24
commit
b48ff3db07
@ -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
|
||||
'')
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user