Yet Another Blog

October 21, 2009

Broadcom-wl in archlinux 2.6.31

Filed under: computer, linux — Tags: , , , , — guilleml @ 6:51 pm

After upgrading to 2.6.31 my wifi stopped working so I googled a little, I found a few usefull links:

http://aur.archlinux.org/packages.php?ID=19514

http://bbs.archlinux.org/viewtopic.php?id=82613

http://wiki.archlinux.org/index.php/Broadcom_BCM4312

Basically what I did was to execute “makepkg” again in the broadcom-wl package and reinstall it. Then I executed:

#mkinitcpio -p kernel26

Also make sure your rc.conf is rigth, you have to add !b43 and !ssb to your MODULES section.

MODULES=(acpi-cpufreq cpufreq_ondemand lib80211_crypt_wep lib80211_crypt_ccmp lib80211_crypt_tkip wl !ssb !b43 fuse)

Reboot your computer and check that your wifi card is working:

#iwconfig

eth0      IEEE 802.11  Nickname:”"
Access Point: Not-Associated
Link Quality:5  Signal level:206  Noise level:165
Rx invalid nwid:0  invalid crypt:0  invalid misc:0

Then you can use wicd or networkManager to connect to your network.

October 8, 2008

Dell Inspiron 1525 hotkeys in KDE 4.1.1 Debian

Filed under: Software, computer, linux — Tags: , , , , , , , , , — guilleml @ 7:57 am

In Kubuntu 8.04 my laptop multimedia keys worked fine but in KDE 4.1.1 under Debian they didn’t, I couldn’t assign them to actions in system preferences.

To solve it I’ve used xbindkeys, it works pretty nice and now I can control the volume with the volume keys. To do so, type:

#aptitude install xbindkeys xbindkeys-config

Now you can use xbindkeys-config to configure using a graphical interface or you can configure in ~/.xbindkeysrc.

To configure volume keys under kde 4.1.1 you will need to assign some actions to each key in order to increase, decrease or mute the volume, I’ve used qdbus and kmix to do that, for example, if you want to  mute the audio:

$qdbus org.kde.kmix /Mixer0 org.kde.KMix.toggleMute Master:0

So you need to assign that to the mute key. To increase the volume:

$qdbus org.kde.kmix /Mixer0 org.kde.KMix.increaseVolume Master:0

And to decrease the volume:

$qdbus org.kde.kmix /Mixer0 org.kde.KMix.decreaseVolume Master:0

So the xbindkeysrc file will be:

#Mute
“qdbus org.kde.kmix /Mixer0 org.kde.KMix.toggleMute Master:0″
m:0×0 + c:160
NoSymbol

#SubirVol
“qdbus org.kde.kmix /Mixer0 org.kde.KMix.increaseVolume Master:0″
m:0×0 + c:176
NoSymbol

#BajarVol
“qdbus org.kde.kmix /Mixer0 org.kde.KMix.decreaseVolume Master:0″
m:0×0 + c:174
NoSymbol

After that you want to run xbindkeys daemon every time you login with your user, so add it to ~/.xinitrc, ~/.kde4/Autostart or any way you know to do so.

September 19, 2008

PHC-Control in Debian Lenny

Filed under: Software, computer, linux — Tags: , , , , , , — guilleml @ 5:42 pm

To build your own module for undervolting your CPU you’ll need some files:

linux-phc-0.3.1 from https://sourceforge.net/projects/linux-phc/

linux-source and headers from aptitude:

aptitude install build-essential linux-source-2.6.26 linux-headers-2.6.24-1-amd64

Go to /usr/src and untar the linux source:

tar xvfj linux-source-2.6.26.tar.bz2

Apply the patch and build the module:

cd linux-source-2.6.26

cp /boot/config-2.6.26-1-amd64 .config

cp /usr/src/linux-headers-2.6.26-1-amd64/Module.symvers /usr/src/linux-source-2.6.26

patch -p1 < linux-phc-0.3.1-kernel-vanilla-2.6.26rc8.patch

make oldconfig

make prepare

make scripts

make M=./arch/x86/kernel/cpu/cpufreq

mv /usr/src/linux-source-2.6.26/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko /usr/src/linux-source-2.6.26/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko_old

