Diagnostics

After upgrading to Ubuntu 14.04 Trusty Tahr, my laptops’s wifi connection was unreliable, unstable and horribly slow in different wireless networks. Examing the situation in /var/log/syslog, I encountered numerous logged events of the kind

Obviously, the iwlwifi driver for my Intel Corporation Wireless 7260 card had problems in keeping a connection for more than a few seconds. Searching the internet, I found this thread, tracing the problem back to certain drivers having problems with Wireless N networks/access points and WLAN connections over the 802.11n protocol. On that thread, the proposed solution is to disable the N protocol and go with probably slower but more reliable variants of the 802.11 protocol. And indeed, disabling 802.11N made my laptop’s wifi connections operating in a stable way again.

Temporary solution

For a temporary solution, e.g. to check if the proposed solution helps for your setup,
reload the iwlwifi kernel module with option 11n_disable set to 1, in order to disable 802.11N, e.g. by

sudo sh -c 'modprobe -r iwlwifi && modprobe iwlwifi 11n_disable=1'

You will be asked for your sudo password as you need root privilegues to reload a kernel module.

Permanent solution

For permanently disabling 802.11N in the driver, add the line

options iwlwifi 11n_disable=1

to

/etc/modprobe.d/iwlwifi.conf

or issue the following bash command, that does the above automatically. You will be asked for your sudo password as we are modifying a system file.

When I recently received my new Asus PB248Q monitor, I searched the internet for a Linux tool to test the new monitor quickly for dead pixels. The only piece of software I found was monitest, which is not available in recent Ubuntu versions. After reading another post, I soon realized that it is fairly easy to set up a LCD dead pixel test on my own by creating four bitmaps, each single colored in red, green, blue and white, resp. Viewing the images in fullscreen mode in a web browser or an image viewer such as geeqie lets you check the pixels of your monitor. Failed pixels will occur as black dots in the test images.

For the sake of simplicity, I provide the four test images in 1920×1200 resolution here for use and free download.

One after another, click on the images to view them unscaled. Switching your browser into fullscreen mode (e.g. by pressing F11) will let you check your LCD monitor for dead pixels from withing your browser.

As Ubuntu’s GUI front-end for bluetooth file transfers tends to crash for large files, I am reverting to command line tool obexftp from time to time. It is part of the standard ubuntu distribution and may be installed with

sudo apt-get install obexftp

However, obexftp turns out to be annoying slow. The reason for this are hard-coded settings for the maximum transmission unit (MTA). Increasing these accelerates obecftp significantly and makes it competitive with other tools. However, changing the settings requires patching the source code. The following builds upon a patch posted to a mailing list of the Fedora project.

Obtaining obexftp (and openobex, the core libraray) is a bit tricky, as there are various source code repositories out there. This sourceforge account seems to be the latest with a pretty recent release for download. Obtain both openobex and obexftp and extract the files to your local hard disk. Open file include/openobex/obex_const.h in the openobex directory and change the line

#define OBEX_DEFAULT_MTU 1024

to

#define OBEX_DEFAULT_MTU 16384

Building openobex and eventually obexftp gives you a great boost for bluetooth file transfers.

After logging in to a server via ssh running latest Debian stable, I was badly surprised to find all the filenames and directory names of my home directory to show up encrypted. I was presented with listings of ECRYPTFS_FNEK_ENCRYPTED.* entries. However, the contents of the files were properly unencrypted.

ecryptfs handles contents encryption separately from name encryption. So obviously, filename decryption was broken. Checking the number of entries in

wc -l /home/<USER>/.ecryptfs/Private.sig

revealed that indeed two entries exist (one key for contents, one for names). Unfortunately, the mounting options lacked the ecryptfs_fnek_sig option and thus, mounting happened without filename decryption.

Solution

After examing the /usr/bin/ecryptfs-mount-private script, I came up with the following fix of this temporary problem. From the solution we can tell that the problem would have been solved by rebooting the machine. This was not an option for me. We assume that you are logged in as the user that sees the filenames encrypted:

Unmount the home directory

sudo umount /home/<USER>/.Private

Clear the user’s keyring

keyctl clear @u

Mount the home directory. This will ask for your login password to unwrap the ecryptfs passphrases.

ecryptfs-mount-private

Filenames are now properly unencrypted.

Background

I am not 100% sure what caused the problem. Examination of the ecryptfs-mount-private script brought me onto the correct track. In the user’s keyring (keyctl show), the key to decrypt the filenames did not show up, while the content decryption key was present. As the main decryption key was present, mounting assumes that there is no filename decryption key and just unencrypts the contents.

I found a bug report on Ubuntu that tracks similar issues down to a race condition when mounting with ecryptfs. This bug would explain the missing second key in the keyring. Indeed, the patch has been applied only to the Ubuntu packages of ecryptfs-utils for versions 92, 96 and 100. Wheezy’s ecryptfs-utils packages version 99 does not seem to include that fix. I’ll keep an eye on this and file a bug report on Debian when this happens another time.

