NixOS / nixos-hardware

A collection of NixOS modules covering hardware quirks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Thinkpad X1-nano has a docuemented issue with audio interference with an easy fix

queer-bird opened this issue · comments

Hello, as mentioned the Thinkpad x1 Nano has an odd issue where the headphone jack always provides awful interference in Linux. It also affects the x1 Carbon apparently, but that is not the laptop I have, there are probably others. There is a fix however. using the tool hda-verb in the package alsa-tools one can run the command:

sudo hda-verb /dev/snd/hwC0D0 0x1d SET_PIN_WIDGET_CONTROL 0x0

This instantly fixes the issue, but it must be run every time the system is started. Easily scripted of course.

I am wondering if this could be somehow implemented in the NixOS-hardware flake. I'm sure it could be, but the real question is would it be difficult?

I did some research and figured out a relatively clean way to implement this. Made my first pull request ever.
#862