Bitcoin donations are welcome:14snQXeLcnJtWUduKZ6rC2MHdPYrYar1Tw

Saturday, August 1, 2020

Avidemux on raspberry pi

Do this:

1.) You need this package:
wget http://ftp.br.debian.org/debian/pool/non-free/f/faac/libfaac0_1.29.9.2-2_armhf.deb
sudo dpkg -i libfaac0_1.29.9.2-2_armhf.deb
2.) And this:
apt-get install libglu1-mesa
3.) Now, thanks to this guy on https://avidemux.org/smif/index.php?topic=18811.0 (last post, first page), download the 2.7.5 ARMEL file from: https://www.dropbox.com/sh/1eurpo4lrphzzf0/AAAVfjDISjTuRLDX-TVBJbgSa?dl=0
4.) Use "7z e" to extract the file.
5.) Use the following command inside the dir with all the extracted packages to install avidemux:
sudo dpkg -i ./*
6.) Now you should be done, to start run from bash/cli:
avidemux3_qt5

Compressed Raspberry Pi ISO from Linux

Doing this clears up "empty" space on the drive so the iso get's properly compressed:

1.) Clear up Raspberry with temp file:
dd if=/dev/zero of=/tmp/zero1.tmp bs=1048576
2.) Delete tmp file:
rm -f /tmp/zero1.tmp
3.) Take SD card to another computer and create a compressed iso:
sudo dd bs=4M if=/dev/ | pv | xz > Pi.img.xz

Example: Currently have a 64GB iso compressed to 1,2GB. Actual drive usage of the 64GB iso is 3,6GB.

Thanks to:
https://www.locked.de/space-effective-backups-of-raspberry-pi-sd-cards/

Sunday, March 31, 2019

Multiscreen setup fluxbox and lightdm

In lightdm.conf:
[SeatDefaults]
display-setup-script=/usr/bin/screenres.sh

screenres.sh:
#!/bin/bash
 
mode="$(xrandr -q|grep -A1 "DP1 connected"| tail -1 |awk '{ print $1 }')"
if [ -n "$mode" ]; then
  xrandr --output LVDS1 --off
  xrandr --output DP1 --primary --mode 1920x1080
fi
mode="$(xrandr -q|grep -A1 "DP2 connected"| tail -1 |awk '{ print $1 }')"
if [ -n "$mode" ]; then
  xrandr --output LVDS1 --off
  xrandr --output DP2 --primary --mode 1920x1080
  xrandr --output DP3 --mode 1920x1080
  xrandr --output DP3 --left-of DP2
fi

Friday, June 29, 2018

Solution: kswapd0 using 100% cpu

So I googled a lot about this problem without finding any proper solutions for this problem. Some suggested disabling swappiness (=how long should the computer wait before disposing memory to swap in stead of RAM). But this only delayed the problem with full cpu load.

I researched a bit more by my self. It looks like the problem is kswapd0 is unable to store anything at the SWAP memory. So I tried formating/restoring the SWAP partition. I use LVM, but the procedure is the same for those without LVM.

Do the following:
> su
Get root credentials
> cat /ets/fstab
Find out the location of your SWAP partition. It's either /dev/something or if you are using LVM it can look like /dev/mapper/SOMETHING--vg-SOMETHING_1. Next turn off swap:
> swapoff /dev/mapper/SOMETHING--vg-SOMETHING_1
Then check & format swap:
> mkswap -c -L swap /dev/mapper/SOMETHING--vg-SOMETHING_1
And enable swap again
> swapon /dev/mapper/SOMETHING--vg-SOMETHING_1

Monday, July 17, 2017

Quality Pry Bar Tool Set

Found this pry bar tool set which seemed to be of good quality. Very happy with it as it's strong and of perfect size. Highly recommended. Also, it's a lot cheaper then the US/UK alternatives which a lot of webshops are selling.

https://www.aliexpress.com/item/Green-Hard-Plastic-4-in-1-Pry-Bar-Opening-Tools-Kit-With-Ruler-Scale-Spudger-For/32666433422.html

Wednesday, July 12, 2017

Ubuntu: Dropbox and crontab

In your default user, run "crontab -e", and add the following lines:

0 4 * * * DISPLAY=:0 /usr/bin/dropbox start >/dev/null 2>&1
0 5 * * * /usr/bin/dropbox stop >/dev/null 2>&1


This will start dropbox at 4am, and stop at 5am.

Friday, September 9, 2016

802.11ac wifi for Linux

Since I am running a HTPC in my living room I am dependent on having a reliable and FAST wifi connection. Running videos is one thing, but having a quick and responsive connection when it comes to fetching thumbnails for and browsing large photo files from my NAS is even more important.

Finding a good 802.11ac wifi adapter for my unit seemed to be harder then expected. Lot's of posts online told me that either 802.11ac simply won't work (you won't get your card to jump from 11n to 11ac speeds) and other challenges. Finding a pci card seemed to be even more challenging as most cards I could find with the best chipsets for Linux seemed to only be available on minipci express.

After some googling I did find that there were adapters for minipci express to pcie x1. I also did find one readily mounted with antennas, CE branded and at a reasonable price on ebay. The intel 8260AC is one of the latest chipsets running on 802.11ac offering a theretical speed up to 867 Mbps. The intel chipsets also offer good linux drivers. Installing the card was easy, the only thing I actually had to do was to make sure the iwlwifi package was installed, and to upgrade the kernel package of my Linux Ubuntu 14.04 distro, as the kernel package I was running used an older version of iwlwifi not offering support of the 8260 chipset yet. I took a full leap and went for kernel 4.4. After this everything wen't smoothly. No problems at all. The only thing is when I run iwconfig it says the card is running 802.11abgn but on 867Mbps. After some googling this seems to be a bug in the iwconfig app. The speed stated on iwconfig is the correct parameter to look at, and 867Mbps is impossible on 802.11n.

A word of advice: The ebay site selling this card states in large red letters and exclamation marks "This item don't compatible AMD computer motherboards". This is wrong. I have no idea why they say so. I knew this had to be wrong as there is a lot of AMD based computers running a intel wifi chip. I've had to deal with motherboard blacklists/whitelists before though. Anyhow, I am running this fine without any third party firmwares at all on a AMD motherboard running a AMD X3 450 CPU.

Thursday, September 8, 2016

Force unmount/umount of disconnected NFS drive in Linux

Following command as root: "umount.nfs4 /volume -f"

Thursday, April 7, 2016

Chromium in Debian: Flash missing - manual install of Pepperflash

So, here's the situation:
1.) Google Chrome dropped support of 32bit linux
2.) Pepperflash has gone missing from the Debian repositories
3.) Chromium only supports Pepperflash

Here's how you fix it:
1.) Install chromium.
2.) "apt-get purge" (not just remove) everything that has to do with flash.
3.) Download the latest available version of Google Chrome for 32bit so we can extract the plugin we need. Latest available version is google-chrome-stable_48.0.2564.116-1_i386.deb available here: http://bbgentoo.ilb.ru/distfiles/google-chrome-stable_48.0.2564.116-1_i386.deb
4.) Extract the file. Go to opt/google/chrome and find the PepperFlash directory. From this directory copy the libpepflashplayer.so to /usr/lib/chromium/plugins/ or any other available directory.
5.) For some reason I can't chromium to load the plugin by default. So I made a shortcut executable file with the following chromium prefix:
/usr/bin/chromium --ppapi-flash-path=/usr/lib/chromium/plugins/libpepflashplayer.so
6.) Run it. Enter "chrome://plugins/" into your address bar. It should now show up here.

Tuesday, October 27, 2015

IKEA Utrusta LED - remote problems

Installed the IKEA Utrusta LED system for my kitchen. The system have caused me quite a headache as I had a lot of problems with the lights randomly responding to the remote.

After a while I managed to sort out the problems. I did the following:
1.) First I got a new remote from IKEA. I'm not quite sure if this solved any problems or not, but I do think it helped quite a bit.
2.) Then I managed to identify one LED device which seemed to cause problems way more often then the others. I replaced this one. No more specific problem with this light.
3.a) My lights now worked all good until one night when I was downloading some huge files over the wireless network, when the lights went all hammock when using the remote. As I already know the Utrusta remote is using the 2.4ghz frequency - the same as my wifi, I went straight for the router and unplugged it. Suddenly it all worked perfect again.
3.b) To solve this problem I booted up my router again and changed wifi channel. I also have a router which runs on the 5ghz frequency. I was therefore able to change the wifi devices I have which use the most bandwidth to this frequency.

After taking these measures, I haven't had any problems for several weeks. The lights also respond way more synchronous then before. It's rather strange that IKEA doesn't seem to know about the frequency problems themselves. When I called them in the beginning this wasn't even mentioned, but after doing some research online it seems to be a rather normal problem with interference between devices running on the same frequency.

Update: 3 months later. Still no problems. All good! (FYI: The problem lasted me for 1-2 years until I managed to solve it.)

Saturday, May 23, 2015

Torrenting to NAS via CIFS/SMB never completes

Problem: Vuze keeps on redownloading and redownloading the last 10-30% of the torrent file over and over again. MBs downloaded exceeds total torrent size, and it never ends.

Solution:

Edit your /etc/fstab for the cifs mount.
cache=none,user,uid=abcd123,gid=users,rw,suid,credentials=/root/nascredfile

Friday, April 24, 2015

Fix: Shoe air whooshing sound from shoes

I had big problems with this on some Loake Churchill shoes. The sound came from the toebox and was caused by my arch which is a tad large, giving the air in the toe box no easy route to escape when I was walking.

The reason my shoes were so tight around my arch was the lacing which my shoes were delivered with. If you take notice of the Shoe shop lacing pictured below, you will see that when you tighten this lacing, it takes very little pressure before you make the lacing around your arch to tight. The solution is changing the lacing to the zigzag lacing, and leaving enough slack on the lower lacing.

It probably sounds weird that lacing should cause such problems. But give it a try.

I've also read of people leaving strings of leather in a | | formation above your arch, leaving a "channel" for air to escape through, which solved the problem.



Friday, February 13, 2015

Backlight keys not working on t510 linux

This is due to a kernel error from what I understand.

Here's a quick fix.

apt-get install xbacklight

then add the following bindkeys if you are running fluxbox:
nano .fluxbox/keys

add:
None 232 :Exec xbacklight -dec 5
None 233 :Exec xbacklight -inc 5

Reboot fluxbox

Friday, November 14, 2014

CIFS, Wicd and Ubuntu 14.04 slow shutdown/reboot

Got this problem after mounting a CIFS/Samba drive through my wireless network. This appears to be a rather normal problem for lots of users. It was also hard locating a fix for my problem, as many users are using network manager as well.

I found a great fix though, which also is reported to work for network manager.

It's rather uncomplex and logical. The fix is moving the umount procedure to a earlier runlevel in the rc.d folders. The problem appears to be that the system shuts down the wifi before umounting.

Fix:
Go into /etc/rc.0 and /etc/rc.6, and move
user@system:/etc/rc0.d$ mv S31umountnfs.sh S14umountnfs.sh

Hope this helps :-)

More info is available here: http://blog.avirtualhome.com/ubuntu-shutdown-problem-cifs-related/

Saturday, October 11, 2014

Solution: Encrypted system and UNEXPECTED INCONSISTENCY: RUN fsck MANUALLY.

If you get this error during startup, it's possible to fix. I did it for debian.

First get a rescue cd from grml.org. When you have booted it up enter the standard command line mode. For some strange reason you only get the option of a few language sets by the system itself when booting, but when you have entered the command line you can easily load other language sets by running loadkeys. There's a bunch of other keysets located on the system.

Next check out this tutorial for more information on how to solve the problems with fsck and the encrypted drive:
http://devouredbylions.blogspot.no/2011/01/fixing-corrupted-encrypted-lvm.html

In short terms you have to run the following cmds:
cryptsetup luksOpen /dev/
vgscan --mknodes
vgchange -ay
fsck /dev//

Touchpad click delay on Lenovo T510 in Linux

When I decided to run Linux (Debian) on a T510 I noticed there was a delay when clicking/tapping on the touchpad. The fix for this was pretty easy. Simply edit "/usr/share/X11/xorg.conf.d/50-synaptics.conf", and in the section for InputClass add the following lines:
        Option "Clicktime" "0"
        Option "SingleTapTime" "0"

Wednesday, July 16, 2014

Adjusting mouse speed and acceleration in linux

I'm using synclient to do this.

Simply use following commands (with my favourite settings):
synclient MinSpeed=1.1
synclient AccelFactor=0.055
synclient MaxSpeed=4

I've added my settings to .fluxbox/startup.

Saturday, June 14, 2014

Slow or stuttering youtube videos on chrome

I've been having problems watching youtube videos in full screen in chrome for some time now. This especially got worse after youtube changed to their html5 platform by default.

I found out the problem was google chrome running by default without gpu/hardware acceleration.

The solution for this problem is disabling the gpu blacklist integrated in google chrome. Recomend you checking out this site for instructions and further information.




Graphics Feature Status

Canvas: Software only, hardware acceleration unavailable
Compositing: Software only, hardware acceleration unavailable
3D CSS: Unavailable. Hardware acceleration unavailable
CSS Animation: Software only, hardware acceleration unavailable
WebGL: Unavailable. Hardware acceleration unavailable
WebGL multisampling: Unavailable. Hardware acceleration unavailable
Flash 3D: Unavailable. Hardware acceleration unavailable
Flash Stage3D: Unavailable. Hardware acceleration unavailable
Texture Sharing: Unavailable. Hardware acceleration unavailable
Video Decode: Software only, hardware acceleration unavailable
Video: Software only, hardware acceleration unavailable
Problems Detected

Intel mesa drivers are crash-prone.: 76703
Accelerated 2d canvas is unstable in Linux at the moment.
Stage3D is not supported on Linux.: 129848
Accelerated video decode is unavailable on Mac and 

Saturday, June 7, 2014

Get Rid of Sweat Stains

Problem: I use shirts every day at work, and I really dislike using any kind of t-shirts underneath. There's a flipside to this. After using the shirt for some days, I get the not so good looking yellow sweat stains on my shirts. Getting rid of them also used to be a problem with regular detergents and wash. I've found a solutions though..

What you need:
1.) Vanish Oxi Action (Europe) or Oxi Clean (US version). You should get the regular powder version for coloured clothes.
2.) A toothbrush
3.) A cup
4.) A towel is prefered

Put a scoop of Vanish Oxi Action/Clean in a cup, add some (not much) lukewarm water, and mix it all good together for a while with the toothbrush. Gather all your shirts, put them in a pile ready for wash in front of you. Sit down on a chair and put the folded towel on your  lap (so you don't "wet your pants"). Next take a shirt a time, and use the brush to apply a decent amount of your mix on the spots you want to get rid of. I usually brush and apply for about 15 seconds each. Next just put each shirt in you washing machine, and about 5 minutes after the last shirt give it a regular wash. I usually put the leftovers from my Vanish mix into the washing machine as well.

Wicd won't connect automatically

Problem: Wicd won't connect automatically

Facts: I'm running ubuntu on a computer of mine, and I want it to automaticly connect to wired networks when available, or a wireless network if not. After running it on a wired connection for some years, I decided to move my router to a computer room, and therefore my HTPC in my living room had to go wireless. This gave me a problem with the computer not automaticly connecting to the network, and the wireless interface acted REALLY unstable when trying to connect. Something was wrong..

Solution: The problem? I noticed that I halso had Network Manager installed. I prefer using Wicd since it gives me a great CLI interface on my HTPC which I only use a XBMC frontend on. After removing Network Manager (apt-get remove networkmanager), everything worked out fine.