Diagonistics

On an Ubuntu 13.10 saucy system, there was no audio when connecting a TV via HDMI to a Lenovo Ideapad Z565 laptop.

Solutions

The native radeon kernel module has an optional flag to enable/disable audio over HDMI. By default, audio output is disabled. Not surprisingly, the corresponding parameter to the radeon kernel module is called audio (see for example modinfo radeon). There are numerous ways to load a kernel module with an appropriate parameter:

After upgrading an Ubuntu installation to 13.10, for some users certain keyboard shortcuts did not work as expected in gnome-shell (version 3.8). The keyboard shortcuts were configured to their default behavior before and did work for some users but not for all users on the system. In particular, the Alt + Tab combination and Caps Lock were affected.

Alt + Tab: Switch Applications vs. Switch Windows

The most annoying misbehavior let Alt + Tab switch to only one different application. It would not cycle through all open applications but stop on the first one. To fix this, I had to open

Settings -> Keyboard -> Shortcuts -> Navigation

and assign the Alt + Tab shortcut to Switch applications. In my case, it was assigned to Switch windows before.

Caps Lock: Incorrectly behaves as backspace

With another user, I observed that the Caps Lock key does not work as Caps Lock key, e.g. as permanent shift key. Instead, it worked as backspace key. For fixing this one, I installed gnome-tweak-tool

sudo aptitude install gnome-tweak-tool

started it and changed to the Typing tab. There, you will find a configuration key for Caps Lock key behavior that I set to Disabled, that wasconfigured to Map Caps Lock an Additional Backspace.

While I have no idea why the Alt + Tab key kombination stopped working after upgrading to Ubuntu 13.10, it might well be that I accidently messed up the Caps Lock settings.

Diagnostics

With my upgrade to Ubuntu 13.10 Saucy, the Lock screen option went missing in Gnome’s system menu. After some research, it turned out that gnome-screensaver was discontinued for Gnome 3.8. All screensaver functionality (and locking your screen is considered a screensaver functionality) was included in Gnome’s Display Manager GDM. As I am running Ubuntu’s default lightDM display manager, this was the reason for the lack of any screen locking.

Solution 1: Install Lock Screen Extension

There are two options to get screen locking back on Ubuntu 13.10 saucy and Gnome 3.8. If you want to stay with lightDM as display manager, install the Lock Screen extension from Gnome Extensions. If your browser includes the Gnome Shell Integration plugin, this is as easy as clicking on the switch button in the left section of the extension’s webpage.

Solution 2: Switch from lightDM to GDM

The second way to solve the problem is to switch from lightDM to GDM as display manager. As you are using Gnome 3.8 instead of Unity, this step makes sense anyway. Installation

sudo aptitude install gdm

will ask you to make a choice for your default display manager. If you have gdm installed already,

As an Ubuntu desktop user, I learned to appreciate adduser‘s –encrpyt-home option. It adds a new user with an encrypted home directory in a second. On Debian, adduser is lacking the –encrypt-home option and we require a few steps to add a user with an ecryptfs-encrypted home directory. Our roadmap here is to add a user with unencrypted home directory and then encrypt the home directory afterwards.

Install the ecryptfs utility scripts and their dependencies,

sudo aptitude install ecryptfs-utils

Add a new user with unencrypted home directory,

sudo adduser NEW_USER

Encrypt the home directory by migrating it from unencrypted to encrypted

Absolutely mandatory, login to the new user account now to have ecryptfs’ key encrypted with the new user’s password and written to disk,

sudo login NEW_USER

When logged as NEW_USER, unwrap ecryptfs’ key and store it at a safe place. This will give you access to your encrypted home directory without the need to login (e.g. by mounting it).

ecryptfs-unwrap-passphrase

Remove the unencrypted copy of the user’s home directory. The last lines of output of ecryptfs-migrate-home give you the path, along with other useful information you should read through.

Please note that ecryptfs-migrate-home places the encrypted version of NEW_USER’s home directory in /home/.ecryptfs/NEW_USER, no matter what partition or directory the user’s home directory is located in. As this directory is hardcoded into the ecryptfs-setup-private script (that is called by ecryptfs-migrate-home), the easiest way is to temporarily edit change the path by

gvfsd-obexftp crashes reliably, and taking the many bug reports on launchpad into account, it does so since years. Having used good old obexftp years before I was amazed to see the project still alive, with a change in maintainership and an updating release in the beginning of March 2013.

Browsing files

Browsing the files on your phone is a simple as

obexftp -b bluetooth_device -l folder_to_list

where bluetooth_device is the device ID of your bluetooth device (e.g. your mobile phone). Get the device ID for example from your Bluetooh Settings (Click the Bluetooth symbol in the top right corner of your desktop).

Putting files

However, when trying to copy files to the phone, my endless trials ended always in

The operation failed with return code 96

errors. It took me a while to figure out that the order of command-line arguments to obexftp matters. For putting files, you need to specify the phone’s current directory with the -c option and this one must preceed the -p argument. So while