Blog Moved

I moved my blog to Squarespace.

I redirect http://lof-ubuntu-xp.lofspot.net/ to the new site.

Keep in touch and sign the new guestbook!

Reduce brightness on HP Pavilion dv5-1020ep (Ubuntu 8.10 64 bits)

My brightness function keys always worked, but suddenly they stopped working as well as the “Reduce backlight brightness” option in Power Management Preferences :-(

Every time I unplugged my power cord the monitor dimmed automatically. Now not even with the function keys I get my brightness down.

This happened in my HP Pavilion dv5-1020ep running Ubuntu 8.10 64 bits.

Here some additional info after searching in the Ubuntu forums and Google:

grep . -r /var/lib/acpi-support/*-*
/var/lib/acpi-support/bios-version:F.20
/var/lib/acpi-support/system-manufacturer:Hewlett-Packard
/var/lib/acpi-support/system-product-name:HP Pavilion dv5 Notebook PC
/var/lib/acpi-support/system-version:Rev 1
more /proc/acpi/video/DVGA/LCD/brightness
not supported
sudo echo -n 5 > /proc/acpi/video/DVGA/LCD/brightness
bash: /proc/acpi/video/DVGA/LCD/brightness: Permission denied

This happened either after a kernel or hal update…

I found a workaround, that allow the brightness to be changed. This isn’t the fix, if I unplug the power cord the brightness keeps it’s value. Still, the function keys do their job…

Just add acpi_osi=”Linux” to your grub menu:

sudo vi /boot/grub/menu.lst
title           Ubuntu 8.10, kernel 2.6.27-11-generic
root            (hd0,2)
kernel          /boot/vmlinuz-2.6.27-11-generic root=UUID=cba317f7-1d97-4cf8-9ac8-a4a6aaf0ea81 ro quiet splash acpi_osi="Linux"
initrd          /boot/initrd.img-2.6.27-11-generic
quiet


Update 1:
There is a bug report about this problem.

Update 2 (16/01):
Recent acpi and kernel updates just solved the problem :)


Further reading

last updated: 16-01-2009

______________________________________________________________________________________

Syncing Windows Mobile 5/6 with Synce (Ubuntu 8.10 version)

UPDATE Dec10: New post updated from here.

One of my “to achieve” points was syncing my calendar and contact information from my Windows Mobile 5.0 Smartphone (Qtek 9100).

This post is an update from my previous one, after my Ubuntu 8.10 upgrade. Please refer to that first post if you’re using previous versions of Ubuntu. I upgraded Ubuntu and Synce, so if you are installing it from scratch and you’re having problems please let me know. I’ll try and help you.

I will show how I’m syncing my phone with Evolution using Synce in Ubuntu 8.10.
This is based in Synce wiki and Synce mailing lists.

Note: save this post if you’re using Gnome Network Manager, because you may stay without Internet after installing the core libraries. It’s very easy to fix though. In Ubuntu 8.10 I don’t have this problem.


Disclaimer

This is not an official Synce guide. This is my personal eXPerience using a single device, with a single WM flavor and a single OS.

If you are starting to play around with Synce, this post could help you if you’re using the same WM and Linux OS’s, but you should always check Synce official wiki for updates.

If you are having problems, the Synce mailing lists are probably the best place to go right now. The people are friendly and will help you solving your problems. You could also send me an email. If I can, I’ll help, if not, I’ll guide you in the right direction.


My setup

This is my current environment:

  • Qtek 9100 device running Windows Mobile 5.0 (WM5)
  • Ubuntu 8.10
  • Evolution as my Personal Information Manager


Adding repositories

  • Go to System > Administration > Software Sources
  • Add the following Third Party software
deb http://ppa.launchpad.net/synce/ubuntu intrepid main
  • Close and Reload, as asked, your sources


Core libraries

  • Get the core libraries
sudo apt-get install synce-hal librra0-tools librapi2-tools
  • Connect your device and run
synce-pls

You should see a list of files on your device. If so you have a working connection to your device!


Password protected device

When running synce-pls, if you have the following error, your device is password protected. If so, install SynCE-GNOME or SynCE-KPM to provide a password prompt on device connect.

I didn’t try this because my device isn’t password protected…

WARNING **: synce_info_from_odccm: Failed to get a connection for :
Not authenticated, you need to call !ProvidePassword with the
correct password. pls: Could not find configuration at path
'(Default)'


Gnome Network Manager

If you’re running Gnome Network Manager you don’t have Internet by now because your phone is now the new default network connection.

Follow this and you should be fine:

  • Check what ethernet device was given to your phone (in my case is rndis0)
ifconfig -a | grep 80:00:60:0f:e8:00  | cut -d " " -f 1
  • Add the next line to /etc/network/interfaces (replace rndis0 with the result from the previous command)
sudo vi /etc/network/interfaces
add iface rndis0 inet dhcp to the file
  • This will make Gnome Network Manager ignore the interface
  • Restart your network
sudo /etc/init.d/networking restart


No devices are connected to odccm

If you get an error that no devices are connected to odccm you should probably blacklist ipaq module:

  • Add the next line to /etc/modprobe.d/blacklist
sudo vi /etc/modprobe.d/blacklist
add blacklist ipaq to the file
  • After that you can remove any currently active ipaq modules
sudo rmmod ipaq


Syncing with OpenSync (needed packages)

In order to sync your device you need to use OpenSync.

sudo apt-get install multisync-tools opensync-plugin-evolution opensync-plugin-synce


Sync-engine

Sync-engine must be running in order to sync your phone. In Ubuntu the Engine should start automatically when you connect your device.

  • Download the config.xml file needed by sync-engine
cd ~/.synce/
wget
http://synce.svn.sf.net/svnroot/synce/trunk/sync-engine/config/config.xml

Now the tip. The current config.xml has the AutoSyncCommand and the Disable commented. Uncommented, leaving it disabled.

  • You can download my own
cd ~/.synce/
wget http://lofspot.net/synce/config.xml
  • Start sync-engine if needed
synce-sync-engine

Connect your phone via usb. You shouldn’t get any errors.


Create a partnership

You have to create a partnership between device and computer using one of two methods:

  1. Via command line
  2. Using synce-kpm (graphical and recommend)

(1) You can then use the command

synce-create-partnership "Linux desktop" "Contacts,Calendar"

The “Linux desktop” string can be any string of 20 characters or less. The available items for synchronization are:

* Contacts
* Calendar
* Tasks
* Files

When specifying items to sync, they must be separated by commas. You must also surround the list in double quotes and the string must not contain any whitespace.

(2) Or install synce-kpm

sudo apt-get install synce-kpm

Now run synce-kpm

synce-kpm

Go to Partnership manager. You probably have already partnerships created if you ever synced your phone under Windows.

I chose to start by deleting my existing partnerships and start from scratch, but, as pointed out by Guido Diepen if your device runs WM6 this will erase all your contacts/tasks/calendar. So do not delete your partnership if you’re running WM6 and your want to keep your data in the device.

In my case, having WM5, I’ve deleted every partnerships and created a new one. I chose to sync Calendar, Contacts and Tasks.


synce-opensync-plugin

Check the list of the available plugins:

msynctool --listplugins

You should have synce-opensync-plugin.

If you don’t see the above plugin in the output of msynctool, then download the plugin and copy this file to /usr/lib/opensync/python-plugins.

I already had the plugin.


Create OpenSync group

A group between SynCE and your chosen PIM application must be initiated.

I’m using Evolution (evo2-sync).

msynctool --addgroup synce-sync
msynctool --addmember synce-sync synce-opensync-plugin
msynctool --addmember synce-sync evo2-sync


Syncing your device (finally)

  • Start sync-engine if needed and connect your device
synce-sync-engine
  • Start synce-kpm
synce-kpm
  • Sync with OpenSync
msynctool --sync synce-sync

This could take some time the first time, so be patient. You can check your progress in synce-kpm.

After the msynctool command ends completely, check Evolution :-)

Important: keep your device on, so the synchronization isn’t interrupted.

In Ubuntu 8.10 I only need to call the msynctool after connecting the device and be sure the firewall isn’t causing trouble. Very easy.


Firewall

If you have a firewall active, and you’re having troubles syncing your device try to disable it.


Inconsistencies while syncing

While syncing kepp an eye out in you console. I had some inconsistencies in my data (contacts) than I had to resolve by selecting witch version of a contact I would like to keep.


Please, feel free to post a comment or email me at lof-ubuntu-xp [(at)] lofspot.net.

This is just a “this is how I did it” post. I probably won’t be able to help you, especially in another distribution/version or phone, still feel free to share your experience.


Further reading

last updated: 10-12-2008
original post: 10-12-2008

___________________________________________________________________________________________________

Upgrading to Ubuntu 8.10 The Intrepid Ibex

Last week Ubuntu 8.10, aka The Intrepid Ibex, was released.

Time to updgrade :-) First in my laptop.

I will be the using the 64 bit alternate cd to upgrade. This means that the upgrade will have a cd image as his source, and not the Internet. This way it’s much faster.

Before you start

  • Check for updates using Update Manager
  • Backup your data
  • Check the Release Notes
  • Download Ubuntu (I recommend using Torrents)
  • Check the file hash (example: md5sum ubuntu-8.10-alternate-amd64.iso)
  • Be sure to upgrade from Ubuntu 8.04.
  • Use Gmount-iso to mount the iso file. This way cd could be mounted without having to burn a cd.

In the Terminal, go to the cd mount point (example: /media/cdrom) and type:

gksu "sh /cdrom/cdromupgrade"

And now we wait…

During the updgrade there may be some questions about replacing some configuration files. I replaced them all with the new versions.

After restarting and reactivating my Software Sources there were more updates to do. This is because Ubuntu deactivates other software sources and because I made the upgrade from the alternate cd.


Issues

  • Non-Issue 1: It really seams faster :-)
  • Non-Issue 2: Install OpenOffice 3.0
  • Issue 1: I was missing some software I wanted to get back.
    • gVim
    • gnuCash
    • Mail Notification
    • LAMP Server (check the link for details)
  • Issue 2: Reactivate Software Sources (System > Administration > Software Sources) updating them to Intrepid.
  • Issue 3: Add to re-install EnvyNG-Qt (sudo apt-get install envyng-qt) and enable the ATI driver.
  • Issue 4: Scrolling in Firefox was extremely slow. I reinstalled the ATI driver and it’s fixed now.
  • sudo apt-get remove --purge fglrx*
    sudo apt-get remove --purge xserver-xorg-video-ati xserver-xorg-video-radeon
    sudo apt-get install xserver-xorg-video-ati
    sudo dpkg-reconfigure -phigh xserver-xorgsudo dpkg-reconfigure -phigh xserver-xorg

last updated: 11-11-2008

___________________________________________________________________________________________________

HP Pavilion dv5-1020ep (Ubuntu 64 bits)

My old laptop’s battery is dying, and used that as an excuse to buy myself a new on :-)

I had a HP Pavilion zt3240EA, and have been very happy with it. Nice machine. Still, age weights on every one.

I’m gonna be installing Ubuntu 8.04.1 LTS Desktop Edition, 64 bits version, on my new HP Pavilion dv5-1020ep.


Download and Burn a CD

md5sum ubuntu-8.04.1-desktop-amd64.iso
  • Burn a cd (you can use Brasero, for example, if you already use Ubuntu).


Running the live cd

  • Boot from the cd.
  • After booting it’s important to check the integrity of the cd. Burning cds also fails.


Hardware to check
(during the live cd session)

  • Graphics (only 1024×768, but check)
  • Sound (check)
  • Media buttons (check)
  • Cable network (check)
  • Wireless network (the proprietary Atheros wireless card was found, not tested)
  • HP media command (not working)
  • Integrated Webcam (check)


Hard Drive Partition Layout

/dev/sda
	/dev/sda1	ntfs	Vista			36002 MB
	/dev/sda2	ntfs	Vista Recover		 8450 MB
	/dev/sda3	ext3	/			10240 MB
	/dev/sda5	ext3	/home 			10240 MB
	/dev/sda6	ext3	/storage		94072 MB
	/dev/sda7	swap				 1028 MB


Post-install: Graphics Card

I installed EnvyNG using the Synaptic Package Manager (look for envyng-gtk) and just had to run it (Applications > System Tools > EnvyNG), after closing Synaptic (important), and choose to “Install the ATI driver (Automatic Hardware Detection)” option.

I now have a normal 1280×800 screen resolution and some desktop effects are already active.

There is an ATI Catalyst Control Center under Applications > Other, where you can tweak things up.

Problems to Solve: if I have Compiz on, there’s a terrible flickering when playing back movies.


Post-install: CPU Frequency Scaling

After installing Ubuntu I noticed that the frequency of both cores was always at 2 GHz (the cpu max frequency in my case).

Because this is a laptop I want the cpu to scale that frequencies as needed.

Useful tools:

sudo apt-get install cpufrequtils

You can check this behavior by:

  • Adding the “CPU Frequency Scaling Monitor” to your Gnome Panel (add two, one for each core). Frequency should change while you work.
  • Check the output of the following (here you can check the driver used – powernow-k8 – and the current scaling policy)
  • cpufreq-info

Reference: How to use CPU frequency scaling (cpufreq)

After some time of research here’s a very simple method (read the Reference for much more details):

  • Add the following to your /etc/rc.local file ( sudo vi /etc/rc.local )
modprobe powernow-k8
sudo cpufreq-selector -g userspace
/etc/init.d/powernowd restart

exit 0
  • Add the -n option to your /etc/default/powernowd file ( sudo vi /etc/default/powernowd )
OPTIONS="-q -n"
  • Restart

Useful tips:

  • Check available frequencies for your cpu (if you have more than one core also check cpu1, cpu2, etc.)
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
  • Check current governor
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  • Check available governors
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

Problems to solve: restarting powernowd always change the governor to ondemand.


Post-install: Wireless Network card

A warning in the Notification Area showed that a Proprietary Driver is enabled (Atheros wireless card).

lspci | grep Atheros to check the driver name.

Followed this instructions from Ubuntu Forums, now I can use the wireless card, I found several networks, the signal is good, I connect with my password, but I can’t get an IP… This means no Internet.

Problems to solve: connect to the Internet with sucess.


Post-install: Laptop Optimizations

Here’s some useful tips if you’re running on a laptop:

  • Change the ENABLE_LAPTOP_MODE option to true ( sudo vi /etc/default/acpi-support )
ENABLE_LAPTOP_MODE=true
  • Install and run powertop. Follow the instructions on-screen (more info here).
sudo apt-get install powertop
sudo powertop


Post-install: Sound Card

Sound works fine, but the Master mute button doen’t mute the Front. This means that the columns still output sound.

To fix this go to System > Preferences > Sound and select the Front device in the list below.


Post-install: File System

Besides the / and /home partitions, only root have permissions to write in every other partitions. In my case /storage.

So, we have to add permissions to our user:

sudo chown -R youruser:youruser /storage
sudo chmod -R 755 /storage

Click here for more info.


Post-install: Updates

Update Manager warned me about 120 available updates. Just letting it go…


Post-install: Multimedia

References: Complete Streaming, Multimedia & Video How-to and Medibuntu

  • Repositories
sudo wget http://www.medibuntu.org/sources.list.d/hardy.list \
 -O /etc/apt/sources.list.d/medibuntu.list
wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add \
 - && sudo apt-get update
  • Flash
sudo apt-get purge flashplugin-nonfree && \
sudo mkdir /usr/lib/flashplugin-nonfree && \
sudo cp -f ~/Desktop/libflashplayer.so \
/usr/lib/flashplugin-nonfree/ && \
sudo nspluginwrapper -i \
/usr/lib/flashplugin-nonfree/libflashplayer.so && \
sudo ln -sf \
/usr/lib/nspluginwrapper/plugins/npwrapper.libflashplayer.so \
/etc/alternatives/firefox-flashplugin && \
sudo ln -sf /etc/alternatives/firefox-flashplugin \
/usr/lib/firefox-addons/plugins/flashplayer-alternative.so && \
sudo rm -f /usr/lib/firefox/plugins/npwrapper.libflashplayer.so
  • Codecs and plugins (it will take quite some time)
sudo apt-get remove gnash gnash-common libflash-mozplugin \
libflashsupport mozilla-plugin-gnash swfdec-mozilla && \
sudo apt-get install alsa-oss faac faad flashplugin-nonfree \
gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad \
gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly \
gstreamer0.10-plugins-ugly-multiverse ia32-libs icedtea-gcjwebplugin \
liblame0 non-free-codecs openjdk-6-jre unrar
  • Audio and Video Streaming
sudo apt-get remove kaffeine-mozilla mozilla-helix-player \
mozilla-mplayer mozilla-plugin-vlc totem-mozilla xine-plugin && \
sudo apt-get install gnome-mplayer gecko-mediaplayer
  • Playing Encrypted DVDs
sudo apt-get install libdvdcss2 libdvdread3 libdvdnav4 build-essential debhelper fakeroot \
 regionset
sudo regionset

Check the reference link, because it as many other things you’ll want.


Post-install: Preferences and Look and Feel

Here’s some things I changed right away:

  • 4 workspaces
  • Automatic login (System > Administration > Login Window, Security tab)
  • Add Network Manager and Battery Charge Monitor to the Panel
  • Background
  • NTP Time Server
  • Weather on Clock Preferences


Post-install: NFS file sharing

To configure two Ubuntu machines to share files using NFS, check here.


Post-install: SAMBA Server

Go to Applications > Add/Remove and install Samba.

Go to System > Administration > Samba to add shares and define samba users.

Also check this post.


Post-install: LAMP Server

To install Apache, MySQL and PHP, check here.


Post-install: extra software

List of extra installation software installed:

  • Firefox Foxmarks add-on (can’t live without it)
  • GnomeDo
  • VLC
  • Conky
  • Synergy
  • GVim
  • lm-sensors
  • Network Selector
  • VirtualBox
  • Gaupol Subtitle Editor
  • More Firefox add-ons (BugMeNot, Forecastfox, Twitkit, Portuguese Dictionary)
  • Firefox IMDB search-engine
  • Gnucash
  • Google Earth (it will download a .bin installation file, run it in the Terminal)
  • aspell-pt-pt
  • Mail Notification


Further reading

last updated: 18-09-2008

______________________________________________________________________________________

New laptop

Just bought a new HP Pavilion dv5-1020ep.

Downloading 64 bits Ubuntu and almost ready to install it. I’ll write a post about it.


last updated: 16-09-2008

______________________________________________________________________________________

Virtualbox 2.0

Virtualbox 2.0 is out and now it’s easier to install and maintain.


Install

  • Download and register Sun authentication key
wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | \
sudo apt-key add -
  • Go to System > Administration > Software Sources and Third-Party Software.
  • Add the following sources for Hardy (check your distibution here):
deb http://download.virtualbox.org/virtualbox/debian hardy non-free
  • Now you can go to Synaptic Package Manager and look for virtualbox. This way you can uninstall previous Virtualbox installations (Synaptic Package Manager will do that for you).
  • Don’t forget to install the new Guest Additions if you’re using a Windows Virtual Machine.
  • Now you’ll receive updated through Update Manager.

Also check my previous posts about Virtualbox for more info and tips:


Further reading


last updated: 16-09-2008

______________________________________________________________________________________

Twitter

Just created a Twitter account. You can follow me here.

Here’s a bunch of Twitter Clients for Ubuntu.

My favourite way to twitter is using the Twitter Plugin in Gnome Do. Very cool!

I’m also trying Twitux. To install just go to Synaptic Package Manager and look for twitux.


last updated: 27-08-2008

______________________________________________________________________________________

Anatomy of the Linux kernel

If you want to know more about the Anatomy of the Linux kernel, here’s a nice article.


last updated: 20-08-2008

______________________________________________________________________________________

Sun Virtualbox

UPDATE AUG 10: Virtualbox 1.6.4 is out. Added a new “Update Virtualbox to a new version” section.

I have Virtualbox OSE (Open Source Edition) installed. I use it basically to use Office, when needed.

Currently I only restart to Windows to sync my iPod Touch, and that’s because Virtualbox OSE doesn’t support USB.

But there’s a version, provided by Sun, that supports USB devices.


Uninstall Virtualbox OSE

If you already have Virtualbox installed go to Applications > Add/Remove… and look for virtualbox to uninstall your current version.

I also went to System > Administration > Synaptic Package Manager and also looked for virtualbox to remove every trace of it.


Install Sun Virtualbox (currently v1.6.2
v1.6.4)

Go to Virtualbox download site and go to Binaries (all platforms).
Select your Platform (Ubuntu 8.04 x86 in my case), agree to the license and continue to the download.

After the download is complete start the installer (or double click the .deb file):

sudo dpkg -i virtualbox_1.6.2-31466_Ubuntu_hardy_i386.deb

And it’s that easy.


Virtualbox Users

  • Go to System > Administration > Users and Groups
  • Unlock the Settings and go to Manage Groups
  • Find the vboxusers group and click Properties
  • Select your username in the Group Members list


USB Support

By default the usb support is disabled. To enable it do the following:

sudo gedit /etc/init.d/mountdevsubfs.sh

Now look for:

#
# Magic to make /proc/bus/usb work
#
#mkdir -p /dev/bus/usb/.usbfs
#domount usbfs “” /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
#ln -s .usbfs/devices /dev/bus/usb/devices
#mount --rbind /dev/bus/usb /proc/bus/usb

And replace with (remove # from the last 4 lines):

#
# Magic to make /proc/bus/usb work
#
mkdir -p /dev/bus/usb/.usbfs
domount usbfs “” /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount --rbind /dev/bus/usb /proc/bus/usb

Restart your machine.


Update Virtualbox to a new version

When a new version is available you just need to download it and double click the .deb file. It’s that easy.


Last tips

Sun Virtualbox is now available at Applications > System Tools > Sun xVM VirtualBox.

In my case, at the end of the installation, Virtualbox found my previous virtual machine (Windows XP) and upgraded it to the new version, allowing me to use that virtual machine.

Because of this, every configuration was set and I only had to activate the USB support in my virtual machine.

Check my Virtualbox OSE post and see how to:

  • Create a new Virtual Machine
  • Share folders with the Virtual Machine (install Guest Additions for Windows)
  • VirtualBox running modes

Note: if you had Guest Additions for Windows in your old virtual machine, uninstall it and install the new 1.6.2 version.


Further reading


last updated: 10-08-2008

______________________________________________________________________________________

Next Page »