Unterschiede zwischen den Revisionen 1 und 2
Revision 1 vom 2006-04-08 15:22:27
Größe: 1085
Autor: lars
Kommentar: dri
Revision 2 vom 2006-04-08 16:13:30
Größe: 5189
Autor: lars
Kommentar: suspend2 added
Gelöschter Text ist auf diese Art markiert. Hinzugefügter Text ist auf diese Art markiert.
Zeile 27: Zeile 27:

== hibernate with suspend2 ==
[http://suspend2.net suspend2] is not yet part of the main kernel tree, so you will have to compile your own kernel. This is fairly easy with debian.

=== prepare initrd ===
You usually need to build an initrd-image, as the default debian kernel depends on a lot of modules - and you will surely need some of them to boot your system.

To detect a wake-up boot, you need to put the line ''echo >/proc/suspend2/do_resume'' into the ''linuxrc'' file of your initrd.

Of course, you could do this manually, but automation makes more fun (and is easier): {{{
apt-get install mkinitrd-tools
wget -o /etc/mkintrd/scripts/swsusp http://wiki.suspend2.net/DistroAndHardwareSetup/DebianInitrd?action=AttachFile&do=get&target=swsusp-initrd-text-for-all-versions-plain.txt
chmod +x /etc/mkinird/scripts/swsusp
}}}
This script will get used automatically during the kernel package building (see below).

If you compile the compression algorithm for [http://suspend2.net suspend2] as a module (and not statically), then you should add it to the initrd module list: {{{
echo "lzf" >>/etc/mkinitrd/modules
}}}

=== patch your kernel ====
Get the sources and install some helpful packages: {{{
apt-get install linux-source-2.6.15 kernel-package fakeroot libncurses5-dev
cd /usr/src
tar xjf linux-source-2.6.15
}}}

Get the [http://suspend2.net/downloads/all/ suspend2-patch] and apply it: {{{
wget http://suspend2.net/downloads/all/suspend2-2.2-rc16-for-2.6.15.1.tar.bz2
tar xjf suspend2-2.2-rc16-for-2.6.15.1.tar.bz2
cd linux-source-2.6.15
/usr/src/suspend2-2.2-rc16-for-2.6.15.1/apply

Reuse your current kernel configuration: {{{
zcat /proc/config.gz >.config
}}}

Now you can build a debian package for your kernel (as normal user): {{{
make-kpkg --initrd --rootcmd fakeroot kernel_image
}}}

You will get asked some questions regarding suspend2 - usually you should select ''Yes'' or at least ''Module''.

When the package building is finished, you should install your shiny new kernel: {{{
dpkg -i /usr/src/linux-image-2.6.15_2.6.15-10.00.Custom_i386.deb
}}}

Now it is the right time to reboot your box to test the new kernel.

=== suspending your machine ===
The ''hibernate'' package makes it quite easy to suspend your computer: {{{
apt-get install hibernate
}}}

Maybe all users should be allowed to suspend the computer? Change the following line according to your needs and add it to ''/etc/sudoers'' (obviously you need ''sudo'' for this): {{{
ALL ALL=(ALL)NOPASSWD: /usr/bin/hibernate
}}}

=== using thinkpad-buttons for suspend ===
I know, it is a quite clumsy way (acpi events should be more appropriate), but I only did it with ''tpb'': {{{
apt-get install tpb
}}}

Now you need to change two lines in your ''/etc/tpbrc'': {{{
NVRAM /dev/.static/dev/nvram
THINKPAD /usr/bin/sudo /usr/sbin/hibernate
}}}
(I know - the static nvram device setting is just a quick and dirty workaround for not having configured it via udev ...)

Now add tpb to the system boot, by storing the following script as ''/etc/init.d/tpb'': {{{
#!/bin/sh

case "$1" in
        start)
                tpb -d
                ;;
        stop)
                killall tpb
                ;;
        restart)
                "$0" stop
                "$0" start
                ;;
  esac
}}}

Now add it to your runlevels by issuing the following command: {{{
update-rc.d tpb defaults
}}}

I know - this way was not very convenient. If you care - just improve this howto by clicking on ''edit'' :)

=== internal modem ===
The output of {{{lspci -v}}} is (on my machine) the following: {{{
0000:02:02.0 Communication controller: Agere Systems WinModem 56k (rev 01)
        Subsystem: AMBIT Microsystem Corp. IBM ThinkPad T23 (2647-4MG)
        Flags: bus master, medium devsel, latency 0, IRQ 11
        Memory at c0201000 (32-bit, non-prefetchable) [size=256]
        I/O ports at 6440 [size=8]
        I/O ports at 6000 [size=256]
        Capabilities: [f8] Power Management version 2
}}}

TableOfContents


Introduction

