mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-15 02:43:24 +03:00
qualcomm: Add fb notify quirk
This quirk touches the `blank` file of the framebuffer /sys nodes, which ends up unsuspending things that start suspended until the *right thing* is happening to not be suspended. X11, among others, do the right things. It seems other framebuffer interfaces are not. This can likely be fixed in other ways, but this is the more approachable way to me right now.
This commit is contained in:
parent
0dd1de0267
commit
2971232eff
@ -2,6 +2,7 @@
|
||||
imports = [
|
||||
./framebuffer.nix
|
||||
./msm-dwc3.nix
|
||||
./msm-fb-notify.nix
|
||||
./wcnss-wlan.nix
|
||||
];
|
||||
}
|
||||
|
10
modules/quirks/qualcomm/msm-fb-notify-task.rb
Normal file
10
modules/quirks/qualcomm/msm-fb-notify-task.rb
Normal file
@ -0,0 +1,10 @@
|
||||
class Tasks::MsmFbNotify < SingletonTask
|
||||
def initialize()
|
||||
Targets[:SwitchRoot].add_dependency(:Task, self)
|
||||
add_dependency(:Mount, "/sys")
|
||||
end
|
||||
|
||||
def run()
|
||||
System.write("/sys/class/graphics/fb0/blank", "0")
|
||||
end
|
||||
end
|
24
modules/quirks/qualcomm/msm-fb-notify.nix
Normal file
24
modules/quirks/qualcomm/msm-fb-notify.nix
Normal file
@ -0,0 +1,24 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.mobile.quirks.qualcomm;
|
||||
inherit (lib) mkIf mkOption types;
|
||||
in
|
||||
{
|
||||
options.mobile = {
|
||||
quirks.qualcomm.fb-notify.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enable this on a device which requires the framebuffer
|
||||
to be notified for some components to work right.
|
||||
|
||||
The most likely thing this fixes is touch input.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.fb-notify.enable) {
|
||||
mobile.boot.stage-1.tasks = [ ./msm-fb-notify-task.rb ];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user