Difference between revisions of "Dell Inspiron 8500"
m (→To do)
|Line 47:||Line 47:|
Revision as of 23:50, 26 July 2005
- 1 Intro
- 2 Installation
- 3 Kernel
- 4 X.org
- 5 Power Management
- 6 Software Suspend 2 (Hibernate) and Sleep
- 7 Links
I didn't even finished the text, so don't follow exactly whats here, only inspire yourself until I'm finished. ArchLinux is my best experience so far with linux on this computer, even if its a laptop! I've tryed Mandrake 10, 10.1, Suse 9.2, Gentoo 2004.3 and Fedora Core 2 and 3. I really like the KISS philosophy!
- Clean up new wiki. MediaWiki is great but has break all the layout... Need to clean this mess!
- Make swsusp2 work
- Clean up of acpi/cpufreq with the governor chooser
- ACPI daemon and events
- Better kernel configuration display
- Intel Pentium 4-M @ 2.2 Ghz
- 15.4" WUXGA display at 1920x1200 @ 32 bit colour
- NVidia GeForce4 Go 4200 64mb
- Broadcom 4400 100/10 NIC
- 512mb RAM (2 x 256 Mb
- 60gig IDE disk
- Removable DVD/CD/CD-RW
- Removable & USB pluggable floppy
- Firewire & USB 2.0 support
- Inbuilt 56k Modem
- Single PCMCIA
- Onboard i810 soundcard
- Mini-PCI slot
- Dell TrueMobile 1300 (Mini PCI
- Ethernet: Broadcom chip, use b44 module
- Wireless: Dell TrueMobile 1300 ndiswrapper
- Audio: ac97 (?)
- Display: 1920x1200
- nVidia Geforce4 4200 Go (64 Mb)
Unknown / Untested
To do xorg.conf
I suggest you read Gentoo Power Management Guide for great information. After some work on this I wanted to add some information specific to the I8500.
CPU Frequency Scaling
For this to work, verify that your kernel has those options. Note that those options are avaible in the v188.8.131.52 kernel and may not be avaible on older kernels (it is the case of the \"ondemand\" governor). <verbatim> CPU Frequency Scaling --->
* CPU Frequency scaling Default CPUFreq governor (userspace) <*> 'performance' governor <*> 'powersave' governor <*> 'ondemand' cpufreq policy governor <M> CPU frequency table helpers <M> ACPI Processor P-States driver <M> Intel Enhanced SpeedStep * Use ACPI tables to decode valid frequency/voltage pairs * Built-in tables for Banias CPUs <M> Intel Speedstep on ICH-M chipsets (ioport interface) <M> Intel SpeedStep on 440BX/ZX/MX chipsets (SMI interface) <M> Intel Pentium 4 clock modulation
</verbatim> It is a good habit to compile modules instead of built-in since if something doesn't work, you can just unload the module. Note that if you compile the \"ondemand\", \"perfomance\" or other governors as modules, you will need to load them (\"modprobe cpufreqperformance\", \"modprobe cpufreqpowersave\", etc.) or add them to the module loading of your /etc/rc.conf
As the Gentoo Power Management Guide explain, you can use tree (3) governor for cpu frequency scaling: +powersave This governor will set the frequency to the lowest avaible, eating less electricity as possible +perfomance This governor will set the frequency to the highest avaible, making speed the priority over battery life or heat +userspace This governor will let the user set the frequency manually. This can be usefull if you want to have complete control over the frequency or if you want a specific program control this. +ondemand This governor will let the kernel decide what frequency to use. When the cpu speed is needed, it will put it at max speed, and when it is idle, it will set it to the lowest speed avaible. This is the most usefull governor.
I had problems making my CPU use the ondemand governor. I've read multiple guides on the web speaking of cpufreqd, cpudyn, modules, etc. Here's what I've done to make work my Pentium 4-M 2.2 Ghz
I wasn't able to make the \"Intel Speedstep on ICH-M\" (speedstep-ich) module work completly. I was able to use the userspace, perfomance and powersave governor but not the ondemand, wich I wanted. So be sure this module is not loaded.
The important module to load to use the \"ondemand\" governor on this laptop is the \"ACPI Processor P-States driver\" (acpi_cpufreq) module. So be sure to add it to your /etc/rc.conf file in the module section: <verbatim> MODULES=(!usbserial !ide-scsi snd-intel8x0 snd-pcm-oss i8k \ !speedstep-ich acpi_cpufreq !usblp) </verbatim> Remember that modules that begin with a \"!\" wont be load. So with this MODULES line the speedstep-ich, ide-scsi, usbserial and usblp modules wont be load.
Now you need to load the ondemand governor.
Software Suspend 2 (Hibernate) and Sleep
I've managed to make the laptop go into hibernation using the [|http://www.suspend2.net/HOWTO Software Suspend 2||http://www.suspend2.net/] patch. Many people consider this patch as more stable than Software Suspend already included in the kernel but the downside is you need to patch the kernel, wich isn't a big deal anyway. BE ADVISED that using (any) software suspend may break your partition AND your data! Please see |http://www.suspend2.net/HOWTO-4.html#ss4.4's section on Software Suspend 2 How To. If you don't use multiple kernels you should be fine.
Software Suspend 2 is a patch against the kernel v2.6.11. If you are using a kernel from http://www.kernel.org (called \"vanilla\" because it is original) than you shouldn't have problem patching it. If you use the \"kernel26\" package, installed with pacman, then the patch could fail since some patches have been already applied. You could use Custom Kernel compilation with ABS (2.6.9 and later) for patching and installing your new patched kernel. I am using a modified PKGBUILD to build a kernel package patched with swsusp2
As of may 16 2005, the latest swsusp2 patch is v2.1.8 for kernel v2.6.11 (I'm using kernel v184.108.40.206).
To apply the patch, you need to open a terminal window, cd into the directory where you have your kernel source, and type this command: <verbatim> > <directory of the extracted patch>/apply <directory of the extracted patch> </verbatim> So if you extracted the patches to /home/me/swsusp2 and you have your kernel sources in /home/me/kernelsources the it will give: <verbatim> > cd /home/me/kernelsources > /home/me/swsusp2/apply /home/me/swsusp2 </verbatim>
It should patch correctly.
Now you need to configure the kernel. Here's the important section: <verbatim> * Power Management support [[ ]] Power Management Debug Support
Software Suspend 2 ---> <*> Software Suspend 2 --- Image Storage (you need at least one writer) <*> Swap Writer --- Page Transformers <*> LZF image compression (Preferred) --- User Interface Options <*> Text mode console support --- General Options (swap:/dev/hda2) Default resume device name [[ ]] Allow Keep Image Mode * Warn if possibility of filesystem corruption --- Debugging * Compile in debugging output [[ ]] Possibly Broken Developer options
</verbatim> Compile, then copy to /boot. Now edit your /boot/grub/menu.lst and add a new section for the new kernel: <verbatim> title Arch Linux v220.127.116.11 (pkg swsusp2 c1)
root (hd0,0) kernel /kernel-18.104.22.168-swsusp2-c1 root
/dev/discs/disc0/part3 ro devfsnomount resume2=swap:/dev/hda2
</verbatim> The important thing is the \"resume2=swap:/dev/hda2\" option, witch tell the kernel where to get the image to resume.
Since you compiled a new kernel, the modules you'd compile will not work anymore. You will need to build them again. On kernel upgrade, I need to update ndiswrapper and nvidia, so be sure to have those near.
Reboot in the new kernel.
Now install hibernate-script. A PKGBUILD can be found [[|http://bbs.archlinux.org/viewtopic.php?t=7797 here]].
Almost done. Edit /etc/hibernate/hibernate.conf and adjust to your needs. Here is mine: <verbatim>
- Example hibernate.conf file. Adapt to your own tastes.
- Options are not case sensitive.
- Run \"hibernate -h\" for help on the configuration items.
- Choose your Suspend method. You currently have 3 choices:
- suspend2 Software Suspend 2 (requires kernel patches from
- sysfspowerstate Uses /sys/power/state to suspend (activates pmdisk
- on kernels < 2.6.8, or vanilla swsusp otherwise).
- acpi_sleep Uses /proc/acpi/sleep to activate swsusp, or other
- ACPI sleep state supported by your machine.
- suspend2 (for Software Suspend 2)
UseSuspend2 yes Reboot no EnableEscape yes DefaultConsoleLevel 1
- ImageSizeLimit 200
- useful for initrd usage:
- SuspendDevice swap:/dev/hda2
- LoadSuspendModules suspendswap suspendlzf suspend_text
- UnloadSuspendModulesAfterResume yes
- Powerdown method - 3 for suspend-to-RAM, 4 for ACPI S4 sleep, 5 for poweroff
- PowerdownMethod 5
- If you experience hangs on resume due to write caching, try this:
- AsyncIOLimit 128
- Any other /proc/software_suspend setting can be set like so:
- ProcSetting expectedlzfcompression 50
- Or traditionally like this:
- Suspend2AllSettings 0 0 2056 65535 5
- Or even from the results of hibernate --save-settings with this:
- Suspend2AllSettingsFile /etc/hibernate/suspend-settings.conf
- For filewriter:
- FilewriterLocation /suspend_file 1000
- VerifyFilewriterResume2 yes
- To use /sys/power/state to suspend your machine (which may offer
- suspend-to-RAM, suspend-to-disk, standby, etc) comment out all the options
- above for Software Suspend 2, below for acpi_sleep, and uncomment this line.
- You may replace mem with any one of the states from \"cat /sys/power/state\"
- UseSysfsPowerState mem
- PowerdownMethod shutdown
- To use ACPI to suspend your machine (via /proc/acpi/sleep), comment out
- all the options above for Software Suspend 2 and sysfs, and uncomment this
- line. The number refers to the ACPI sleep state - 3 is suspend-to-RAM and
- 4 is suspend-to-disk.
- UseACPISleep 4
- Some global settings
Verbosity 2 LogFile /var/log/hibernate.log LogVerbosity 4
- AlwaysForce yes
- AlwaysKill yes
- HibernateVT 15
- Distribution debian (not required - autodetection should work)
- XDisplay :0
- Scriptlets provide support for doing all sorts of things before and after
- suspending. The defaults settings here should work for most people, but
- you may wish to edit these to taste. Consult \"hibernate -h\" for help on
- the configuration settings.
- If you use bootsplash, also enabling SwitchToTextMode is recommended if
- you use X, otherwise you may end up with a garbled X display.
- Bootsplash on
- BootsplashConfig /etc/bootsplash/default/config/bootsplash-1024x768.cfg
- IncompatibleDevices /dev/dsp /dev/video*
- DisableWriteCacheOn /dev/hda
- fbsplash (enable SwitchToTextMode if you use this)
- FBSplash on
- FBSplashTheme suspend2
- Unmount /nfsshare /windows /mnt/sambaserver
- UnmountFSTypes smbfs nfs
- UnmountGraceTime 1
- Mount /windows
- ChangeGrubMenu yes
- GrubMenuFile /boot/grub/menu.lst
- AlternateGrubMenuFile /boot/grub/menu-suspended.lst
- BackupGrubMenuFile /boot/grub/menu.lst.hibernate.bak
- IbmAcpi yes
- RadeonTool yes
- EnsureLILOResumes yes
- lock (generally you only want one of the following options)
- LockConsoleAs root
- LockXScreenSaver yes
- LockKDE yes
- OnSuspend 20 echo \"Good night!\"
- OnResume 20 echo \"Good morning!\"
- This is not required. It will only shutdown nicely the screen
OnSuspend 51 xscreensaver-command -activate OnSuspend 50 /usr/X11R6/bin/xset -display :0 dpms force off OnSuspend 51 xscreensaver-command -dactivate OnSuspend 50 /usr/X11R6/bin/xset -display :0 dpms force on OnSuspend 49 xscreensaver-command -dactivate
- UnloadModules snd_via82cxxx usb-ohci
- UnloadAllModules yes
UnloadBlacklistedModules yes LoadModules auto
- LoadModulesFromFile /etc/modules
- GentooModulesAutoload yes
- DownInterfaces eth0
- UpInterfaces auto
- IncompatiblePrograms xmms
- RestartServices postfix
- StopServices alsasound
- StartServices aumix
RestartServices wireless network
- EnableVbetool yes
- RestoreVbeStateFrom /var/lib/vbetool/vbestate
- VbetoolPost yes
- UseDummyXServer yes
- This can be set to gnome, kde or x:
XStatus kde XSuspendText Preparation a la mise en veille prolongee... XResumeText Sortie de la mise en veille prolongee...
- When using XStatus x, and you have xosd installed:
- XosdSettings --font -misc-fixed-medium-r-semicondensed---120---c--- --colour=Green --shadow 1 --pos bottom --align center --offset 50
</verbatim> hibernate-script is really nice because it can automaticaly unload bad modules, restart services, etc. The important part is: <verbatim> RestartServices wireless network </verbatim> ndiswrapper, witch is used on my DI8500, is a \"module to be ban\" so the network will need to be restarted after resume. Also: <verbatim> SwitchToTextMode yes </verbatim> This will prevent X locking...