mv /lib/modules/2.6.26-1-amd64/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko \
/lib/modules/2.6.26-1-amd64/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko_old

cp /usr/src/linux-source-2.6.26/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko /lib/modules/2.6.26-1-amd64/kernel/arch/x86/kernel/cpu/cpufreq/

And that’s all

Edit: Thanks to Andrew for the correction, there was an error I made writing the commands to the blog.

September 9, 2008

Increase battery life in your linux laptop

Filed under: Software, computer, hacks, linux — Tags: , , , , , , , , , — guilleml @ 7:10 pm

Recently I’ve bought a laptop, Dell Inspiron 1525 with a T5750@2Ghz and a 9 cell battery.

I installed KDE4, plasma, desktop effects…it’s cool, really cool,  but then I discovered powertop, a tool that is able to recommend some settings to make  your CPU to awake less times every second. The tools shows yo a list of the tasks that are awaking the CPU so you can try to get a more power-efficent system.

It recomends you some actions to take, you just accept or not them, as set the SATA bus in low-power mode, USB autosuspend, set ondemand cpu freq governor, delay writing to the hard disc, etc…

I noted KDE4 is cool but not when you’re using the battery so I installed fluxbox and XFCE, both are nice, XFCE seems to wake up less the CPU, then I started to look for scripts and patchs to waste less energy.

So here are the tuning I’ve done to my laptop:

From http://ubuntuforums.org/showthread.php?t=847773

#!/bin/bash

# Go fast on AC power.  Similar to default Ubuntu settings
if on_ac_power; then
# Set the drive to mostly stay awake
hdparm -B254 -M 254 /dev/sda

# Remount ext3 filesystems so the journal commit only happens every 60
# seconds.  By default this is 5 but, I prefer to reduce the disk
# activity a bit.
mount -o remount,commit=60 /
mount -o remount,commit=60 /media/sda3

# Turn off the laptop mode disk optimization
echo 0 > /proc/sys/vm/laptop_mode

# Manually set the wifi driver to no power savings.
#echo 6 > /sys/bus/pci/drivers/iwl????/0000\:??\:00.0/power_level

# Set kernel dirty page value back to default
echo 10 > /proc/sys/vm/dirty_ratio
echo 5 > /proc/sys/vm/dirty_background_ratio

# Only wakeup every 60 seconds to see if we need to write dirty pages
# By default this is every 5 seconds but, I prefer 60 to reduce disk
# activity.
echo 6000 > /proc/sys/vm/dirty_writeback_centisecs

# Turn off sound card power savings
echo 0 > /sys/module/snd_hda_intel/parameters/power_save

# Set the SATA to max performance
echo max_performance > /sys/class/scsi_host/host2/link_power_management_policy
echo max_performance > /sys/class/scsi_host/host3/link_power_management_policy
echo max_performance > /sys/class/scsi_host/host4/link_power_management_policy

# Make sure ondemand governor is set
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

# Enable the webcam driver
#  modprobe uvcvideo

else # Save power

# Set the disks to aggressively save power and use the lowest acoustic
# level.  Note: Currently Firefox is very poorly behaved and some
# might find these settings too aggressive.  If so, change “-S 4″ to
# something larger like -S 24 (two minutes).
hdparm -B180  /dev/sda

#set the LCD bright to 60%

echo 60 > /proc/acpi/video/VID/LCD/brightness

# Change the ext3 commit times to 10 minutes.  This reduces disk
# activity
mount -o remount,commit=600 /

# Set laptop disk write mode
echo 5 > /proc/sys/vm/laptop_mode

# Manually set the iwl3945 driver to power savings.
#echo 5 > /sys/bus/pci/drivers/iwl????/0000\:??\:00.0/power_level

# Reduce disk activity by waiting up to 10 minutes before doing writes
echo 90 > /proc/sys/vm/dirty_ratio
echo 1 > /proc/sys/vm/dirty_background_ratio
echo 60000 > /proc/sys/vm/dirty_writeback_centisecs

# Set sound card power savings
echo 10 > /sys/module/snd_hda_intel/parameters/power_save

