Difference between revisions of "Compaq Armada M300"

From ArchWiki
Jump to: navigation, search
(Keyboard: Out of date.)
(update link(s) (avoid redirect))
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
[[Category:HP]]
 
[[Category:HP]]
This article describes the additional configuration needed on a brand new ArchLinux installation to get the most of a Compaq Armada M300 laptop.
+
This article describes the additional configuration needed on a brand new Arch Linux installation to get the most of a Compaq Armada M300 laptop.
  
This laptop is very old but with ArchLinux and the following setup it is still useful for browsing, skyping and even "light open officing".
+
This laptop is very old but with Arch Linux and the following setup it is still useful for browsing, skyping and even "light open officing".
  
== Hardware Identification ==
+
== Hardware identification ==
After installing ArchLinux i686, please check that:
+
  
'''# lscpu'''
+
After installing Arch Linux i686, please check that:
Architecture:          i686
+
 
CPU(s):                1
+
{{hc|# lscpu|
Thread(s) per core:    1
+
Architecture:          i686
Core(s) per socket:    1
+
CPU(s):                1
CPU socket(s):        1
+
Thread(s) per core:    1
Vendor ID:            GenuineIntel
+
Core(s) per socket:    1
CPU family:            6
+
CPU socket(s):        1
Model:                8
+
Vendor ID:            GenuineIntel
Stepping:              6
+
CPU family:            6
CPU MHz:              600.000
+
Model:                8
 +
Stepping:              6
 +
CPU MHz:              600.000
 +
}}
  
 
and
 
and
  
'''# lspci'''
+
{{hc|# lspci|
00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (AGP disabled) (rev 03)
+
00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (AGP disabled) (rev 03)
00:04.0 CardBus bridge: Texas Instruments PCI1211
+
00:04.0 CardBus bridge: Texas Instruments PCI1211
00:05.0 VGA compatible controller: ATI Technologies Inc 3D Rage LT Pro (rev dc)
+
00:05.0 VGA compatible controller: ATI Technologies Inc 3D Rage LT Pro (rev dc)
00:07.0 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 02)
+
00:07.0 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 02)
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
+
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.2 USB Controller: Intel Corporation 82371AB/EB/MB PIIX4 USB (rev 01)
+
00:07.2 USB Controller: Intel Corporation 82371AB/EB/MB PIIX4 USB (rev 01)
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
+
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:08.0 Multimedia audio controller: ESS Technology ES1978 Maestro 2E (rev 10)
+
00:08.0 Multimedia audio controller: ESS Technology ES1978 Maestro 2E (rev 10)
00:09.0 Ethernet controller: Intel Corporation 82557/8/9/0/1 Ethernet Pro 100 (rev 09)
+
00:09.0 Ethernet controller: Intel Corporation 82557/8/9/0/1 Ethernet Pro 100 (rev 09)
00:09.1 Serial controller: Agere Systems LT WinModem
+
00:09.1 Serial controller: Agere Systems LT WinModem
 +
}}
  
 
corresponds to your hardware.
 
corresponds to your hardware.
  
==Hardware Setup==
+
== Hardware setup ==
 +
 
 
Lets get the features of the laptop correctly working in order to get the most of it.
 
Lets get the features of the laptop correctly working in order to get the most of it.
  
===Video===
+
=== Video ===
 +
 
 
Necessary driver packages:
 
Necessary driver packages:
*{{Pkg|xf86-input-synaptics}}
+
* {{Pkg|xf86-input-synaptics}}
*{{Pkg|xf86-video-mach64}}
+
* {{Pkg|xf86-video-mach64}}
  
{{Note|For additional information, see the [[Xorg]] page}}
+
{{Note|
 +
* For additional information, see the [[Xorg]] page.
 +
* Update: Oct, 24, 2010: The AUR package {{AUR|mach64drm}} should bring back 3D rendering for current kernel versions.
 +
}}
  
{{Note|Update: Oct, 24, 2010: The AUR package {{AUR|mach64drm}} should bring back 3D rendering for current kernel versions.}}
+
=== CPU scaling ===
  
