Friday, July 25, 2014

Arch Linux Kernel Configuration

I have read several posts alluding to a kernel configuration file in /boot/config-, but I don't have that file.

According to http://wiki.linuxaudio.org/wiki/system_configuration I tried the following which produced a kernel configuration file:

$ cat /proc/config.gz | gunzip > /home/tward/Desktop/config-`uname -r`

Thursday, July 10, 2014

Mysterious missing bluetooth device

I've had this happen before, KDE swears I have no bluetooth device, despite no errors in journal or dmesg.

Even lsusb shows no bluetooth device.

Install "rfkill" and run

# rfkill list
...
1: dell-bluetooth: Bluetooth
Soft blocked: yes
Hard blocked: no
then
# rfkill unblock bluetooth

and everything works again.

Wednesday, July 9, 2014

Simplifying python2 vs python3 problems

In Arch Linux, python3 is default, so python2 programs have to be started manually, e.g. "python2 prog.py"

But sometimes that isn't enough either, so I found "virtualenv" which allows you to configure individual folders to work with an arbitrary python version.

First you configure the folder:

virtualenv -p python2 ~/myfolder/


Then before you run anything in that folder, you must source the generated script:

$ cd ~/myfolder/
$ source bin/activate
$ ./some_python_app

Tuesday, July 8, 2014

Laggy USB MIDI Piano Keyboard

In Arch 64bit, USB Midi Piano keyboard is laggy when plugged in. Pressing a key gives a delay of about 100-200 msec.

I resolved this previously by upping timer resolution with:

sudo su -c 'echo 1024 >> /sys/class/rtc/rtc0/max_user_freq'

But it didn't work this time (I haven't used the keyboard in months) so I found https://bbs.archlinux.org/viewtopic.php?id=113019 where a similar problem occurred for a USB typing keyboard, but the same fix worked for me.

$ sudo rmmod ehci_pci && rmmod ehci_hcd
$ sudo modprobe ehci_pci && modprobe ehci_hcd


Be warned, if you are using a USB keyboard, it will likely stop working after the rmmod statements, I'm on a laptop so the built in keyboard kept working.