Archive for November, 2009

Arch Linux - Booting from card without initrd

Posted in How To's by Shafkat Shahzad, M.Sc on November 28th, 2009

Welcome to the tutorial guide. The guide will provide a user with advice and guidance on how to boot from card without initrd and also how to perform sleeping and waking system on a card.

Let’s say you decided to install Arch Linux on a card and compiled your own kernel (or used the kernel26eee kernel) without initrd. Card reader on EeePC is connected as an USB device. Unfortunately, USB storage devices are detected with a delay, so we must tell the kernel to wait until this device becomes available. You do this with “rootwait” option passed to kernel at boot time.

Sleeping and waking system on a card
If you have Arch Linux on a card, waking up from sleeping state will most likely fail. The only solution is to enable the CONFIG_USB_PERSIST option in kernel. The kernel26eee package should have this option enabled.
The command to do this is:
echo 1 >/sys/bus/usb/devices/…/power/persist
Replace the “…” with the device like 1-3 or 1-5 where the first number is the bus and the second is the device
Each device that is connected to your computer gets an entry in the sysfs “system file system” it is a virtual file system.

Display doesn’t wake up properly
If you encounter black display after suspend/resume, consider using the “uswsusp” package (available in the official repositories) and correcting suspend2ram script in /etc/acpi, where you use this line to make the machine go to sleep:

/usr/sbin/s2ram –force –vbe_post –vbe_mode

If you followed advise and guidance as provided in this tutorial guide then you would have successfully learnt about booting from card without initrd

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

ArchLinux - Shutdown Problem

Posted in How To's by Shafkat Shahzad, M.Sc on November 28th, 2009

Welcome to the tutorial guide. The guide will provide a user with advise and guidance on how to manage the shutdown problems.

If your Eee won’t shutdown properly (i.e. the power indicator LED is on but the LCD screen is off), then add the following lines to your /etc/rc.local.shutdown file.
#! /bin/bash
#
# /etc/rc.local.shutdown: Local shutdown script.
#

# Comment or uncomment the following two lines according to your system configuration.

/etc/rc.d/mpd stop # If you’re using mpd, then you have to stop its daemon first.

/etc/rc.d/alsa stop # If you’re using ALSA daemon, then you also have to stop it.

# The following line is Eee specific fix, you always need to have this line in /etc/rc.local.shutdown.

echo -n “0000:00:1b.0″ > /sys/bus/pci/drivers/HDA\ Intel/unbind
The above solution should fix the shutdown problem in most cases. But if for some reason the problem still persists, the module may not be able to be unloaded until after all services have finished. Do the above, then in /etc/rc.shutdown move
if [ -x /etc/rc.local.shutdown ]; then
/etc/rc.local.shutdown
fi
from where it was to directly above the line
# Terminate all processes
this will cause the rc.local.shutdown script to run after services have been exited. This fixed all issues for the person editing this note.

Unclean unmount during shutdown when having home directory mounted on SD card
If you experienced unclean unmount during shutdown when having your home directory on SD card, then add the following 3 lines to “Write to wtmp file before unmounting” section of your /etc/rc.shutdown file:

stat_busy “Unmounting Filesystems”
/bin/umount -a -t noramfs,notmpfs,nosysfs,noproc

# Add these 3 lines
sync;sync;sync;
eject /dev/sdb # Or whichever is your SD-card’s device name. /dev/disk/by-uuid/ followed by the UUID identifier is preferable though.
sleep 3
# End of hack

stat_done

If you followed advice and guidance as provided in this tutorial guide then you would have learnt how to manage shut down problems.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

ArchLinux – editing font sizes

Posted in How To's by Shafkat Shahzad, M.Sc on November 28th, 2009

Welcome to the tutorial guide. The guide will provide a user with guidance and instructions on how to edit font. There are two methods which are glu’s method and old method. Let’s have a lookl at the glu’s method.
The_glu’s method
You can edit /etc/X11/xinit/xserverrc and add “-dpi 134″:
exec /usr/bin/X -nolisten tcp -dpi 134