===CPU scaling===
+
See [[CPU frequency scaling]].
See [[CPU Frequency Scaling]].
+
  
 
{{Note|If you are unable to switch frequencies, please check the BIOS settings for SpeedStep support}}
 
{{Note|If you are unable to switch frequencies, please check the BIOS settings for SpeedStep support}}
  
===Wireless===
+
=== Wireless ===
 +
 
 
Even though the M300 has no default wireless support, you might have a PCMCIA card.
 
Even though the M300 has no default wireless support, you might have a PCMCIA card.
For it to work, you must first:
+
For it to work, you must first install {{Pkg|iproute2}}, then bring it up:
# pacman -S wireless_tools
+
  # ip link set wlp2s0 up
 
+
{{Note|Your card may be given a name other than {{ic|wlp2s0}}. Check by issueing the command ''iwconfig''}}
then bring it up
+
  # ifconfig '''''eth1''''' up
+
{{Note|Your card may be given a name other than '''eth1'''. Check by issueing the command '''iwconfig'''}}
+
  
 
and watch the neighborhood:
 
and watch the neighborhood:
 
  # iwlist scan
 
  # iwlist scan
  
{{Note|If you run into troubles with your wireless card, check the [[Wireless Setup]] article}}
+
{{Note|If you run into troubles with your wireless card, check the [[Wireless network configuration]] article}}
 +
 
 +
== Additional configuration ==
  
== Additional Configuration ==
+
=== Restore values at boot ===
  
=== additions to /etc/rc.local ===
+
In order to have the mixer to always get back to the presetted values, install {{Pkg|alsa-utils}} and add the following to a script
In order to have the mixer to always get back to the presetted values, install '''alsa-utils''' and add the following to '''/etc/rc.local'''
+
 
  # mixer settings
 
  # mixer settings
 
  amixer set Master on 31
 
  amixer set Master on 31
Line 75: Line 81:
 
  amixer set Mic cap
 
  amixer set Mic cap
 
  amixer set Capture on 8
 
  amixer set Capture on 8
 +
Then call it from a systemd unit. Enable that unit.
  
For you to get your clock always updated, add: -- you might need this if your CMOS battery is gone
+
For you to get your clock always updated, install {{Pkg|ntp}}, add to the previous script:
 
  # set the time
 
  # set the time
 
  sleep 20        # give sometime for the network to connect
 
  sleep 20        # give sometime for the network to connect
  if ((`ip route| wc -l` > 3)); then
+
  if (($(ip route| wc -l) > 3)); then
 
         ntpdate pool.ntp.org
 
         ntpdate pool.ntp.org
 
  fi
 
  fi
{{Note|please assure the '''ntp''' package is installed}}
+
{{Note|You might need this if your CMOS battery is gone}}
  
 
=== Hotkey configuration ===
 
=== Hotkey configuration ===
  
 
==== LCD brightness ====
 
==== LCD brightness ====
Add the following to '''/usr/local/bin/backlight_control''':
 
#! /bin/bash
 
 
# backlight_control
 
# =================
 
#
 
# Increase or decrease the LCD backlight brightness of (some) laptops
 
#
 
# Configure the following global keys to perform the following commands:
 
#
 
# XF86MonBrightnessUp:          /usr/local/bin/backlight_control inc
 
# XF86MonBrightnessDown:        /usr/local/bin/backlight_control dec
 
 
# constants
 
SYSDEV="/sys/devices/virtual/backlight/acpi_video0"
 
 
# parameters
 
OP=$1
 
 
function getCurrentBrightness {
 
        ((cb=`cat ${SYSDEV}/brightness`))
 
        echo $cb
 
}
 
 
function setCurrentBrightness {
 
        cb=$1
 
        sudo bash -c "echo $cb >${SYSDEV}/brightness"
 
}
 
 
function incBrightness {
 
        ((cb=`getCurrentBrightness`))
 
        ((cb=cb+1))
 
        setCurrentBrightness $cb
 
}
 
 
function decBrightness {
 
        ((cb=`getCurrentBrightness`))
 
        ((cb=cb-1))
 
        setCurrentBrightness $cb
 
}
 
 
case "$OP" in
 
        inc)
 
                incBrightness
 
        ;;
 
        dec)
 
                decBrightness
 
        ;;
 
        *)
 
        echo "Usage: $0 {inc|dec}"
 
