Skip to content

Instantly share code, notes, and snippets.

View polter-rnd's full-sized avatar

Pavel Artsishevsky polter-rnd

View GitHub Profile

MSI GS63VR PulseAudio Configuration

The MSI GS63VR and similar late model MSI laptops have a known issue with it's audio card: The internal speakers work fine, but the headphone jack is painfully loud, and the volume cannot be adjusted.

Online Research

ArchWiki suggests using hdajackretask from the alsa-tools package to reassign the microphone jack as a headphone jack, but I've found that the quality is sub-par. Many other hdajackretask configurations will yield audio on any combination of the speakers, headphone jack, and microphone jack simultaneosly, with only one or two yielding sound only from the headphone jack, still without volume control from PulseAudio. Some of these configurations require another jack to be enabled simultaneously, with no apparent reason as to why. Even after one of these configurations are found, the results are unpredictable across a reboot.

@dojoe
dojoe / dkms-module-signing.md
Last active April 24, 2024 18:50
Make DKMS sign kernel modules on installation, with full script support and somewhat distro independent

On systems with UEFI Secure Boot enabled, recent Linux kernels will only load signed modules, so it's about time DKMS grew the capability to sign modules it's building.

These scripts are extended and scriptified variants of https://computerlinguist.org/make-dkms-sign-kernel-modules-for-secure-boot-on-ubuntu-1604.html and https://askubuntu.com/questions/760671/could-not-load-vboxdrv-after-upgrade-to-ubuntu-16-04-and-i-want-to-keep-secur/768310#768310 and add some error checking, a passphrase around your signing key, and support for compressed modules.

dkms-sign-module is a wrapper for the more generic sign-modules which can also be used outside of DKMS.

Installation

  1. Create a directory under /root, say /root/module-signing, put the three scripts below in there and make them executable: chmod u+x one-time-setup sign-modules dkms-sign-module
@electrawn
electrawn / wordpress-ab.sh
Last active March 16, 2022 10:29 — forked from brentertz/ab.sh
Wordpress logged in user performance test with apache bench
#!/bin/bash
# For cygwin, APACHEBENCH could be /usr/sbin/ab2, else ab will suffice on linux/unix systems.
APACHEBENCH=ab
COOKIE_JAR="ab-cookie-jar"
USERNAME="foo@bar.com"
PASSWORD="password"
HOST="127.0.0.1"
BASEURL="http://$host"
LOGINURL="$baseurl/wp-login.php"