Please restart X and fonts should have the correct size. Notice it’s won’t works if you have Xft*dpi: in your .XDefaults.
You don’t need to edit your config file to set a smaller font size and if you did you should set font-size to 10 or you will have to small fonts…

Old method
On a default installation with Xfce 4 the font sizes were too big, here is what I did to sort them out.
The first step is to set the DPI by adding the following command to ~/.Xdefaults:
Xft*dpi: 134

This will then cause the fonts to be even bigger. If you want to set them all to be font-size 12. You can do this by adding the following into ~/.gtkrc-2.0:
style “user-font”
{
font_name=”Bitstream Vera Sans 12″
}
widget_class “*” style “user-font”

If you want to do the same with KDE fonts only if KDE is not installed then you can add the following to ~/.kde/share/config/kdeglobals:
[General]
StandardFont=Bitstream Vera Sans,6,-1,5,50,0,0,0,0,0
activeFont=Bitstream Vera Sans,6,-1,5,75,0,0,0,0,0
fixed=Bitstream Vera Sans Mono,6,-1,5,50,0,0,0,0,0
font=Bitstream Vera Sans,6,-1,5,50,0,0,0,0,0
menuFont=Bitstream Vera Sans,6,-1,5,50,0,0,0,0,0
taskbarFont=Bitstream Vera Sans,6,-1,5,50,1,0,0,0,0
toolBarFont=Bitstream Vera Sans,6,-1,5,50,0,0,0,0,0

If you followed the guidance and instructions as provided in this tutorial guide then you would have learnt about editing font size.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

Arch Linux – how to use cpufreq for power saving

Posted in How To's by Shafkat Shahzad, M.Sc on November 28th, 2009

Before we learn about how to use cpufreq for power saving, let’s install the cpufreq package by running following command:

# pacman -S cpufrequtils

If you want scaling down the processor you need to load the p4_clockmod module and for that please insert it into your /etc/rc.conf MODULES array for loading it at startup.

MODULES=(… p4_clockmod …)
Add ‘cpufreq’ to the DAEMONS array in /etc/rc.conf to have it start on startup.
DAEMONS=(… cpufreq …)
Add the following into /etc/conf.d/cpufreq:
governor=”ondemand”
min_freq=”113MHz”
max_freq=”900MHz”

Please note that with enabled cpufreq it scales the processor between 113MHz up to max. frequency. The benefit is that you should be able to save a lot on battery power. The stated 900MHz will be never reached by the eeePC, the p4_clockmod reports a wrong frequency here.

If you followed the guidance and instructions then you would have successfully installed the cpufreq package.

More responsive system with ondemand governor
The default up_threshold (where it will bump to a faster speed) for the CPU governor is 80, which means it will increase the CPU speed when utilization is above 80%. This can make X applications have a bit of lag.
Try changing this value:
$ sudo bash -c “echo 40 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold”
With 40 it still leaves the majority of CPU cycles at the lowest available clock speed but increases responsiveness. You can add this line to one of your startup scripts (such as /etc/rc.local) if you wish to keep it, for example:
#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#

echo 40 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
Also, following line is also reported to help makes system more responsive. You can use it by adding it to your /etc/rc.local:
echo 2000000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate.

If you followed the advise and guidance as provided in this tutorial guide then you would have successfully learnt about using cpufreq for power saving.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

ArchLinux – ighea’s acpi-eee installation

Posted in How To's by Shafkat Shahzad, M.Sc on November 27th, 2009

Welcome to the tutorial guide. The guide will provide a user with guidance and instructions on how to install ighea’s acpi-eee. The main purpose of installing this package is to provide you with an opportunity to assign actions to powerbutton. If you would like to install the package then please run following command:

# pacman -U acpi-eee-10.0-1-i686.pkg.tar.gz

Please note that you also edit this package to meet your needs and requirements.

If you use the wireless on/off acpi command; the NETWORK_UP_COMMAND=”" setting in /etc/acpi/eee.conf, when applicable, should at least release the network.

You have to ensure that asusosd is enabled on startup if you want to have the Graphic Indicators from Xandros. To run asusosd simply type asusosd & at a command prompt.
dkite’s acpid_eee

If you followed the instructions and guidance as provided in this tutorial guide then you would have successfully installed the package.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