esac
 
  
==== LCD / VGA Switch ====
+
Add the following to {{ic|/usr/local/bin/backlight_control}}:
Create '''/usr/local/bin/switch_display''' and add the following:
+
{{hc|/usr/local/bin/backlight_control|2=
#! /bin/bash
+
#! /bin/bash
+
 
# switch_display
+
# backlight_control
# ==============
+
# =================
#
+
#
# Switch the output combinations of LVDS and a possibly connected VGA when the appropriate
+
# Increase or decrease the LCD backlight brightness of (some) laptops
# function key is pressed
+
#
#
+
# Configure the following global keys to perform the following commands:
# Configure the following global keys to perform the following commands:
+
#
#
+
# XF86MonBrightnessUp:          /usr/local/bin/backlight_control inc
# XF86Display:          /usr/local/bin/switch_display
+
# XF86MonBrightnessDown:        /usr/local/bin/backlight_control dec
+
 
curr_res=`xrandr | grep "Screen 0" | sed 's/.*current \([^,]*\),.*/\1/'`
+
# constants
if [ "$curr_res" == "2304 x 800" ]; then        # this is the resolution when both displays are active
+
SYSDEV="/sys/devices/virtual/backlight/acpi_video0"
xrandr --verbose --output LVDS1 --off
+
 
xrandr --verbose --output VGA1 --mode 1024x768 -r 75.1 --primary
+
# parameters
elif [ "$curr_res" == "1024 x 768" ]; then      # resolution when only the VGA is activated
+
OP=$1
xrandr --verbose --output LVDS1 --mode 1280x800 --primary
+
 
xrandr --verbose --output VGA1 --off
+
function getCurrentBrightness {
else  # when only the LVDS is activated
+
        ((cb=$(cat ${SYSDEV}/brightness)))
xrandr --verbose --output LVDS1 --mode 1280x800 --primary
+
        echo $cb
xrandr --verbose --output VGA1 --mode 1024x768 -r 75.1 --right-of LVDS1
+
}
fi
+
 
 +
function setCurrentBrightness {
 +
        cb=$1
 +
        sudo bash -c "echo $cb >${SYSDEV}/brightness"
 +
}
 +
 
 +
function incBrightness {
 +
        ((cb=$(getCurrentBrightness)))
 +
        ((cb=cb+1))
 +
        setCurrentBrightness $cb
 +
}
 +
 
 +
function decBrightness {
 +
        ((cb=$(getCurrentBrightness)))
 +
        ((cb=cb-1))
 +
        setCurrentBrightness $cb
 +
}
 +
 
 +
case "$OP" in
 +
        inc)
 +
                incBrightness
 +
        ;;
 +
        dec)
 +
                decBrightness
 +
        ;;
 +
        *)
 +
        echo "Usage: $0 {inc|dec}"
 +
esac
 +
}}
 +
 
 +
==== LCD / VGA switch ====
 +
 
 +
Create {{ic|/usr/local/bin/switch_display}} and add the following:
 +
{{bc|/usr/local/bin/switch_display|2=
 +
#! /bin/bash
 +
 
 +
# switch_display
 +
# ==============
 +
#'''
 +
# Switch the output combinations of LVDS and a possibly connected VGA when the appropriate
 +
# function key is pressed
 +
#
 +
# Configure the following global keys to perform the following commands:
 +
#
 +
# XF86Display:          /usr/local/bin/switch_display
 +
 
 +
curr_res=$(xrandr | grep "Screen 0" | sed 's/.*current \([^,]*\),.*/\1/')
 +
if [ "$curr_res" == "2304 x 800" ]; then        # this is the resolution when both displays are active
 +
xrandr --verbose --output LVDS1 --off
 +
xrandr --verbose --output VGA1 --mode 1024x768 -r 75.1 --primary
 +
elif [ "$curr_res" == "1024 x 768" ]; then      # resolution when only the VGA is activated
 +
xrandr --verbose --output LVDS1 --mode 1280x800 --primary
 +
xrandr --verbose --output VGA1 --off
 +
else  # when only the LVDS is activated
 +
xrandr --verbose --output LVDS1 --mode 1280x800 --primary
 +
xrandr --verbose --output VGA1 --mode 1024x768 -r 75.1 --right-of LVDS1
 +
fi
 +
}}
  
 
==== Volume up, down and mute ====
 