# Set SATA to minimum power
echo min_power > /sys/class/scsi_host/host0/link_power_management_policy
echo min_power > /sys/class/scsi_host/host1/link_power_management_policy
echo min_power > /sys/class/scsi_host/host2/link_power_management_policy
echo min_power > /sys/class/scsi_host/host3/link_power_management_policy
echo min_power > /sys/class/scsi_host/host4/link_power_management_policy

# Make sure ondemand governor is set
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

# Remove the webcam driver
modprobe -r uvcvideo
modprobe -r sbp2
modprobe -r ieee1394
modprobe -r uvcvideo
modprobe -r videodev
modprobe -r v4l1_compat
modprobe -r compat_ioctl32
modprobe -r v4l2_common
fi

The script is commented, I only changed a few things from the original, it works fine, some drivers are able to set the hardware in low-power mode but it seems they don’t do by default, GNU/Linux seems to have to polish laptop distributions.

Powertop shows you the watts you’re currently using when the laptop is not connected to the AC, so I played with phc to undervolt the CPU, now I’m able to use less power for the CPU, this doesn’t decrease the performance.

You can use this tutorial http://ubuntuforums.org/showthread.php?t=786402 to get a kernel able to undervolt the cpu, you just have to replace a module.

My original settings are:

43 35 27 19

Now they are:

24 1 1 1

Powertop shows the laptop uses less energy now and the cpu is colder at high load.

June 19, 2008

OpenSuse 11 KDE4 already installed

Filed under: Software, computer, linux — Tags: , , — guilleml @ 6:09 pm

The installation has been nice and fast, it even detected my atheros wifi card, this version installs the ath5k madwiki OSS driver, it didn’t work for me, but at least it detected my wifi.
After install I booted another linux, and I mounted the OpenSuse volume under /media/sda3, then:

#cd /media/sda3
#cp /etc/resolv.conf etc
#chroot .
#zypper ref
#zypper in gcc make kernel-source

I downloaded the madwifi source package from http://madwifi.org/suse/11.0/ and I installed it:

#rpm -i madwifi-0.9.4-1.src.rpm

Then just build it:

#cd /usr/src/packages/SOURCES/madwifi-0.9.4
#make && make install
#rmmod ath5k
#modprobe ath_pci

And that’s it, I selected my wifi network using knetwormonitor and everything worked great.
Now my first impressions:

  • Desktop looks great, beautiful
  • KDE4 works pretty well, as fast as KDE3 in my computer
  • I had to configure my monitor to set it to 75Hz editing /etc/X11/xorg.conf, maybe it’s possible using sax under yast2 but it didn’t work for me, now it’s set to 1280×1024@75Hz and Direct rendering is working fine.
  • I like Konqueror4, it renders webpages pretty fast and seems very stable, no crashes for now.
  • System is updating packages right now, just 2 clicks, I didn’t have to configure repositories.
  • System speaker is working and the pcspkr module is not loaded so I have to guess how to disable that little devil noise when I press tab key.
  • Fonts are great, just as I like them, not like Mandriva…
  • Yeah! package managing it’s lovely now, fast and easy, they’ve solved the thing I didn’t like about OpenSuse.
  • Firefox version is 3 beta 5, a little old, yesterday version 3 came out, I don’t mind because I don’t use it too much, just for posting in the blog because Konqueror doesn’t support the wordpress visual editor.

That’s for now, I’ll post more impressions and conclusions, desktop is really fast.

Downloading OpenSuse 11.0

Filed under: Software, computer, linux — Tags: , , — guilleml @ 3:21 pm

The torrent doesn’t work but the direct download does, you can get it from:

http://download.opensuse.org/distribution/11.0/iso/cd/openSUSE-11.0-KDE4-LiveCD-i386.iso

http://ftp5.gwdg.de/pub/opensuse/distribution/11.0/iso/dvd/openSUSE-11.0-DVD-i386.iso

I will install it later, I hope it does better than the RC…will it include the madwifi driver? I don’t think so.

June 5, 2008

My progress with OpenSuse 10.3

Filed under: Software, computer, linux — Tags: , , , — guilleml @ 2:13 pm

Last night I installed OpenSuse 10.3, the install was clean, no problem, really fast.