ArchLinux - microphone

Posted in How To's by Shafkat Shahzad, M.Sc on November 27th, 2009

Welcome to the tutorial guide. The guide will provide a user with guidance and instructions on how to solve any problems with the internal microphone.

- First of all set in alsamixer “Input Source” to “i-Mic”
- Increase “Capture” and “i-Mic Boost” to your needs
- Edit /etc/asound.state the following, change the 2 “false” to “true” like showing:
….snap…..
control.11 {
comment.access ‘read write’
comment.type BOOLEAN
comment.count 2
iface MIXER
name ‘Capture Switch’
value.0 true
value.1 true
}
….snap….
- After editing please run following as root
# alsactl restore
- Now your internal microphone should be working.

If you followed the guidance and instructions as provided in this tutorial guide then you would have successfully learnt about solving problems with internal microphone.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

ArchLinux - Xorg

Posted in How To's by Shafkat Shahzad, M.Sc on November 27th, 2009

Welcome to the tutorial guide. The guide will provide a user with guidance and instructions on how to install th Xorg package.

A user can install the Xorg by running following command:

# pacman -Sy xorg
If you want to install the Intel graphics drivers, then please run following command:
# pacman -Sy xf86-video-intel
It is a good idea to install the Synaptics drivers for the touchpad. This can be done by running following command:
# pacman -Sy xf86-input-synaptics

Please note that if you are not able to use the keyboard or the mouse then it is a good idea to install the following package by running following command:
# pacman -Sy xf86-input-keyboard xf86-input-mouse

After running this command, you can drop the example Xorg configuration below into your /etc/X11/xorg.conf file OR use an automated Xorg configuration system. An Xorg file can be automatically generated by running the following command:
# Xorg -configure

This is a good example of Xorg configuration:
Section “ServerLayout”
Identifier “Arch Linux”
Screen 0 “Screen0″
InputDevice “keyboard”
InputDevice “mouse”
InputDevice “synaptics”
EndSection

Section “Files”
ModulePath “/usr/lib/xorg/modules”
FontPath “/usr/share/fonts/misc”
FontPath “/usr/share/fonts/100dpi:unscaled”
FontPath “/usr/share/fonts/75dpi:unscaled”
FontPath “/usr/share/fonts/TTF”
FontPath “/usr/share/fonts/Type1″
EndSection

Section “Module”
Load “glx”
Load “dri”
Load “extmod”
Load “synaptics”
EndSection

Section “ServerFlags”
Option “AllowMouseOpenFail”
Option “BlankTime” “5″
Option “AIGLX” “false”
Option “AutoAddDevices” “false”
EndSection

Section “InputDevice”
Identifier “keyboard”
Driver “kbd”
Option “CoreKeyboard”
Option “XkbRules” “xorg”
Option “XkbLayout” “us”
Option “XkbVariant” “”
EndSection

Section “InputDevice”
Identifier “mouse”
Driver “mouse”
Option “Device” “/dev/input/mice”
Option “Protocol” “IMPS/2″
Option “Emulate3Buttons” “yes”
Option “ZAxisMapping” “4 5″
Option “CorePointer”
EndSection

Section “InputDevice”
Identifier “synaptics”
Driver “synaptics”
Option “Device” “/dev/psaux”
Option “Protocol” “auto-dev”
Option “LeftEdge” “60″
Option “RightEdge” “1070″
Option “TopEdge” “90″
Option “BottomEdge” “680″
Option “PalmDetect” “0″
Option “SHMConfig” “true”
Option “SendCoreEvents” “yes”
Option “HorizEdgeScroll” “1″
Option “VertEdgeScroll” “1″
Option “RBCornerButton” “0″
Option “RTCornerButton” “0″
Option “MaxSpeed” “0.9″

# You will also need the following 3 lines if you’re using Xorg 1.5RC6 or newer
Option “TapButton1″ “1″
Option “TapButton2″ “2″
Option “TapButton3″ “3″
EndSection

Section “Monitor”
Identifier “Monitor0″
VendorName “ASUS”
ModelName “eeePC P701″
Modeline “800×480″ 29.58 800 816 896 992 480 481 484 497 -HSync +Vsync # 60 Hz
EndSection