==== Volume up, down and mute ====
Create a script called '''/usr/local/bin/volume_control''':
+
 
#! /bin/bash
+
Create a script called {{ic|/usr/local/bin/volume_control}}:
+
 
# volume_control
+
{{hc|/usr/local/bin/volume_control|2=
# ==============
+
#! /bin/bash
+
 
# Perform mixer actions according to laptop / multimedia keyboard special key presses
+
# volume_control
# like muting/unmuting, increasing/decrasing the volume, etc.
+
# ==============
#
+
 
# Configure the following global keys to perform the following commands:
+
# Perform mixer actions according to laptop / multimedia keyboard special key presses
#
+
# like muting/unmuting, increasing/decrasing the volume, etc.
# XF86AudioMute:          /usr/local/bin/volume_control flip_muteness
+
#
# XF86AudioLowerVolume:    /usr/local/bin/volume_control dec
+
# Configure the following global keys to perform the following commands:
# XF86AudioRaiseVolume:    /usr/local/bin/volume_control inc
+
#
+
# XF86AudioMute:          /usr/local/bin/volume_control flip_muteness
# constants
+
# XF86AudioLowerVolume:    /usr/local/bin/volume_control dec
AMIXER="/usr/bin/amixer"
+
# XF86AudioRaiseVolume:    /usr/local/bin/volume_control inc
 +
 
 +
# constants
 +
AMIXER="/usr/bin/amixer"
 +
 
 +
# parameters
 +
OP=$1
 +
 
 +
function flipMuteness {
 +
if amixer get Master | tail -n 1 | grep -- '\[on\]'; then
 +
amixer set Master mute
 +
else
 +
amixer set Master on
 +
fi
 +
}
 
   
 
   
# parameters
+
function getCurrentVolume {
OP=$1
+
amixer get Master | tail -n 1 | sed 's/.*Playback \([0-9]*\).*/\1/'
+
}
function flipMuteness {
+
 
if amixer get Master | tail -n 1 | grep -- '\[on\]'; then
+
function setCurrentVolume {
amixer set Master mute
+
        cv=$1
else
+
amixer set Master $cv
amixer set Master on
+
}
fi
+
 
}
+
function incVolume {
 
+
        ((cv=$(getCurrentVolume)))
function getCurrentVolume {
+
        ((cv=cv+1))
amixer get Master | tail -n 1 | sed 's/.*Playback \([0-9]*\).*/\1/'
+
        setCurrentVolume $cv
}
+
}
+
 
function setCurrentVolume {
+
function decVolume {
        cv=$1
+
        ((cv=$(getCurrentVolume)))
amixer set Master $cv
+
        ((cv=cv-1))
}
+
        setCurrentVolume $cv
+
}
function incVolume {
+
 
        ((cv=`getCurrentVolume`))
+
case "$OP" in
        ((cv=cv+1))
+
        inc)
        setCurrentVolume $cv
+
                incVolume
}
+
        ;;
+
        dec)
function decVolume {
+
                decVolume
        ((cv=`getCurrentVolume`))
+
        ;;
        ((cv=cv-1))
+
flip_muteness)
        setCurrentVolume $cv
+
flipMuteness
}
+
;;
+
        *)
case "$OP" in
+
        echo "Usage: $0 {inc|dec}"
        inc)
+
esac
                incVolume
+
}}
        ;;
+
        dec)
+
                decVolume
+
        ;;
+
flip_muteness)
+
flipMuteness
+
;;
+
        *)
+
        echo "Usage: $0 {inc|dec}"
+
esac
+
  
 
== Problems and not tested issues ==
 
