Monday, August 29, 2016

Make plasma panel visible again after disconnecting external display

I've been having this weird issue which is apparently known, but the workaround I got from https://bugs.kde.org/show_bug.cgi?id=356225 is below:

In $HOME/.config/plasma-org.kde.plasma.desktop-appletsrc there's a section "[Containments][1]". There within the option "lastScreen" often refers to the wrong screen, i.e. "1" instead of "0". When I change that option to "lastScreen=0" before starting the KDE session the panel is visible again on my laptop screen if it is the one and only available screen.

This is an important workaround because this panel not showing up on my laptop prevented my wifi from connecting and caused other odd behaviors.

Thursday, August 18, 2016

Ralink RT3290 Bluetooth in Arch Linux

I've been having all sorts of weird issues getting bluetooth to work in Arch. My card is the Ralink RT3290 Wireless 802.11n 1T/1R PCIe which is both a WiFi and Bluetooth controller.

Found this on the Arch AUR site (https://aur.archlinux.org/packages/rtbth-dkms/?comments=all) and I knew I was on the right track because the author mentioned his machine would freeze when rmmod the bluetooth driver which is a symptom I also had.

By the way, you also need to have installed the rtbth-dkms package from the AUR (and linux-headers). And finally, afterwards I couldn't get high quality sound (A2DP) to work until I unpaired and re-paired my head phones....WHEW.
And oh yeah, everytime I shutdown I get a "watchdog didn't stop" and after a minute or so of waiting I have to hard power off. Still looking into that, but didn't happen before all this.

1. blacklist the module to Prevent it from load on boot:
#echo "blacklist rtbth" > /etc/modprobe.d/ralink-bt.conf

2. Local script, / usr / local / sbin / rtbth, to load and start rtbt tool:

#!/bin/bash
sleep 5
/sbin/modprobe --ignore-install rtbth; /usr/bin/mknod /dev/rtbth c 192 0; /usr/bin/rtbt &

3. systemctl service, the /etc/systemd/system/rtbth.service file:

[Unit]
Description = Fix rtbth bluetooth after gmd start
After = display-manager.service

[Service]
Type = oneshot
ExecStart =/usr/local/sbin/rtbth
TimeoutSec = 0
RemainAfterExit = true

[Install]
WantedBy = multi-user.target

4. enable it to start on boot:
#systemctl enable rtbth

Calculating date offsets with datemath

A quick utility for performing date calculations on the CLI.

Example:
datemath "8/22/16 - 1/11/16"
224

Monday, August 8, 2016

Use bleachbit to clear out unwanted file dregs

Free space on your file system from command line, more comprehensive than simply emptying your trash, good for privacy too.

sudo bleachbit --clean system.trash

From: https://bbs.archlinux.org/viewtopic.php?id=131374