Section “Device”
Identifier “Card0″
Driver “intel”
VendorName “Intel Corporation”
BoardName “Mobile 915GM/GMS/910GML Express Graphics Controller”
BusID “PCI:0:2:0″
Option “AccelMethod” “EXA”
Option “MigrationHeuristic” “greedy”
EndSection

Section “Screen”
Identifier “Screen0″
Device “Card0″
Monitor “Monitor0″
DefaultDepth 24
SubSection “Display”
Viewport 0 0
Depth 8
EndSubSection
SubSection “Display”
Viewport 0 0
Depth 15
EndSubSection
SubSection “Display”
Viewport 0 0
Depth 16
EndSubSection
SubSection “Display”
Viewport 0 0
Depth 24
EndSubSection
EndSection

Section “DRI”
Mode 0666
EndSection

If you followed the guidance and instructions as provided in this tutorial guide then you would have successfully installed the Xorg package.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

Arch Linux – installing FVWM2

Posted in How To's by Shafkat Shahzad, M.Sc on November 22nd, 2009

Welcome to the tutorial guide. The guide will provide a user with guidance and instructions on how to install FVM2.

FVWM (F Virtual Window Manager) is an extremely powerful ICCCM-compliant multiple virtual desktop window manager for the X Window system. Development is active, and support is excellent.
Install fvwm2 with
# pacman -S fvwm
It will install the official version of the WM. However, if you want/need to use some more features than it provides, you can install the. To install it from AUR or archlinuxfr repesctively, execute:
$ yaourt -S fvwm-patched
or
# pacman -S fvwm-patched
fvwm will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add
exec fvwm 2
to the user’s .xinitrc.

Please note when you start FVWM2, you will get into the blank configuration. However, when you left-click on the desktop, you will be able to select to configure FVWM. chose wanted modules and you are ready to go.

If you followed advise and instructions as provided in this tutorial guide then you will have successfully installed the FVWM2.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

Arch Linux – configuring and updating the new Arch Linux base system

Posted in How To's by Shafkat Shahzad, M.Sc on November 22nd, 2009

Welcome to the tutorial guide. The guide will provide a user with guidancv and instructions on how to configure and udpdate new arch linuxbase system.

Configure and Update the New Arch Linux base system
Your new Arch Linux system will boot up and finish with a login prompt (you may want to change the boot order in your BIOS back to booting from hard disk).

Please note that the new Arch Linux base system is now a functional GNU/Linux environment ready for customisation. Now you can build this elegant set of tools according to your needs and purposes.

Now, please login with the root account. Let’s configure pacman and update the system as root, then add a normal user. Please follow the steps as mentioned below:

Configuring the network
If you are encountering problems with network configuration then this will prove helpful for you.

If the network is configured properly then your network will be working. Let’s do a test by pinging google by running following command:
# ping -c 3 www.google.com

If by running the ping command for google, an “unknown host” error is received, this will show that your network is not properly configured. It is a good idea to double-check the following files for integrity and proper settings:

/etc/rc.conf # Specifically, check your HOSTNAME= and NETWORKING section.
/etc/hosts # Double-check your format. (See above.)
/etc/resolv.conf # If you are using a static IP. If you are using DHCP, this file will be dynamically created and destroyed by default, but can be changed to the preference.

Wired LAN
Please check your Ethernet with
# ifconfig -a
By running this command, all interfaces will be listed. You should see an entry for eth0, or perhaps eth1.

• Static IP
If you would like to set a new static IP then please run following command:
# ifconfig eth0 netmask up

and the default gateway with
# route add default gw

Please verify that /etc/resolv.conf contains the DNS server and add it if it is missing. Now you can check the network again by pinging www.google.com. If everything is working now you can adjust /etc/rc.conf in a similar way in which you were advisd for static IP.
• DHCP
If you have a DHCP server/router in the network then please run this command:
# dhcpcd eth0
If it is working, then please adjust /etc/rc.conf for dynamic IP.
Wireless LAN
• Please ensure that the driver has created a usable interface by running this command:
# iwconfig
• Bring the interface up with ifconfig up. e.g.:
# ifconfig wlan2 up
• If you want to specify the id of the wireless network, then please run the following command:iwconfig essid .
• If you are using WEP; then please run following command: iwconfig essid key , e.g.:
# iwconfig wlan2 essid linksys key ABCDEF01234
• You can request an IP address with dhcpcd . For example:
# dhcpcd wlan2
• Ensure you can route:
$ ping -c 3 www.google.com

