mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2025-01-05 19:03:21 +03:00
Merge pull request #261 from samueldr-wip/devices/razer-cheryl2/workaround-qol
razer-cheryl2: Workaround made more descriptive
This commit is contained in:
commit
17474b48f7
@ -75,8 +75,17 @@
|
|||||||
add_dependency(:Files, "/proc/cmdline")
|
add_dependency(:Files, "/proc/cmdline")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def booted_with_recovery_fdt?()
|
||||||
|
# TODO: actually detect FDT using /proc/device-tree
|
||||||
|
cmdline = File.read("/proc/cmdline")
|
||||||
|
[
|
||||||
|
# Assume presence of that cmdline means it booted with normal boot
|
||||||
|
!cmdline.match(/mdss_dsi_nt36830_wqhd_dualdsi_extclk_cmd_10bit/),
|
||||||
|
].any?()
|
||||||
|
end
|
||||||
|
|
||||||
def run()
|
def run()
|
||||||
if File.read("/proc/cmdline").match(/mdss_dsi_nt36830_wqhd_dualdsi_extclk_cmd_10bit/)
|
unless booted_with_recovery_fdt?()
|
||||||
$logger.info("HACK!! Rebooting to recovery to have a working display...")
|
$logger.info("HACK!! Rebooting to recovery to have a working display...")
|
||||||
System.run("reboot", "recovery")
|
System.run("reboot", "recovery")
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user