After that, the first was to install madwifi to enable my atheros wifi card, that was a problem because I couldn’t use repositories, I booted up other linux and I downloaded the kernel source package from the official repository and the madwifi source package from the madwifi site.

Then I installed them in the OpenSuse system:

#rpm -i kernel-source-2.6.22.5-31.i586.rpm

#rpm -i madwifi-0.9.3.3-0.1.src.rpm

The GCC compiler and make tool are needed too, they can be downloaded from the official site as other packages needed.

#rpm -i gcc-4.2-24.i586.rpm

#rpm -i make-3.81-66.i586.rpm

Then just build the madwifi driver:

#cd /usr/src/packages/SOURCES

#tar xvfj madwifi-0.9.3.3-0.1.tar.bz2

#cd madwifi-0.9.3.3-0.1

#make && make install

#modprobe ath_pci

That should build, install and load the driver, it can be checked with iwconfig tool or dmesg.

Then I used yast2 to configure my network and it worked fine.

I have other little problems I’m not still sure how to solve yet or I’ve solved them already.

  • For example, I have a Pentium IV CPU and p4-clockmod is not loaded at boot so I can’t change the frequency unless I load it:

#modprobe p4-clockmod

  • There is another thing I don’t like, when I’m installing packages or refreshing repositories, the CPU load goes to 100% so the whole system gets a little slow, I’ve never seen that using aptitude.
  • The bootsplash is not loaded at boot, I can see the kernel booting in text mode, I’m sure it’s easy to change, but…then I’ve to do it.
  • I would like to see knetworkmonitor loaded by default in KDE, it is not so yast2 must be used to configure the network.
  • To install amsn I had to add a new repository, the package is not in the official one. After that and intalling it, amsn didn’t load because libtk8.5 and libtcl8.5 links weren’t created in /usr/lib, it was easy to solve:

#ln -s /usr/local/lib/libtk8.5.lib /usr/lib

#ln -s /usr/local/lib/libtcl8.5.lib /usr/lib

  • When I’m browsing Internet with konqueror and move the scrolling bar on the right, it’s slow, the web page moves slow, the desktop seems to work pretty fast and light but konqueror rendering the webs is a little slow, slower than konqueror in Debian or Kubuntu.

I’ll see how can I solve those things.

June 4, 2008

Next Linux distributions I’ll test

Filed under: Software, computer, linux — Tags: , , , , , , — guilleml @ 4:00 pm

I’ve seen a video which shows how the zypper version that comes with OpenSuse 11 will solve the problems I talked about.

Another distro a user recommended me was MEPIS, version 7.0 is based again in Debian 4.0 Etch, I’ve already downloaded the liveCD+install iso so I’ll try tonight.

If I like MEPIS I may install it and I will install OpenSuse when the version 11 comes out, I’m gonna like to have a nice KDE-centered Linux distro.

I’ve used FreeBSD too, but I didn’t like to compile the packages, I know there are binaries but I think they were old…maybe I was wrong, I may try PC-BSD, a FreeBSD distro very easy which uses .pbi packages, something like install packages in Windows, you ust download a file which contais all libraries and binaries needed to work. There is a website with tons of packages http://www.pbidir.com/ where you can download them.

I may try this one, but I’m not sure since the last time I installed FreeBSD, was version 6.0, I had problems with the madwifi wifi driver, the wifi card worked but the computer was so slow it couldn’t be used, with the driver unloaded the system was fast enough.

June 3, 2008

Things I don’t like about some GNU/Linux distributions

Filed under: Software, computer — Tags: , , , , , , , , , , , , — guilleml @ 12:20 pm

I’ve been trying linux distributions dor a while and there are things I like and things I don’t like. My aim was to use another distribution as my main Linux system.

Now I’m using Kubuntu 8.04 and I’ve been using Kubuntu since version 6.04 or 6.10 I don’t remember.

Some years ago I was a really Linux-geek guy, I used LFS for a while, I loved Gentoo and optimizing my system, to try new gcc flags, etc…but one day I just wanted to have my computer ready for anything I need, I couldn’t wait 6 hours untill my OOo compiles or some hours just if I want to install an IDE like Netbeans or Eclipse, they are binaries but the system require to built some libraries to run them. So that’s when I started to look for a distro with binary packages and…well…I don’t want to edit config files anymore, so the distro I was looking for had to be very user friendly, had to detect all my hardware, config it…I don’t want to spend much time configuring my system.

