Self Compiled Kernel Stops Booting in Ubuntu 14.04 [Fixed]

After switching from Ubuntu 12.04 to 14.04 I've noticed my self compiled kernels would not boot well. There was always an error that a device (root / and swap) could not be mounted. Also I could no longer mount removable devices, such as USB sticks.

It turns out this is because Ubuntu now requires in kernel automounter support version 4. The config entry is CONFIG_AUTOFS4_FS=m. Then everything worked again.

Fix for blank screen or black display after resume with open source radeon drivers in Xorg

The bug was reported in detail here. The fix comes in two ways:

For just echo mem > /sys/power/state to work, use the 

1. kernel boot parameters nomodeset acpi_sleep=s3_bios,s3_mode
-> You have to test which of the s3_bios or s3_mode settings work for you. You may also use number 1, 2, and 3 in /proc/sys/kernel/acpi_video_flags instead to change the setting at run time. 

2. For pm-suspend to work (e.g. *Ubuntu) you need to create a file
/etc/pm/config.d/radeon  which contains  QUIRK_S3_BIOS="true"  QUIRK_S3_MODE="true"
3. To have working mode setting, load the radeon module with modeset=1, by creating a file 
"options radeon modeset=1"

Good luck!

Converting OpenCard Files to Anki [manual approach]

It's a bit troublesome, a better solution would probably be to create an XSLT file as an export filter from Impress to CSV. (A good start for this would be the <draw:text-box> tag.) But with a bit of effort this works, too.

1. Open opencards file in impress.
2. Copy all cards into clipboard
3. Paste cards into Openoffice
4. Export file as Text file
5. Open Text file in Text editor
6. Find and replace all ";".
7. Find all question and answer fields and seperate them by ";"
8. Import into Anki.

There also seems to be a way to do this by converting the slides to powerpoint, then using this macro. I'm giving up for now. Any more hints would be appreciated, because I still have tons of cards! :)

Dipl.-Jur. Dennis G. Jansen, LL.M. (Berkeley)
Tel. 0163 834 8558 | LinkedIn
Master of Laws, University of California, Berkeley, School of Law ("Boalt Hall")
Certificate in Law and Technology, University of California, Berkeley, School of Law ("Boalt Hall")
Certificate in Transnational Legal Studies, Georgetown University Law Center
Certificate in Internationalization of Law, Free University Berlin
Diploma of Law, Free University Berlin

Fix for "GLX error: Can not get required symbols" in Xorg log file / No 3D graphics with radeon Open source driver

If you get the error: "(EE) GLX error: Can not get required symbols" when trying to use the open source "radeon" driver, and you have AMD's fglrx installed, I will tell you a very simple and fast fix. Most people will recommend to completely uninstall the fglrx driver, but there is much simpler and faster fix for that.

First, check if this is really the issue:
sudo /usr/lib/fglrx/switchlibglx query

If the command tells you that the AMD driver is currently in use, you have to switch to the "intel" driver in order to use the open source radeon driver. This is also very simple:

sudo /usr/lib/fglrx/switchlibglx intel

Now restart your X Server, or your computer if you wish, and you should be all set! And if you want to use fglrx again, remember to switch back with:
sudo /usr/lib/fglrx/switchlibglx amd

Enjoy! And let me know if this worked for you!

How to configure Darktable with OpenCL for your AMD APU

I was really curious for a piece of working opencl software. Then I found out that a software I love actually also does opencl! The only issue is, it did not work by default on my system with AMD APU, because the assigned graphics memory by my BIOS did not suffice. I can only dedicate a maximum of 512 MB to the GPU part of the APU. But this is probably also the minimum for a good setup.

Setting up the AMD OpenCL SDK is a requirement for this to work! Also you have to enable OpenCL support in the Darktable configuration. Also be aware that this may crash your system as the fglrx driver is not very stable with OpenCL yet. In my experience it likes to crash especially after a suspend to ram.

Anyway, so after all this what you have to do is to edit your darktable config file manually. Make sure to make a backup and then add these lines to .config/darktable/darktablerc:

Issue a "sync" command before starting darktable to be sure you don't lose data with a possible crash! ;)

These numbers work pretty well for me on a system with 512 MB dedicated memory. But they should probably work more or less on any AMD APU. I have bad experience with higher and lower numbers than these. Also I think vaapi/xvba did not work at the same time. You can still enable and disable OpenCL on demand in the GUI settings menu.

Let there be OpenCL! Enjoy!

Darktable: Twice as fast with OpenCL!

In my setup (AMD A4), using opencl with darktable is about twice as fast as using the dual-core cpu. 

It's not working out of the box, though. Not even if you have installed the OpenCL SDK by AMD.  Because my BIOS only allows me to set up to 512M as vram for my GPU/APU. But then I thought let's just try what happens and set the required memory in darktable down to 250M. And it worked. And it worked great. I get a great speed increase:
OpenCL (zoom to 200%): [dev_process_image] pixel pipeline processing took 3,574 secs (0,460 CPU)
GPU (zoom to 200%): [dev_process_image] pixel pipeline processing took 6,442 secs (11,640 CPU)

And as you can see, the CPU is hardly used anymore, so it could do something else at the same time!

My setup:
Ubuntu 12.04
Darktable 1.4~rc1

Conclusion: It appears you can set the requirements lower. A 2x speed increase for standard activities is really worth it! See the next post for how to set up Darktable for AMD APUs.

Using the Kernel NTFS driver with Ubuntu

To make life easier for the average user, Ubuntu installed a link at /sbin/mount.ntfs to ntfs-3g, thus automatically mounting all ntfs drives with the ntfs-3g driver. Unfortunately this makes it impossible for you to use the classic driver. But you can fix this issue by changing the name of the link:

sudo mv /sbin/mount.ntfs{,-backup}

Then a simple mount will use the kernel driver by default. To revert to the default setup, use this command:

sudo mv /sbin/mount.ntfs{-backup,}

Speeding up NTFS writes in Linux

Sometimes you want to do some serious operations on ntfs volumes in Linux - and if it's only virus scanning. This can be slow. It will probably still be slow with this trick. But hopefully a bit less:

sudo mount -o remount,big_files,noatime /media/somedir
PS. You just might be able to speed up your reading speed by using the kernel driver.

Ignore Package Dependency in dpkg

If you want to install a package, which has a dependency you want to ignore, e.g. because it's wrong, outdated or unnecessary, you may use this command:

sudo dpkg -i --ignore-depends="nvidia-experimental-310:i386" Downloads/beat-hazard-ultra_1.66_20130308_i386.deb 

This example fixes installation for the Beat Hazard Ultra Debian package, which for some odd reason requires a special version of a certain nvidia driver.

Fixing a Broken Cursor with AMD/ATI fglrx Drive: Steam, Braid, Wine: Option UseFastTLS 2

If you notice a broken cursor, which may means the cursor
  • doesn't show up at all
  • is a black square
  • is a square mixed black and/or with parts of another screen area or the screen background (Steam)
or you have display issues when running wine, try this option in your xorg.conf:

Option "UseFastTLS" "2"

If this works for you in a situation which is not described above, please post a comment. Otherwise, e.g. if you don't know what xorg.conf is and where to find it, please use google for further information.

Installing Windows 8 on USB - The easy way

There are several different guides for installing Windows 8 on a USB disk, which often unpack an installation file of install.wim, which is no longer available with Windows 8.1 and may be difficult to use. So I want to mention two rather easy ways I've found to work for me:

1. Install with a VM

You can setup VirtualBox to use a raw hard drive as one of its drives. If you mount that drive and a Windows 8 installation ISO, you will be able to install Windows very quickly. Usually a simple reboot should be enough to be able to use Windows. 

2. Simply copy the files of an existing installation. (caveat: Apps no longer worked for me, and it was very slow)

3. If booting does not work, manually set up the boot disk
- Copy bcdboot from x:\windows\system32\bcdboot to your windows drive, e.g. C:.
- Use it to make drive X bootable: C:\bcdboot X:\windows /s b:

Of course the target drive X should be a primary partition formatted with nfts already and the partition should be active.

Have fun!

Removing Crossover Deletes All Your Bottles

You have to be extremely careful when uninstalling crossover, because generally, it will always remove all your bottles of all your applications. This means if you have an Office or Picasa or some other installations, they will silently completely disappear.

There are only limited options:
a) Install/Uninstall via your package manager, e.g. the Debian .deb package.
b) Save the installed applications via Archive or moving the .cxoffice directory from your home directory to another location and name.
c.) Remove crossover manually with: rm -rf /opt/cxoffice.

Do NOT simply use /opt/cxoffice/uninstall, as it will remove all your custom installations wihout warning.

There really are no other options. I've contacted support and all they did was point me to this link.

Darktable Open Source RAW Darkroom

I've just become a fan of this amazing piece of software. Just everything about it seems to be perfect. The noise reduction is stunningly good while preserving details. The sharpener brings out crips details down to the single pixel. You may even be able to tether you camera via USB and control your camera's settings and shooting with live view directly from your computer. It even does some tone mapping, imports GPS data into your photos and more. I was going to say now it only has to take the photos itselt. But with tethering, in a way, it already does. :)

Simply fascinating. Try it out!

Hints: Check out some tutorials if you get stuck.

Quickly Shrinking the File Size of a PDF File on the Command Line in Linux

Ok, I'm most linking to a great page here. But I'll also give you my favorite choice: GhostScript, which is available almost on every system and did a terrific job in my test:

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

Of course it also takes other formats like ps and eps or jpg as input!

Automatically Disable your Touchpad - Enhancing Palm Detection in Linux

I have already posted an entry somewhere on this blog on how to disable your touch pad if you plug in a usb mouse. But I've just found out that the arch wiki has a great summary on different kinds of touch pad settings including for a better palm detection:
synclient PalmMinWidth=4 PalmDetect=1

This works excellently for me - and I have a new system with a rather large touch pad. Enjoy! And as always: Please share your experience and ideas!

Fixing Panasonic LUMIX Wifi - "Connection to Access Point Failed"

This error occurred to me with a Fritz Box as access point and WPA/WPA2 mixed mode. The first time the camera still connected, later attempts failed. After switching the network mode to WPA2 only, it worked again.

Update: I've upgraded to Firmware v. 1.1 and the issue disappeared.

Otherwise you can probably try resetting the camera settings. Good luck!

A Smear Safe Android Lock Screen

You know that when you use a lock screen, it's often quite easy to know your combination by simply looking at the grease traces of your display? Well now there's finally an app against that. And it's called SmearSafe. Apparently, it was developed by people connected to the University Stuttgart. I've checked the whois entries and saw that the domain is really registered to the name of the professor of the University Suttgart. Further than that, I can't really validate their identity. But it appears ok.

The app works by changing around the image in a way that the way you have to move your fingers is different each time. I.e. it turns, distorts, moves and mirrors the image in different ways. This way the smears get mixed up and it's pretty much impossible for someone who sees your hand movements to guess your login. Of course, it may also require a bit more brain power on your side.

Let me know how it goes for you! Note: I had to set it up twice before it actually started to work on my phone. And it will request admin priviledges to be able to unlock your screen without being set to root. Closes

I've recently found out the USA service seems to end. It's still going on in other countries, though, apparently. Well the margins in the VoIP business must be smaller than I thought. Very sad, as Sipgate used to always have great service and good quality in my experience. But I guess it's hard to compete with Google in the same market.

Decrypting Android Encryption is Really Easy

Especially if you encrypt your phone only with a PIN, it appears that it's quite easy to find that PIN. More than that, there is already a script on github which automates a lot of the process.

Now the unanswered issue is: Which command do you use to mount the partition in Linux?

In any case: be aware, the encryption does not protect you much at all. Of course that's what you should expect with a 4 key (usually numeric) PIN.

Disable Customized Ads in Google

Google has a webpage where you can opt out of apps customized to your profile. Note that the popup will be high up on the page, where you probably won't see it until you scroll back up.