== Problems and not tested issues ==
  
=== Dual Monitor ===
+
=== Dual monitor ===
You'd probably have to do it by hand. Add this to the beginning of your '''~/.xinitrc''':
+
 
# set multiple monitors
+
You'd probably have to do it by hand. Add this to the beginning of your {{ic|~/.xinitrc}}:
xrandr --verbose --output LVDS1 --mode 1024x768 --primary
+
{{bc|
xrandr --verbose --output VGA1 --mode 1024x768 -r 75.1 --right-of LVDS1
+
# set multiple monitors
 +
xrandr --verbose --output LVDS1 --mode 1024x768 --primary
 +
xrandr --verbose --output VGA1 --mode 1024x768 -r 75.1 --right-of LVDS1
 +
}}

Latest revision as of 21:40, 9 April 2014

This article describes the additional configuration needed on a brand new Arch Linux installation to get the most of a Compaq Armada M300 laptop.

This laptop is very old but with Arch Linux and the following setup it is still useful for browsing, skyping and even "light open officing".

Hardware identification

After installing Arch Linux i686, please check that:

# lscpu
Architecture:          i686
CPU(s):                1
Thread(s) per core:    1
Core(s) per socket:    1
CPU socket(s):         1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 8
Stepping:              6
CPU MHz:               600.000

and

# lspci
00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (AGP disabled) (rev 03)
00:04.0 CardBus bridge: Texas Instruments PCI1211
00:05.0 VGA compatible controller: ATI Technologies Inc 3D Rage LT Pro (rev dc)
00:07.0 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 02)
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.2 USB Controller: Intel Corporation 82371AB/EB/MB PIIX4 USB (rev 01)
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:08.0 Multimedia audio controller: ESS Technology ES1978 Maestro 2E (rev 10)
00:09.0 Ethernet controller: Intel Corporation 82557/8/9/0/1 Ethernet Pro 100 (rev 09)
00:09.1 Serial controller: Agere Systems LT WinModem

corresponds to your hardware.

Hardware setup

Lets get the features of the laptop correctly working in order to get the most of it.

Video

Necessary driver packages:

Note:
  • For additional information, see the Xorg page.
  • Update: Oct, 24, 2010: The AUR package mach64drmAUR should bring back 3D rendering for current kernel versions.

CPU scaling

See CPU frequency scaling.

Note: If you are unable to switch frequencies, please check the BIOS settings for SpeedStep support

Wireless

Even though the M300 has no default wireless support, you might have a PCMCIA card. For it to work, you must first install iproute2, then bring it up:

# ip link set wlp2s0 up
Note: Your card may be given a name other than wlp2s0. Check by issueing the command iwconfig

and watch the neighborhood:

# iwlist scan
Note: If you run into troubles with your wireless card, check the Wireless network configuration article

Additional configuration

Restore values at boot

In order to have the mixer to always get back to the presetted values, install alsa-utils and add the following to a script

# mixer settings
amixer set Master on 31
amixer set PCM on 25
amixer set Mic cap
amixer set Capture on 8

Then call it from a systemd unit. Enable that unit.

For you to get your clock always updated, install ntp, add to the previous script:

# set the time
sleep 20        # give sometime for the network to connect
if (($(ip route| wc -l) > 3)); then
        ntpdate pool.ntp.org
fi
Note: You might need this if your CMOS battery is gone

Hotkey configuration

LCD brightness

Add the following to /usr/local/bin/backlight_control:

/usr/local/bin/backlight_control
dec}"
esac

LCD / VGA switch

Create /usr/local/bin/switch_display and add the following:

/usr/local/bin/switch_display

Volume up, down and mute

Create a script called /usr/local/bin/volume_control:

/usr/local/bin/volume_control
 tail -n 1 

Problems and not tested issues

Dual monitor

You'd probably have to do it by hand. Add this to the beginning of your ~/.xinitrc:

# set multiple monitors
xrandr --verbose --output LVDS1 --mode 1024x768 --primary
xrandr --verbose --output VGA1 --mode 1024x768 -r 75.1 --right-of LVDS1