So I tryied some of the most famous distributions, Debian, of course, I’ve used it a lot of times, I tryied Lenny and I had some problems like a kernel bug with the DMA and my DVD writer, the system spent to boot arround 5 minutes and the writer wasn’t operative, I had to reset the device and set the DMA flag to 1 to use it, I don’t use the wirter too much but this was annoying and I didn’t want to build my own kernel.

Debian worked fine, really well, but it worked like Kubuntu, I didn’t find pretty much differences, I don’t have any stability problems with Kubuntu so I didn’t notice Debian more reliable, the fact was Debian was giving me problems with the writer and with aMule (ed2k p2p client), in the search tab, when I closed the searches I made aMule crashed all the time, it doesn’t do that in Kubuntu and my writer works fine.

Well, I had to build my atheros madwifi driver, that wasn’t much problem, make, gcc, linux-headers, madwifi-source….and all done, Kubuntu detected at first boot.

I didn’t notice any performance difference, Debian was just as fast as Kubuntu so, I already have my Kubuntu configured, the performance is the same and I avoid a pair of bugs using Kubuntu…I didn’t find a reason to change Kubuntu for Debian.

Next I tryied OpenSuse, I like KDE and OpenSuse has a name as a KDE distro, even Linus Torvalds recommends it.

I tryied OpenSuse 10.2 and 10.3, it worked great, it has a “control panel” where you can configure the system, something I liked a lot, Kubuntu doesn’t have it and I think it wont since Canonical gives priority to Gnome and the KDE version is not so nice in wizards or admin tools.

I configured some repositories, I updated the system…not much problem. The thing I don’t like was everytime you run the software install tool, it synchronizes with the repositories, son you have to wait a lot of time because the mirrors were slow, for me. And this happends everytime you run this program, so install something like amsn, close the program and run it again because you forgot to install ktorrent can cost you 15 minutes.

I had to build my atheros driver too…

I’m really comfortable with aptitude and .deb packages, yast didn’t liked me because of that updating process.

After that I installed Mandriva 2008 Spring, I installed it in a virtual machine I liked it and then I tryied in a partition. Well, I have to say Mandriva is a great distribution, really easy, it detected my wifi card, my network, I configured the repositories, updated my system…everything fine.

But there were lot of things, little things and a big thing I didn’t like.

When I updated the software repositories list it spent a lot of time, waiting, not downloading, and the mirror was in my country, I don’t know why but it was slow.

My screen was always set to 60Hz, it’s a LCD monitor that works at 1280×1024 @ 75Hz, using krandr tool I set it to 75Hz, fine, but everytime I rebooted the system, the screen was set to 60Hz again, I even edited xorg.conf but it didn’t work.

That was a little thing, there was other little things, not very important but I didn’t like it neither, there is an applet in the panel that shows you what devices are mounted to extract, mount or dismount them, there appears a floppy disk icon, I have a floppy drive but I never use it, so I disabled it in the config menu, it disappeared but, as before, it was there again when I loaded the system! I like my settings to me saved, I don’t want to spend 3 minutes setting up the environment every time I boot my computer.

Anyway, the big problem I found, the reason I don’t use Mandriva are the fonts. The rendering is so…UGLY and DIRTY that I didn’t feel fine reading them.

Kubuntu:

Free Image Hosting at www.ImageShack.us

Mandriva:

Free Image Hosting at www.ImageShack.us

Kubuntu:

Free Image Hosting at www.ImageShack.us

Mandriva:

Free Image Hosting at www.ImageShack.us

Kubuntu:

Free Image Hosting at www.ImageShack.us

Mandriva:

Free Image Hosting at www.ImageShack.us

There you can see the difference between fonts in Kubuntu and Mandriva.

So, I’ll try OpenSuse 11 official release, maybe they have solved the install software problem, until I found other thing I’ll be using Kubuntu, I’m tired for so much publicity ubuntu gets, but it works fine for me…for now.

Blog at WordPress.com.