Ralink RT2800 Warning TX status “fix”

I have some of the ubiquitous USB Wifi sticks with a chipset using the Ralink rt2800 driver. I noticed that while it works fine, I got a lot of dmesg errors like:

rt2800usb_txdone: Warning – Got TX status for an empty queue 2, dropping
rt2800usb_entry_txstatus_timeout: Warning – TX status timeout for entry 14 in queue 2

I’m not a big fan of dozens of dmesg logs per second, so I quickly found this answer that worked for me:

sudo iwconfig wlan1 power off

which according to man iwconfig disables power management. When I’m hanging out with a coffee can Wifi antenna, I’m not interested in saving a few mW so this seems a harmless choice. Note I think you’ll have to type it again after reboot or logoff.


Fixing SSH Access Denied for Github

Github suggests that you use the SSH Agent, but even that may not work when you have a lot of SSH keys. You need to setup your ~/.ssh/config file so that SSH to github.com uses the correct SSH Public Key the first time. Here’s how.

nano ~/.ssh/config

and add the lines

Host github.com
        Hostname github.com
        User git
        Port 22 
        IdentitiesOnly yes
        PubKeyAuthentication yes
        IdentityFile ~/.ssh/MyGithubKey

where MyGitHubKey is the key you created following the process (without ssh-agent)

Then switch your remote URL to SSH

Restarting Unity desktop in Ubuntu

If your desktop seems to freeze for more than a few seconds, trying pressing together the keys
Ctrl Alt F1
and then login with your username and password, and type
unity & disown
This will leave your desktop/apps all as they were while fixing the broken state.

To just restart the whole Unity desktop (which is like unto logging out and logging in, discarding your current desktop), instead type
sudo service lightdm restart

Updating BIOS in Gigabyte GA-Q87M-D2H to handle Haswell Refresh processor

This otherwise great motherboard is currently (June 2014) shipping with the F6 BIOS, which means the system acts almost completely dead if you have a Haswell Refresh (e.g. i7-4790) CPU installed. To make things more fun, my motherboard was NOT Qflash enabled, and I certainly don’t have Windows, so my only option was DOS flashing. I had the same issue with Intel-made Q67 motherboards, so it’s not just Gigabyte with this bad situation.

To fix this you will need a Haswell, non-Refresh CPU. Worst case, go buy a cheap G3220 for $30-40 since you’ll need it just to flash. This of it as a “tool” that you can partner up with a cheap motherboard for a media center or something.

Linux directions (for Windows, see comments at the bottom from “Frustrated”):
Once you’ve installed the non-Refresh Haswell CPU, from another PC, do:

sudo apt-get install unetbootin

run unetbootin and install FreeDOS 1.0 to a flash drive.

Then, go to gigabyte.com and download the F7 (or whatever version they’re up to now) BIOS self-extracting EXE. Copy ALL the files to the root of your FreeDOS flash drive from Linux.

Put the flash drive into the Gigabyte PC (USB 2.0 or 3.0 port is fine) and upon booting, select SAFE MODE from FreeDOS — the flash utility will NOT work otherwise!

In FreeDOS prompt, type

The process takes about 5 minutes. You don’t have to answer any questions, you will just see an Erasing and Writing with text progress. When done the system will reboot about 6 times rapidly, don’t bother it till you see FreeDOS is back.

Then remove FreeDOS USB stick and go about setting up your new PC as usual.


802.1x wireless WPA2-Enterprise without certificate: Ubuntu 14.04

NetworkManager in Ubuntu 14.04 has an issue with 802.1x networks that don’t require the laptop to have a .cert file. A bug report has been launched in regards to this.

Note: the following discussion can subject your laptop to “man-in-the-middle” attacks by disregarding the need for a .cert file. However, if your network IT dept. doesn’t provide you a .cert file and their policy is not to, you might discuss with them if the following is an appropriate solution.

1) find the name of the wireless network you want to connect to by typing in Terminal:
ls /etc/NetworkManager/system-connections
let’s assume your network SSID is “sortOfSecureWifi”.
Then type
sudo nano /etc/NetworkManager/system-connections/softOfSecureWifi
and it will look like (note the ?yourdata? is specific to your PC, don’t change it)

Note: In particular, if there is a line system-ca-certs=true, change it to


WARNING: This configuration can impact network security. Discuss this with the responsible network admins for your network FIRST! However, many networks don’t currently use certificates, yet Ubuntu 13.04/13.10/14.04 keep trying to look for a certificate via NetworkManager







then reboot and see if you can connect. A sign that system-ca-certs=true is happening is by:

grep "TLS: Certificate verification failed, error 19 (self signed certificate in certificate chain)" /var/log/syslog

Matplotlib Python3: fixing pyplot.imshow()

I have noticed on my Ubuntu 14.04 PCs and have seen other OSs having issues with python3 and matplotlib.pyplot.imshow().

Errors like:

NotImplementedError: Surface.create_for_data: Not Implemented yet.

and getting blank images.

I fixed the problem by switching the matplotlib backend as follows:
1) placing a file named “matplotlibrc” in the directory of my Python .py code (current working directory), with the contents
backend : qt4agg
2) installing the prerequisities:
sudo apt-get install python3-pyqt4 python3-sip