Monday, February 12, 2007

 

Modem Howto

Today I investigate to find a way to have my modem working under linux...
After running the tool Linmodem, It look like the modem in my Inspiron 1501 is supported by the driver HSFMODEM from Linuxiant.

I install the free version (limited to 14.4k) and afer a reboot, I start minicom on /dev/modem and this is what I got:

AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0

OK

ATI3

hsfmodem-7.60.00.01x86_64full


OK

 

ATI linux driver kernel 2.6.20

I found the following information on how to fix the ATI linux driver for kernel 2.6.20:

Kernel 2.6.20 + FGLRX 8.33.6 = not compiling


Here is what I did:

I downloaded and installed newest ati drivers (ati-driver-installer-8.33.3-x86_64.run)

After installation, I just downloaded the patch and (as a root):

cd /lib/modules/fglrx/build_mod

patch -p6 < {path to patch}/fglrx-2.6.20.patch

./make.sh

cd ..

./make_install.sh

And then restart X (of course you might to need to modify your xorg.conf if you are doing new install of ati fglrx drivers).

Hi follow these steps and fix the problem for me...

Tuesday, February 06, 2007

 

ACPI configuration - Lid event

I decide to play a little bit with the ACPI configuration. For now, each time I close the lip of my laptop, the system automatically lock the screen.

Now that the suspend is working since I update my kernel to 2.6.20, I want to customize the lip action a little bit. I want to check if the system is on the AC adapter, if it's, locking the screen is the good action. But if the system is running on the battery, I want it to turn on the standby mode when the lid is close.

First, the ACPI scripts are located in the /etc/acpi directory, and the configuration file for the lid event is /etc/acpi/lid.sh

To check the state of the AC adapter, we can do it with the following : cat /proc/acpi/ac_adapter/ACAD/state
If the AC adapter is present:
state: on-line
If we run on the battery:
state: off-line


To turn on the stanby mode, we can do it with the following command:
echo -n mem > /sys/power/state
To turn on the hibernate mode, we can do it with the following
echo -n disk > /sys/power/state

So based on that, this is my change:
diff -u lid.sh_distro lid.sh
--- lid.sh_distro 2007-02-06 14:21:31.000000000 -0500
+++ lid.sh 2007-02-06 14:34:21.000000000 -0500
@@ -11,14 +11,20 @@
grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]
then
- for x in /tmp/.X11-unix/*; do
- displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
- getXuser;
- if [ x"$XAUTHORITY" != x"" ]; then
- export DISPLAY=":$displaynum"
- . /usr/share/acpi-support/screenblank
+ if grep -q "off-line" /proc/acpi/ac_adapter/ACAD/state; then
+ #Here we are on the battery, so we goes in sleep mode
+ echo -n mem > /sys/power/state
+ else
+ #Here we are on the AC adapter
+ for x in /tmp/.X11-unix/*; do
+ displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
+ getXuser;
+ if [ x"$XAUTHORITY" != x"" ]; then
+ export DISPLAY=":$displaynum"
+ . /usr/share/acpi-support/screenblank
+ fi
+ done
fi
- done
else
for x in /tmp/.X11-unix/*; do
displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`

 

lspci information

00:00.0 Host bridge: ATI Technologies Inc RS480 Host Bridge (rev 10)
00:01.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge
00:05.0 PCI bridge: ATI Technologies Inc Unknown device 5a37
00:06.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge
00:12.0 SATA controller: ATI Technologies Inc Unknown device 4380
00:13.0 USB Controller: ATI Technologies Inc Unknown device 4387
00:13.1 USB Controller: ATI Technologies Inc Unknown device 4388
00:13.2 USB Controller: ATI Technologies Inc Unknown device 4389
00:13.3 USB Controller: ATI Technologies Inc Unknown device 438a
00:13.4 USB Controller: ATI Technologies Inc Unknown device 438b
00:13.5 USB Controller: ATI Technologies Inc Unknown device 4386
00:14.0 SMBus: ATI Technologies Inc Unknown device 4385 (rev 13)
00:14.1 IDE interface: ATI Technologies Inc Unknown device 438c
00:14.2 Audio device: ATI Technologies Inc Unknown device 4383
00:14.3 ISA bridge: ATI Technologies Inc Unknown device 438d
00:14.4 PCI bridge: ATI Technologies Inc Unknown device 4384
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
01:05.0 VGA compatible controller: ATI Technologies Inc RS482 [Radeon Xpress 200M]
05:00.0 Network controller: Broadcom Corporation Unknown device 4311 (rev 01)
08:00.0 Ethernet controller: Broadcom Corporation BCM4401-B0 100Base-TX (rev 02)
08:01.0 Class 0805: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 19)
08:01.1 System peripheral: Ricoh Co Ltd Unknown device 0843 (rev 01)

 

Hibernate support with kernel 2.6.20

I read some post on the net explaining that with kernel version < 2.6.19 the hibernate and suspend may not work with the AHCI SATA. It may not work beause the AHCI was not restore after the suspend...

With the default Ubuntu 6.10 kernel (2.6.17-10), the suspend was not working.

So I upgrade to kernel 2.6.20:

This is the step:
cd /usr/src
sudo wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.tar.bz2
sudo tar xjf linux-2.6.20.tar.bz2
cd linux-2.6.20
cp /boot/config-2.6.17-10-generic .config
make oldconfig
make
make modules_install install
cd /boot/
mkinitramfs -o initrd.img-2.6.20 2.6.20

Then I add the following grub entry in /boot/grub/menu.lst:
title Ubuntu, kernel 2.6.20
root (hd0,4)
kernel /boot/vmlinuz-2.6.20 root=/dev/sda5 ro quiet pci=nomsi
initrd /boot/initrd.img-2.6.20
quiet
savedefault
boot


Note: With kernel 2.6.17-10, I was using the acpi=force irqpoll kernel option, but the system hang when I used it with 2.6.20, do I remove it.

Then the hibernate and suspend work like a charm...

Enjoy,

Alexandre Hudon

 

VPN PPTP Howto Ubuntu 6.10 Edgy

Howto setup a VPN connection on Ubuntu 6.10 Edgy

Needed package:
apt-get install iptables
apt-get install openssl
apt-get install open-vpn
apt-get install pptp-linux
apt-get install pptpd

And for the configuration tools:
apt-get install kvpnc

Then I run kvpnc to configure my VPN

My connection type is PPTP

PPTP options:
Require MPPE
Get DNS from peer
Do not used BSD compression
Refuse EAP

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]