I recently installed [http://debian.org Debian] on an IBM T23. This is not exactly spectacular, but I ran into some small problems, that I want to write down as a reference for others.

My problems were:

You will find (my) solutions for these problems below.

DRI

The installation of Debian (sid - April 02006) worked smoothly - the graphic card was detected and everything seemed to be fine.

Only the output of glxinfo was strange, as it reported direct rendering: No. But the xorg log file reported a successful activation of dri.

Then I tried the following:

export MESA_DEBUG=verbose
export LIBGL_DEBUG=verbose
glxinfo

It reported a missing savage_dri.so file. So I installed libgl1-mesa-dri (apt-get install libgl1-mesa-dri), which contains /usr/lib/dri/savage_dri.so. Then it worked (as far as glxinfo tells you).

hibernate with suspend2

[http://suspend2.net suspend2] is not yet part of the main kernel tree, so you will have to compile your own kernel. This is fairly easy with debian.

prepare initrd

You usually need to build an initrd-image, as the default debian kernel depends on a lot of modules - and you will surely need some of them to boot your system.

To detect a wake-up boot, you need to put the line echo >/proc/suspend2/do_resume into the linuxrc file of your initrd.

Of course, you could do this manually, but automation makes more fun (and is easier):

apt-get install mkinitrd-tools
wget -o /etc/mkintrd/scripts/swsusp http://wiki.suspend2.net/DistroAndHardwareSetup/DebianInitrd?action=AttachFile&do=get&target=swsusp-initrd-text-for-all-versions-plain.txt
chmod +x /etc/mkinird/scripts/swsusp

This script will get used automatically during the kernel package building (see below).

If you compile the compression algorithm for [http://suspend2.net suspend2] as a module (and not statically), then you should add it to the initrd module list:

echo "lzf" >>/etc/mkinitrd/modules

=== patch your kernel ==== Get the sources and install some helpful packages:

apt-get install linux-source-2.6.15 kernel-package fakeroot libncurses5-dev
cd /usr/src
tar xjf linux-source-2.6.15

Get the [http://suspend2.net/downloads/all/ suspend2-patch] and apply it:

wget http://suspend2.net/downloads/all/suspend2-2.2-rc16-for-2.6.15.1.tar.bz2
tar xjf suspend2-2.2-rc16-for-2.6.15.1.tar.bz2
cd linux-source-2.6.15
/usr/src/suspend2-2.2-rc16-for-2.6.15.1/apply

Reuse your current kernel configuration: {{{
zcat /proc/config.gz >.config

Now you can build a debian package for your kernel (as normal user):

make-kpkg --initrd --rootcmd fakeroot kernel_image

You will get asked some questions regarding suspend2 - usually you should select Yes or at least Module.

When the package building is finished, you should install your shiny new kernel:

dpkg -i /usr/src/linux-image-2.6.15_2.6.15-10.00.Custom_i386.deb

Now it is the right time to reboot your box to test the new kernel.

suspending your machine

The hibernate package makes it quite easy to suspend your computer:

apt-get install hibernate

Maybe all users should be allowed to suspend the computer? Change the following line according to your needs and add it to /etc/sudoers (obviously you need sudo for this):

ALL    ALL=(ALL)NOPASSWD: /usr/bin/hibernate

using thinkpad-buttons for suspend

I know, it is a quite clumsy way (acpi events should be more appropriate), but I only did it with tpb:

apt-get install tpb

Now you need to change two lines in your /etc/tpbrc:

NVRAM       /dev/.static/dev/nvram
THINKPAD    /usr/bin/sudo /usr/sbin/hibernate

(I know - the static nvram device setting is just a quick and dirty workaround for not having configured it via udev ...)

Now add tpb to the system boot, by storing the following script as /etc/init.d/tpb:

case "$1" in
        start)
                tpb -d
                ;;
        stop)
                killall tpb
                ;;
        restart)
                "$0" stop
                "$0" start
                ;;
  esac

Now add it to your runlevels by issuing the following command:

update-rc.d tpb defaults

I know - this way was not very convenient. If you care - just improve this howto by clicking on edit :)

internal modem

The output of lspci -v is (on my machine) the following:

0000:02:02.0 Communication controller: Agere Systems WinModem 56k (rev 01)
        Subsystem: AMBIT Microsystem Corp. IBM ThinkPad T23 (2647-4MG)
        Flags: bus master, medium devsel, latency 0, IRQ 11
        Memory at c0201000 (32-bit, non-prefetchable) [size=256]
        I/O ports at 6440 [size=8]
        I/O ports at 6000 [size=256]
        Capabilities: [f8] Power Management version 2

Debian_on_IBM_T23 (zuletzt geändert am 2012-06-13 21:26:22 durch anonym)


Creative Commons Lizenzvertrag
This page is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.