Skip to content

Instantly share code, notes, and snippets.

View mfenniak's full-sized avatar

Mathieu Fenniak mfenniak

View GitHub Profile
diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
index fceffe2082ec..ed3633c5955d 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -145,6 +145,10 @@ static struct quirk_entry quirk_asus_ignore_fan = {
.wmi_ignore_fan = true,
};
+static struct quirk_entry quirk_asus_zenbook_duo_kbd = {
+ .ignore_key_wlan = true,
diff --git a/drivers/gpu/drm/i915/display/intel_backlight.c b/drivers/gpu/drm/i915/display/intel_backlight.c
index 071668bfe5d1..835aac02ee13 100644
--- a/drivers/gpu/drm/i915/display/intel_backlight.c
+++ b/drivers/gpu/drm/i915/display/intel_backlight.c
@@ -1465,7 +1465,7 @@ static bool cnp_backlight_controller_is_valid(struct drm_i915_private *i915, int
if (controller == 1 &&
INTEL_PCH_TYPE(i915) >= PCH_ICP &&
- INTEL_PCH_TYPE(i915) <= PCH_ADP)
+ INTEL_PCH_TYPE(i915) < PCH_MTP)
@mfenniak
mfenniak / immich.nix
Last active September 20, 2024 20:58
NixOS configuration for Immich, based upon upstream docker-compose.yml
{ config, ... }:
let
immichHost = "immich.example.com"; # TODO: put your immich domain name here
immichRoot = "/tank/immich"; # TODO: Tweak these to your desired storage locations
immichPhotos = "${immichRoot}/photos";
immichAppdataRoot = "${immichRoot}/appdata";
immichVersion = "release";
immichExternalVolume1 = "/tank/BackupData/Google Photos/[email protected]"; # TODO: if external volumes are desired
@mfenniak
mfenniak / YNAB_Report____Google_Sheets.json
Created October 31, 2023 18:50
n8n Integration to Copy Data from YNAB to Google Sheets
{
"name": "YNAB Report -> Google Sheets",
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
-520,
@mfenniak
mfenniak / detect-reboot-needed.nix
Created January 6, 2023 15:39
NixOS module that provides hourly notifications when a reboot is needed for a kernel, initrd, or kernel-module upgrade
{ pkgs, ... }:
let
readlink = "${pkgs.coreutils}/bin/readlink";
notify-send = "${pkgs.libnotify}/bin/notify-send";
in {
systemd.user.services.detect-reboot-for-upgrade = {
script = ''
set -eu -o pipefail
@mfenniak
mfenniak / mdcheck.nix
Last active December 4, 2022 21:29
NixOS module to add mdcheck capabilities, which automatically scrubs swraid md devices on a fixed schedule; eventually I'd like to upstream this to nixpkgs but just shoved it here for now...
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.hardware.raid.swraid.monitor;
in
{
options.hardware.raid.swraid.monitor = {
@mfenniak
mfenniak / sink-pin.rs
Created February 21, 2021 20:45
Not sure how to resolve this Rust compilation issue
pub struct SqsSink {
// ...snip...
sqs_client: SqsClient,
send_message_future: Option<std::pin::Pin<std::boxed::Box<dyn futures::Future<Output = std::result::Result<rusoto_sqs::SendMessageBatchResult, rusoto_core::RusotoError<rusoto_sqs::SendMessageBatchError>>> + std::marker::Send>>>,
}
impl Sink<Arc<Box<dyn MessageChunk>>> for SqsSink {
type Error = ();
// ...snip...
fn poll_flush(mut self: std::pin::Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
@mfenniak
mfenniak / dashboard.json
Last active January 25, 2020 15:07
iotawatt power & energy Grafana dashboard
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@mfenniak
mfenniak / gist:d1bfa2c1c94ee9980113e70ba19ca563
Created May 23, 2017 14:04
4.9.27-14.31.amzn.x86_64 ena issue
May 21 12:05:37 ip-172-16-15-126 ec2net: [get_meta] Trying to get http://169.254.169.254/latest/meta-data/network/interfaces/macs/06:1e:aa:71:34:ca/local-ipv4s
May 21 12:05:37 ip-172-16-15-126 ec2net: [rewrite_aliases] Rewriting aliases of eth0
May 21 12:06:50 ip-172-16-15-126 dhclient[3314]: XMT: Solicit on eth0, interval 125920ms.
May 21 12:07:59 ip-172-16-15-126 consul[3614]: 2017/05/21 12:07:59 [INFO] consul: New leader elected: i-0f14d98ae903e7de2
May 21 12:08:56 ip-172-16-15-126 dhclient[3314]: XMT: Solicit on eth0, interval 114310ms.
May 21 12:10:51 ip-172-16-15-126 dhclient[3314]: XMT: Solicit on eth0, interval 119760ms.
May 21 12:12:51 ip-172-16-15-126 dhclient[3314]: XMT: Solicit on eth0, interval 115570ms.
May 21 12:13:36 ip-172-16-15-126 consul[3614]: 2017/05/21 12:13:36 [INFO] serf: attempting reconnect to i-0bd3ab67982f1fe55 172.16.17.249:8301
May 21 12:14:46 ip-172-16-15-126 dhclient[3314]: XMT: Solicit on eth0, interval 114980ms.
May 21 12:15:54 ip-172-16-15-126 consul[3614]: 2017/
@mfenniak
mfenniak / gist:56f050b9a4877d1b07388e4d01de829c
Created May 23, 2017 14:00
4.4.51-40.58.amzn1.x86_64 ena output
May 17 06:30:26 ip-172-16-15-126 consul[13099]: 2017/05/17 06:30:26 [INFO] serf: attempting reconnect to i-0ffe3ee8de2922539 172.16.14.98:8301
May 17 06:30:46 ip-172-16-15-126 consul[13099]: 2017/05/17 06:30:46 [INFO] agent: Synced node info
May 17 06:31:35 ip-172-16-15-126 dhclient[3332]: XMT: Solicit on eth0, interval 109170ms.
May 17 06:31:39 ip-172-16-15-126 consul[13099]: 2017/05/17 06:31:39 [WARN] memberlist: Refuting a suspect message (from: i-09ee29f77300a149d)
May 17 06:32:45 ip-172-16-15-126 consul[13099]: 2017/05/17 06:32:45 [INFO] serf: EventMemberJoin: i-03549fcaa8f4e1636 172.16.15.66
May 17 06:32:49 ip-172-16-15-126 consul[13099]: 2017/05/17 06:32:49 [INFO] memberlist: Marking i-057b08569e51a333d as failed, suspect timeout reached
May 17 06:32:49 ip-172-16-15-126 consul[13099]: 2017/05/17 06:32:49 [INFO] serf: EventMemberLeave: i-057b08569e51a333d 172.16.16.105
May 17 06:32:53 ip-172-16-15-126 consul[13099]: 2017/05/17 06:32:53 [WARN] memberlist: Refuting a suspect me