Logitech Clearchat + Skype + KDE with Phonon problem

This is a holder page for a bit more information on the issue but basically Phonon won’t retain it’s settings. The clearchat works fine but Phonon won’t use it by default or hold the priority you give it.

The short answer is to install pavucontrol

sudo apt-get install pavucontrol

Then run pavucontrol and turn your internal mic off and Phonon will then use your USB Clearchat. Enjoy

How to rsync directory structure but not files

rsync -av --include='*/' --exclude='*' /src/path /destination/path

An example where we use it is when building Magento templates and themes, we copy the directory structure across but not the files so that when we need to, we can copy a file across from the base theme without having to create the directory structure before copying the file:

rsync -av --include='*/' --exclude='*' app/design/frontend/base/default/ app/design/frontend/default/default/

Bash: Bulk Convert M4V to Good Quality FLV using ffmpeg

High Quality – File size ends up being larger than the M4V

for i in *.m4v;do ffmpeg -i $i -ar 22050 -qscale .1 ${i%.*}.flv;done

Quality is almost indiscernible from the original M4V in a laptop

for i in *.m4v;do ffmpeg -i $i -ar 22050 -ab 96k -qscale 2 ${i%.*}.flv;done

Slight degradation in quality. File size approx. 35% less than the original m4v.

for i in *.m4v;do ffmpeg -i $i -ar 22050 -ab 96k -qscale 5 ${i%.*}.flv;done

Asus K43E with Ubuntu 11.04 / Linux Mint 11 / 2.6.38 Kernel touchpad

I just bought this laptop yesterday. I’ve just solved issue 1 of 3 (all issues as of 26/7/11)

1. Touchpad isn’t recognised as a touchpad but rather a mouse and so can’t “disable touchpad while typing” causing me to constantly bump it.
2. Suspend / Resume isn’t working.. I will fix this soon (fixed: 26/07/11)
3. Slight high-pitched noise coming from built-in mic. (fixed: 26/07/11)
4. Don’t run ecrypt-fs on your /home partition. It causes a lot of freezing.
5. My grub config now /etc/default/grub now has the following. The semaphore line fixes some small temporary locks in 3D graphics. ie: if you run glxgears and it freezes every 10 seconds or so, the semaphores line fixes that. The pcie_aspm=force switch is supposed to fix the 2.6.38 kernel issue consuming up to 30% more power. I haven’t noticed a great difference though. I get about 4.5 hours of continuous use. Remember to run grub-update after making the changes.

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.semaphores=1 pcie_aspm=force"

So, fixing number 1 took a few goes to track down. Basically, the kernel isn’t detecting the Touchpad properly and everything loads as a mouse.

You need to rebuild the mouse kernel module, so combine the steps from this url

http://ubuntuforums.org/showthread.php?p=9175201#post9175201

but when you get to Step 5, use this patch instead:

wget -O 01elantech_2.6.38.patch https://launchpadlibrarian.net/71387234/01elantech_2.6.38.patch
patch -p1 < 01elantech_2.6.38.patch

You will probably have to: sudo apt-get install gsynaptic also.

Update: 26/07/11

Finally, the suspend issue bugged me enough to find an answer. Following the steps in this post to get pm-suspend to finally work did the trick!

ls /sys/bus/pci/drivers/ehci_hcd/

Gives me:


0000:00:1a.0
0000:00:1d.0

Replace below XXXX:XX:XX.X with your
#!/bin/sh
# File: "/etc/pm/sleep.d/20_custom-ehci_hcd".
case "${1}" in
hibernate|suspend)
# Unbind ehci_hcd for first device XXXX:XX:XX.X:
echo -n "XXXX:XX:XX.X" | tee /sys/bus/pci/drivers/ehci_hcd/unbind
# Unbind ehci_hcd for second device XXXX:XX:XX.X:
echo -n "XXXX:XX:XX.X" | tee /sys/bus/pci/drivers/ehci_hcd/unbind
;;
resume|thaw)
# Bind ehci_hcd for first device XXXX:XX:XX.X:
echo -n "XXXX:XX:XX.X" | tee /sys/bus/pci/drivers/ehci_hcd/bind
# Bind ehci_hcd for second device XXXX:XX:XX.X:
echo -n "XXXX:XX:XX.X" | tee /sys/bus/pci/drivers/ehci_hcd/bind
;;
esac

And then add

#File: "/etc/pm/config.d/usb3-suspend-workaround".
SUSPEND_MODULES="xhci"

How to install Git on Cpanel based 64bit Centos servers

Quite easy really, once you know how.

First we add in the Epel repo for 64bit Centos5
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

and then you need to disableexcludes in yum due to Cpanel disabling Perl from yum updates. So to install git now, we run.
yum --disableexcludes=main install git

Simple, really.

View memory brand, manufacturer & serial number in Linux

Very simply.

sudo dmidecode –type 17

This gives the following output:

# dmidecode 2.9
SMBIOS 2.4 present.

Handle 0x1100, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 2048 MB
Form Factor: DIMM
Set: None
Locator: DIMM_A
Bank Locator: Not Specified
Type: DDR
Type Detail: Synchronous
Speed: 667 MHz (1.5 ns)
Manufacturer: AD00000000000000
Serial Number: 00001016
Asset Tag: 000818
Part Number: HYMP125S64CP8-Y5

Handle 0x1101, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 1024 MB
Form Factor: DIMM
Set: None
Locator: DIMM_B
Bank Locator: Not Specified
Type: DDR
Type Detail: Synchronous
Speed: 667 MHz (1.5 ns)
Manufacturer: AD00000000000000
Serial Number: 00003160
Asset Tag: 410801
Part Number: HYMP112S64CP6-Y5