Bitcoin donations are welcome:14snQXeLcnJtWUduKZ6rC2MHdPYrYar1Tw

Thursday, July 9, 2009

Spotify mutes and sound disappears

Had a lot of problems recently with the sound in Spotify suddenly muting/disappearing in the middle of listening to music, although the progress bar of the song I was listening to kept on moving. I am using Debian and using Spotify via wine.

Found the solution though which was quite simple:
Run winecfg, go to the Audio tab and select the following settings under the DirectSound settings:
Hardware accelration: Emulation
Def. Sample rate: 44100
Def. Bits per sample: 16
Turn OFF Driver Emulation.

Hope this helps :)

Wednesday, June 10, 2009

Tweaking Flash CPU usage in Linux

Update 22.12.2009
Great news has arrived just before Christmas. Adobe has released a new version of flash which finally gives us linux users what seems to be a proper improvement of the flash plugins capabilities in full screen mode. At least I am experiencing GREAT improvement when viewing flash videos in fullscreen. On my 3,5 year old laptop I can finally view HD videos on youtube in fullscreen without any problems.

The new version I am talking about is 10.0.42.34. The changelog can be viewed here. The 10.1 version is also in progress, but stay away from it if you are a linux user. Nothing new there for us, and I'm not even sure it has the latest linux tweaks available.

So, try to keep track that you always have the latest version of flash available, this you can easily do here. Downloading the latest version can be done here. Download the .tar.gz version. To install: Open up firefox/swiftfox and type about:plugins in the adressbar. Check where your current libflashplayer.so is located, and replace it. Make sure you do not have multiple installations of the plugin.

Important for INTEL graphics users:
Remember to have at least version 2.8.0 of xorg-x11-drv-intel, because:
* Fri Aug 07 2009 Kristian HÃgsberg - 2.8.0-4
- Add dri2-page-flip.patch to enable full screen pageflipping.
Fixes XKCD #619.


Old post with tweaks:
Last few days I've had a lot of problems regarding flash video in Linux. So I've spent a lot of time trying to tweak my browsers to work better. Here's my quickstep guide to getting flash working more or less "ok" in Linux. There is still a lot to be done for the flash developers making it work more flawless under Linux.

1.) Make sure you have the plugin for firefox, iceweasel og swiftfox. Check this by typing about:plugin in the address bar. If there are multiple instances of the same flash driver, remove them. Make sure you have the latest version, which at the moment (10th June 2009) shall be: Shockwave Flash 10.0 r22. If you have multiple drivers do a updatedb & locate libflashplayer.so in bash. Restart the browser when you are done.
2.) Cpu frequency stepping can be another problem. If you have powernowd or cpufreq installed make sure they are working proper. I had big problems with cpufreq only using 1ghz of my cpu although I had another 883mhz available. Check cpufreq-info and make sure:
A) current policy: frequency should be within 1000 MHz and 1.83 GHz.
Check that the upper frequency is correct.
B) The governor "ondemand" may decide which speed to use.
Make sure you are using the ondemand governor.
C) Now we are gonna tweak this so your computer will utilize your full cpu when viewing flash videos:
C.1) Stop cpufreq: /etc/init.d/cpufreqd stop
C.2) Edit your /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold and set it to 30. This will make your computer utilize your full cpu once the cpu usage climbs above 30%. You can always tweak this one to another setting if you want.
C.3) Start cpufreq: /etc/init.d/cpufreqd start
3.) We need flash to use your gfx card for the rendering, also known as hardware rendering. Flash uses Opengl in order to do this. Open aptitude, and remove _all_ opengl related packages, and then reinstall the following packages with it's dependencies:
libgl1-mesa-glx
libgl1-mesa-dev

Now try again :)

Please post more tips if you got any. No registration required.

Monday, June 8, 2009

Slow Firefox and High Xorg CPU usage in Debian

So, due to some of the latest updates my desktop experience in Linux got considerably damaged. Everything was suddenly much slower and I almost felt for crushing my computer. The solution was close though. I did a google search for "firefox cpu slow debian 2009", and my first hit was my solution. But please read on here..

The root of the problem was obviously a missing line in the xorg.conf file which tells the graphics card what acceleration method to use. Please read M-x Kelsin's solution on this right here.. After you have done this simply go into a shell as root and restart kdm:
/etc/init.d/kdm stop (WARNING!! you will now exit your GUI! So write down the rest, or simply do a restart and you can skip the rest in this section)
now you will get a login prompt. Log in as root and start kdm again:
/etc/init.d/kdm start

Now everything shall be back to normal. BUT I have another tip for you on how to speed up your browsing experience. Install Swiftfox. What is Swiftfox? It's a version of firefox compiled for specifically use in Linux. It has less memory usage and a noticable better performance. Another neat advantage in my opinion is that you always get the latest version. Now for example I am running 3.5b4 in stead of a way older iceweasel(firefox) version which is in the apt libraries for the Debian Testin version. Since the firefox/swiftfox/iceweasel betas are pretty stable anyway, this is just an advantage in my opinion.