Analog Modem
If you are interested in using a Hayes-compatible, external, analog modem, then please note that you will need to at least have the ppp package installed. You can modify the file /etc/ppp/options to suit your needs and according to man pppd.

You have to define a chat script to supply your username and password to the ISP after the initial connection has been established. The manpages for pppd and chat have examples in them that should suffice to get a connection up and running if you’re either experienced or stubborn enough. With udev, your serial ports usually are /dev/tts/0 and /dev/tts/1.

ISDN
If you are interested in setting up ISDN, then please follow the following steps:
Install and configure hardware
Install and configure the ISDN utilities
Add settings for your ISP

The current Arch stock kernels include the necessary ISDN modules, and you will not need to recompile the kernel unless you are about to use rather odd ISDN hardware. After physically installing the ISDN card in the machine or plugging in the USB ISDN-Box, you can try loading the modules with modprobe.

Please note that nearly all passive ISDN PCI cards are handled by the hisax module, which needs two parameters: type and protocol. You should set protocol to ‘1′ if the country in which you are residing uses the 1TR6 standard, ‘2′ if it uses EuroISDN (EDSS1), ‘3′ if you’re hooked to a so-called leased-line without D-channel, and ‘4′ for US NI1.

The type parameter depends on your card; a list of all possible types can be found in the README.HiSax kernel documentation. You can choose the card and load the module with the appropriate options as below:
# modprobe hisax type=18 protocol=2

This will load the hisax module for my ELSA Quickstep 1000PCI. You should find helpful debugging output in the /var/log/everything.log file, in which you should see your card being prepared for action. Please note that you will probably need to load some USB modules before you can work with an external USB ISDN Adapter.

Once you have confirmed that your card works with certain settings, you can add the module options to your /etc/modprobe.conf by running following command:
alias ippp0 hisax
options hisax type=18 protocol=2

Please note that you will need to add the SPID to the t
After you have configured your ISDN card with the isdnctrl utility, you should be able to dial into the machine you specified with the PHONE_OUT parameter, but fail the username and password authentication. In order to make this work please add your username and password to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets as if you were configuring a normal analogous PPP link, depending on which protocol your ISP uses for authentication. If in doubt, put your data into both files.

If you have set up everything in a correct way you will be able to establish a dial-up connection with
# isdnctrl dial ippp0
as root, but if you have any problems then please remember to check the logfiles.

If you followed the advise and guidance as provided in this tutorial guide, then you would have successfully updated and configured the Arch Linux base system.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

Arch Linux – guidance and instructions on DSL

Posted in How To's by Shafkat Shahzad, M.Sc on November 22nd, 2009

Welcome to the tutorial guide. The guide will provide you with guidance and instructions regarding usage of DSL.

DSL (PPPoE)
These instructions are relevant to you only if your PC itself is supposed to manage the connection to your ISP. You do not need to do anything but define a correct default gateway if you are using a separate router of some sort to do the grunt work.

Please note that before you can use your DSL online connection, you will have to physically install the network card that is supposed to be connected to the DSL-Modem into your computer. After adding your newly installed network card to the modules.conf/modprobe.conf or the MODULES array, you should install the rp-pppoe package and run the pppoe-setup script to configure your connection. After you have entered all the data, you can connect and disconnect your line with
# /etc/rc.d/adsl start
and
# /etc/rc.d/adsl stop
respectively. The setup usually is rather easy and straightforward, but feel free to read the manpages for hints. If you want to automatically ‘dial in’ at boot, add adsl to your DAEMONS array, and put a ! before the network entry, since the network is handled by adsl now.

If you followed the instructions and guidance as provided in this tutorial guide then you would have learnt about DSL.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

« Previous entries