Thursday, 20 April 2017

Fixing the Non-Working Thinkpad T510i Mic Mute Button on Ubuntu MATE 17.04

So, apparently, the mic mute button stopped working in Ubuntu. I remember it working in Ubuntu 16.04 but not 17.04. Anyways, I fixed it with this simple instruction from a user on AskUbuntu.

https://askubuntu.com/questions/125367/enabling-mic-mute-button-and-light-on-lenovo-thinkpads

This is what I did to fix the mic mute button on the Thinkpad T510i. The LED on it works now too. If you have a different Thinkpad, I suggest following the full tutorial on the AskUbuntu link above.

Anyways, this is what I did:

Created the file /etc/acpi/events/lenovo-mutemic

with the contents:

event=button/f20 F20 00000080 00000000 K
action=/etc/acpi/lenovo-mutemic.sh

Created the file /etc/acpi/lenovo-mutemic.sh

with the contents:

#!/bin/bash
INPUT_DEVICE="'Capture'"
YOUR_USERNAME="username"
if amixer sget $INPUT_DEVICE,0 | grep '\[on\]' ; then
    amixer sset $INPUT_DEVICE,0 toggle
    #echo "0 blink" > /proc/acpi/ibm/led
    su $YOUR_USERNAME -c 'DISPLAY=":0.0" notify-send -t 50 \
            -i microphone-sensitivity-muted-symbolic "Mic MUTED"'
else
    amixer sset $INPUT_DEVICE,0 toggle                       
    su $YOUR_USERNAME -c 'DISPLAY=":0.0" notify-send -t 50 \
            -i microphone-sensitivity-high-symbolic "Mic ON"'
    echo "0 on" > /proc/acpi/ibm/led 
fi

Important: Replace username with your Linux username.

Find your Linux username by typing "whoami" in the terminal.

Finally, I did this:

sudo chmod +x /etc/acpi/lenovo-mutemic.sh
sudo service acpid restart

Thank you random user on AskUbuntu!

How To Fix Graphical Glitches in Serious Sam Classic TFE & TSE under Wine

I wanted to play Serious Sam Classic: The First Encounter on my Thinkpad running Linux. (Ubuntu 17.04)

Unfortunately, the native Linux version doesn't run for me, for some reason. Maybe it's to due to the Intel graphics drivers. I also tried compiling the open source release of the Serious Engine but that failed to compile.

So, I decided to run it in Wine. Which "worked", but had severe graphical glitches making the game unplayable.

Apparently this is due to a "non-existant Z-buffer". To fix this, in Serious Sam The First Encounter or The Second Encounter, open the in-game console, either F1 or ~ . Then, type these 2 lines and press enter after each one:

/gap_iDepthBits=24
/ApplyVideoMode()

That should fix the issue.

Source: https://appdb.winehq.org/objectManager.php?sClass=version&iId=2288