Updating is pretty easy, and swiftfox will automaticly use your default bookmarks, plugins and so on which you already have in firefox/iceweasel. To install edit your /etc/apt/sources.list and add the following line:
deb http://getswiftfox.com/builds/debian unstable non-free
Next type:
apt-get update
apt-get install swiftfox-prescott
Notice there is also a i686 version and a athlon64 version available. (apt-cache search swiftfox).

And you are done :) To run swiftfox type: /usr/bin/swiftfox

Monday, May 25, 2009

Wireless iwl3945 on Debian

I have struggled A LOT lately trying to get my built-in wireless network card on my HP NX7400 to work. I seemed to have tried it all, and I could not understand why it would not work. I was using the iwl3945 driver, I could find the networks, but for some reason I could not retrieve dhcp information, and it seemed to not want to connect properly.

But I managed to get it working, finally. The solution? Easy. For some strange strange reason it will only work when using the new wicd (1.5.9) manager from KDE. If you are using fluxbox, as me, simply start it by running wicd-client in bash, and you will get a neat icon in your system tray.

A tip might be to add it to your fluxbox startup file:
nano ~/.fluxbox/startup
and add the following line:
/usr/bin/wicd-client &

Try it out. Hope it helps.

Thursday, May 21, 2009

UUID, Fstab and Automatically mount USB Drive

Finally found a solution on how to make my Linux (Debian):
A) Remember the unique USB drive(in my case a Western Digital Mirror Edition), and where to mount it
B) Automatically mount it when connected

First you have to identify your usb drive, make sure it is connected and you know the device name, in my case:
NoMore:/home# blkid /dev/sdc1
/dev/sdc1: UUID="6494BFE994BFBC3C" LABEL="My Book" TYPE="ntfs"
NoMore:/home#

As you see my drive has a unique ID. This is what we are gonna use in fstab instead of the device name. Smart huh? :) This way we avoid the problem of changing device names when plugging stuff in and out.

Next in fstab, make a line like this:
UUID=6494BFE994BFBC3C /home/user/DiSK/ ntfs-3g defaults,auto,umask=000,users,rw 0 0
Make the changes you need, but make sure you use your correct UUID(and remove the "") and it is set auto like above.

Next check if it works by typing:
mount -a
The -a parameter means it shall mount everything set to auto in fstab. If it works, umount your drive and let's continue:

Ok, make sure you got udev installed. This is what's gonna automaticly mount our drives when new ones are detected. Make a new file;
NoMore:/home# nano /etc/udev/rules.d/99-mount.rules
And add the following line:
SUBSYSTEM=="block", run+="/bin/mount -a"
Just make sure it uses the correct path to the mount command.
Next restart udev:
NoMore:/home# /etc/init.d/udev restart
Now unmount(umount) your drive, unplug it and try it out.

Wednesday, May 20, 2009

Error mounting NTFS in Linux

I have recently bought a Western Digital (WD) Mirror Edition 2TB, which I run in raid in order to offer me a really good backup solution for all my pictures and hd-videos from my SLR and important documents. The system is delivered with a NTFS system, which I knew obviously might cause some problems with Linux. As predicted, it happened today. I was just going to do a routine dismout (umount) and connect it to another computer when I ran into problems trying to unmount it. So I did a "umount -l" on the drive, which I apparently never should have.

Later when trying to mount the drive again in Linux (Windows always handles this stuff perfect), I got the following errors:

[root@nomore /]# mount -t ntfs-3g /dev/sdb1 /mnt/ntfs
ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Failed to read of MFT, mft=10 count=1 br=-1: Input/output error
Failed to read vcn 0x4: Input/output error
Failed to mount '/dev/sdb1': Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.


So as instructed I connected the drive up to my computer running Microsoft Windows thinking the chkdsk /f command would fix it, but without luck. Tried dismounting properly aswell but it still refused to work.

But I found a solution. Go into "My Computer" while the drive is connected, right click on the drive, select "Properties" head to the "Tools" tab and under Error-checking click "Check now". Remember to tick both the options you get, and let it finish. This might take some time. For my 1TB USB drive it took a couple of hours. When finished, dismount the drive properly in Windows. I don't know if it matters, but just to be sure I dismounted it both with the WD tools and the windows plug&play manager.

I also rebooted my laptop running Linux, before I tired reconnecting. This time it worked perfectly again :) Thank god!

12$ NX7400 adapter arrived

These last weeks I have ordered 2 new adapters from Hong Kong for my nx7400 laptops. It's amazingly cheap, and they are working perfectly. Pictures added for proof :) I have also noticed that dealextreme have started selling these chargers as well, who also offers world-wide free shipping. Only con is that the cable is a little short, but that's no big task to fix.


So, all in all, ordering laptop adapters from ebay/dealextreme:
Pros:
+ Incredibly cheap! I only payed 12$ including shipping and handling for mine
+ Works perfectly
Cons:
- A little slow shipping.. 2-3 weeks
- A little short cable