From 7b3be0453abf833c2bfcbc7d825e2cbfb6257cca Mon Sep 17 00:00:00 2001 From: Miles Alan Date: Mon, 6 Jul 2020 18:39:34 -0500 Subject: [PATCH] Disable buggy bluetooth driver before entering suspend --- programs/sxmo_screenlock.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/programs/sxmo_screenlock.c b/programs/sxmo_screenlock.c index ebbe72e..e5ad677 100644 --- a/programs/sxmo_screenlock.c +++ b/programs/sxmo_screenlock.c @@ -210,6 +210,13 @@ configuresuspendsettingsandwakeupsources() "1c19000.usb" ); + // Temporary hack to disable Bluetooth driver that crashes on suspend 1/5th the time + fprintf(stderr, "Disabling buggy Bluetooth driver\n"); + writefile( + "/sys/bus/serial/drivers/hci_uart_h5/unbind", + "serial0-0" + ); + // E.g. make sure we're using CRUST fprintf(stderr, "Flip mem_sleep setting to use crust\n"); writefile("/sys/power/mem_sleep", "deep");