AMD Radeon screen flicker on movement 2015/2016

Since the second to latest kernel update of debian stable my screen flickered in normal xfce4 when there was movement on the screen. I thought it was a bug because i had nothing changed but the recent kernel update did not fix that. It took me some time but if you experience the same you may want to take a look at the dynamic power profiles which according to this

can lead to flickering when the card changes its frequency. I could not change the value with root so I changed the setting (=disabled) via this boot (grub2) parameter:


This worked for me.

List all installed daemons on debian,

ubuntu and linux mint which can cost you a quick boot and a responsive system.

trigger@yourhost:~$ dpkg -S /etc/init.d/* | grep -Eo ".*:" | sed "s/://g" | sort | uniq

(Basically this command links all files in /etc/init.d/ to their debian package and shows them.)

xbmc show nvidia gpu temp with nouveau

… is a bit tricky but I made it:

 <cputempcommand>sensors|sed -ne "s/Core 1: \+[-+]\([0-9]\+\).*/\1 C/p"</cputempcommand>
 <gputempcommand>sudo nvclock -T | grep -oE "[0-9]{1,}[C,F]" | sed "s/C/ C/g" | sed "s/F/ F/g"</gputempcommand>

Howto update-safe change Grub2 default to windows

On debian (ubuntu / linux mint should work too) this is quite simple. Grub2 takes menu entry names as default options. This can be done here:

# filename: /etc/default/grub
# search for or add if it not exists:
GRUB_DEFAULT='Windows 7 (loader) (on /dev/sda1)'

Your install might differ. GRUB_DEFAULT takes the menu entries from your grub.cfg usually placed in /boot/grub/

grep -o "menuentry '.*'" /boot/grub/grub.cfg

And here it is:

menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-XXXXXXXXXXXXXXXXX'

All what is left to do is update grub as super user:


Howto speed up your apt-get like never before

… is quite simple. You get your hands on eatmydata. Yes it’s not a convincing name but hey it’s in the standard repositories of debian and ubuntu so it should do you no harm :-)

sudo apt-get -y install eatmydata

How to use it

sudo eatmydata apt-get <your regular stuff / install / update /...>

Try it on installs. It is SO MUCH FASTER.

Why the speed? Are there risks?

Normally programs like apt-get are very much power-loss persistent. If there is a sudden power loss you can pretty much resume where you got interrupted. This is possible because apt-get checks often if the data that should be on the disk is really written to it. Old school nerds may know the tool “sync” which is basically what apt-get does a lot.

This is very time consuming because file systems like ext4 and btrfs are not used to being forced to write all the time. They want to keep stuff in buffers and write when they decide it’s time. The is part of the magic speed they can achieve. Eatmydata redirects calls from following programs to sync-like functions programs into the void. Eatmydata makes other programs think they work pretty safe but actually they are not (and hell of a lot faster).

So it’s really fast but you really shouldn’t loose power (or sth. similar) when using eatmydata. But hey my last power failure is years from now and how are the chances you’re using eatmydata in this very moment? I wouldn’t recommend it for cronjobs though.

Update: Problems with Xbian on the Raspberry PI (rpi)

Looks like eatmydata causes problems on the raspberry pi with xbian installed. apt-get / dpkg exits with an error from time to time. But one can always proceed with

sudo dpkg --configure -a

But nevertheless eatmydata is not recommended for the rpi.

Wake on lan remote control

I’ve written a small script to remote control a computer via wake on lan (WOL) packages. This could come in quite handy if my raspberry pi finally arrives but any HTPC owner could make use of this too. (You don’t want to run xbmc along with your torrent client (and vice versa) all day long, do you?)

It’s available here:

How it works:

It basically executes predefined commands on the amount of WOL packages received without a timeout. Just arm your android smartphone with a WOL app, send e.g. two WOL pkgs and your box will execute whatever you told it to do. It needs root (because it depends on pcapy ) so you’re strongly advised to use sudo wherever you can.

Note (Update):

AFAIK the raspberry pi is not capable of booting up due to a WOL package. Of course it can receive and handle them nonetheless.


Automated shutdown paranoid edition

One time I relied heavily on the ntfs-3g driver and it killed my ntfs-partition. Since then I always check if any mounted ntfs partition is umounted properly. For automation here is a code snippet for debian (ubuntu?). If a mount point in /media cannot be unmounted there will be no shutdown.

for f in `mount | grep /media/ | awk '{ print $1; }'`;

! umount $f && exit


shutdown -h 1