User:Shackra/libreboot-volume-problem

From ParabolaWiki
Jump to: navigation, search

1 Fixing volume problem on Libreboot T60 machines

1.1 Introduction

If you have a Libreboot T60 from Gluglug (now Ministry of Freedom) you may have notice that every time you boot your laptop or turn it on after hibernation the sound card is muted and you have to revert this pressing the volume up button on the laptop. If this annoys you here is a solution for this issue.

1.2 Gathering information of the Thinkpad sound card

We will use amixer for reverting the mute state of the Thinkpad sound card, but we need to know the card number first.

cat /proc/asound/cards
 0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xe4440000 irq 29
29 [ThinkPadEC     ]: ThinkPad EC - ThinkPad Console Audio Control
                      ThinkPad Console Audio Control at EC reg 0x30, fw 79HT50WW-3.4

Therefore, the card of our interest is numbered 29

1.3 Writing the systemd service to revert the mute state

Finally, we have to write a systemd service to automatically reset the volume and revert the mute state of the ThinkPad Console Audio Control. Such service have to run after your laptop wakes up from suspension, hibernation or hybrid hibernation or after the computer boot up. Conveniently, writing services with such requirements is something very easy to do.

Note: This .service file is not completed yet. For some reason, the hardware does not obey amixer
File: /etc/systemd/system/sound-volume-reset.service
[Unit]
Description=Reset the ThinkPad Console Audio Control sound card
After=sleep.target

[Service]
ExecStart=/usr/bin/amixer -c 29

[Install]
WantedBy=sleep.target
WantedBy=default.target