LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices

Reply
 
LinkBack Search this Thread
Old 09-04-2004, 05:59 AM   #1
systemparadox
Member
 
Registered: Jul 2004
Location: Tavistock, Devon, England
Distribution: Slackware 9.1, Mandrake 9.0/9.1/10.0, LFS 6.0, Knoppix 3.1/3.3
Posts: 73

Rep: Reputation: 15
Power Management- IBM Thinkpad T20


Hi,
I've been trying to get this working for several days now, but it's just one thing after another.
I have just managed to upgrade to kernel 2.6.6 (from 2.4.22- Slackware 9.1). The main reason for this was to get some sort of power management working. I will be back at school on the 8th of September and I need this working by then so any help would be greatly appreciated.

I need to be able to suspend, sleep and hibernate, via the Fn+F# buttons. I don't mind whether I use apm or acpi (by the agro i'm having with acpi I want to use apm, but I don't think apm has as much functionality), but it is highly likely that I will be buying a second battery and I will need to know the remaining percentage of each battery separately (i don't know if apm can do this).

I compiled the kernel with apm, acpi and swsuspend support. I also selected the option specifically for IBM thinkpads- from what I can remember, it's to stop it from freezing when it does something to do with power management (correct me if I'm wrong), but I think I have that problem anyway. By default, it only starts up apm. When it does, everything works fine and I can find out how much battery life I have left and whether I'm running on AC or battery power. The suspend button works (screen and sound off), and the sleep button will try to put it into sleep mode (suspend-to-RAM), but it just beeps at me before it gets very far. The hibernate button just beeps at me.

When I tell it to enable acpi (using acpi=force), it loads most things up ok, but for some reason there are a couple of errors (not directly related to power management) and the ethernet card is not loaded properly (it shows up in ifconfig, but I can't use it- this may be related to the freezing problem). The other (very annoying) problem is that every 10 seconds or so it freezes for a couple of seconds. None of the buttons (suspend, sleep, hibernate) do anything at all. I tried 'echo 1 > /proc/acpi/sleep' and it got into sleep mode (sort of), but gave some very strange fading color and blue lines on the screen, which didn't actually switch off. Also, the only thing that would wake it up was the power button (which seems very messed to me- the Fn key should work), and then my keyboard was completely messed up- pressing c would enter, and no other letter keys did anything. X was not running when I tried this.

I downloaded the hibernation script/utility for swsusp, but it just told me that the kernel did not support swsusp, despite the fact that I said yes to it in the kernel config. There are no kernel patches for 2.6.6 on the swsusp site- will the 2.6.7 or 2.6.8 patches work?

Thankyou in advance
Simon
 
Old 09-06-2004, 04:02 AM   #2
systemparadox
Member
 
Registered: Jul 2004
Location: Tavistock, Devon, England
Distribution: Slackware 9.1, Mandrake 9.0/9.1/10.0, LFS 6.0, Knoppix 3.1/3.3
Posts: 73

Original Poster
Rep: Reputation: 15
OK, I would still like to get acpi working, but I've managed to get it to suspend using apm. In order to get it to suspend, the yenta_socket module has to be unloaded. Also, the sound is dead when it wakes up. Unloading and reloading the sound module works, but when kde is running it says 'module in use'. Sooo...

1. Is there some way I can tell it to execute some commands before suspending? and some other commands when it wakes up?
2. How can I get kde to stop using the soundcard (prefferably on the command line so I can put it into the above)?

I still need help with the hibernation- it is essential!

Thankyou in advance
Simon
 
Old 09-27-2004, 10:39 AM   #3
systemparadox
Member
 
Registered: Jul 2004
Location: Tavistock, Devon, England
Distribution: Slackware 9.1, Mandrake 9.0/9.1/10.0, LFS 6.0, Knoppix 3.1/3.3
Posts: 73

Original Poster
Rep: Reputation: 15
Arrgghh- for goodness sake! I now have software suspend working, but when I am running off batteries the electronic noise is very loud. I have tried using /proc/cpufreq to slow the cpu down, but it makes little difference. I think acpi would help (+apm doesn't show dual batteries), but why on earth does my laptop hang every few seconds with it enabled? Also, the above two questions still stand:

1. Is there some way I can tell it to execute some commands before suspending? and some other commands when it wakes up?
2. How can I get kde to stop using the soundcard (prefferably on the command line so I can put it into the above)?

Thanks in advance
Simon
 
Old 10-01-2004, 09:36 AM   #4
tritonapc
LQ Newbie
 
Registered: Sep 2004
Posts: 18

Rep: Reputation: 0
I can't beleave anyone didn't respond sooner

Well I am willing to work on the problem. However I am still trying to get acpi working on my laptop (lol, I started this about five hours ago). I did find some great help in this tutorial here. http://johnleach.co.uk/documents/thinkpadx40/index.html
Lucky you, its for thinkpads.
See if that helps the biggest suggestion I have is to create a shell script (not really that hard) to execute commands prior to suspension. So for instance before running the sleep command you would have a script that does this.
This is called suspend.sh
Code:
#!/bin/bash
acpi_sleep=s3_bios
echo 3 > /proc/acpi/sleep
This is my current script, it gets the job done half assed, and today im going to try and figure out what its doing, since I just copied it, so I can spot the errors.

So that is what I have discovered so far. I can't say that I can help you but we can at least be sounding boards for our two problems.

Last edited by tritonapc; 10-01-2004 at 12:53 PM.
 
Old 10-01-2004, 10:14 AM   #5
tritonapc
LQ Newbie
 
Registered: Sep 2004
Posts: 18

Rep: Reputation: 0
Okay

Well I went back to the above tutorial and just put all of the suggested commands into the script. I then ran the script at runlevel 5 everything did its dance and shutdown. I then woke up the computer to the wonderful fractal display that is an acpi graphics suspend. I played with the keyboard a little and pushed ctl-alt-del until it eventually went into a soft boot. So this is an example of the problem with my suspension ... graphics.

Code:
#!/bin/bash
/sbin/rmmod ehci_hcd
/sbin/rmmod ipw2100
echo 3 > /proc/acpi/sleep
/sbin/modprobe ehci_hcd
/sbin/modprobe ipw2100
acpi_sleep=s3_bios
If someone could figure out what or where acpi_sleep does or is. This humble n00b would be much appreciative.

So not being satisfied of course I stared at the shell commands (its pretty low to not even be a script kiddie) and thought "Gee, what does that 3 mean? I looked around the web some more and found some random bit of insight that maybe that 3 had to do with the runlevel. So I switch to runlevel three and ran my script. However instead of fractal I get blackness. But the cool thing is that if I hit the up arrow and enter it went to sleep again. So it suspends nicely but I have a feeling that acpi_sleep=s3_bios is not executing (and I can't see the error because my screen has gone goth on me) or that I need another line to get my display back.
 
Old 10-01-2004, 12:14 PM   #6
tritonapc
LQ Newbie
 
Registered: Sep 2004
Posts: 18

Rep: Reputation: 0
This looks good for apm, it talks about X, sound and other problems.
http://tuxmobil.org/apm_linux.html
 
Old 10-01-2004, 05:51 PM   #7
TLV
Member
 
Registered: Jun 2004
Distribution: Ubuntu
Posts: 185

Rep: Reputation: 30
Folks over at the Linux-Thinkpad mailinglist are reporting success-stories with S3 suspend on ACPI using kernel 2.6.8.1 and a special ibm-acpi patch. Check their archives for September and August this year for more info. Here's one thread on the list.

/TLV
 
Old 02-16-2006, 03:47 PM   #8
systemparadox
Member
 
Registered: Jul 2004
Location: Tavistock, Devon, England
Distribution: Slackware 9.1, Mandrake 9.0/9.1/10.0, LFS 6.0, Knoppix 3.1/3.3
Posts: 73

Original Poster
Rep: Reputation: 15
Question

I've been using sleep/suspend (ACPI S3) on my T23 for a while now. It works well.
The problem is the framebuffer console.
Disable it and everything works fine (assuming you don't have my broken USB mini-hub plugged in).
X suspends very well, even with an old savage driver.

Don't know about T20 (sold it ages ago now), but I think that disabling the framebuffer will fix that too.

It's a bit annoying to only have a 640x480 console in the middle of my 1024x768 screen on boot, but it's worth it for a working suspend.

I've tried vesafb-tng, but it's no different to the standard vesafb driver- neither displays anything on resume.
I've tried savagefb, but for some reason my T23 won't even try to resume when suspended with that loaded.
Maybe if someone can figure out how to detach the VC's from the device to allow the module to be unloaded it might work.

(As an aside, Linus Torvalds thinks that having video drivers in the kernel is a bad idea- and even the framebuffer is causing enough problems).

I'm currently working on a crazy method of loading X really early on and running the kernel messages from there instead. If that works properly it will be even better than a framebuffer console.

Also, I have to unload and reload my soundcard driver after a resume or there is no sound. The problem is that I have to manually stop any programs that use sound first, then reload it, then start them again. Is there some way of telling the kernel to remove the module between suspending processes and suspending the machine and then reload it between resuming the machine and resuming the processes? Would that even work?


Simon
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tips on installing 9.1 Pro on an IBM ThinkPad t20 Metalbarthug Suse/Novell 4 10-21-2005 07:24 AM
Suse 9.2 and IBM Thinkpad T20 zulfi Linux - Laptop and Netbook 1 03-12-2005 09:58 PM
Speedstepping on IBM Thinkpad T20 won´t work atzalan Linux - Laptop and Netbook 0 11-23-2004 03:53 AM
Suse 9.1 thinkpad t20 help please!! FuriousGibbon Linux - Distributions 6 09-20-2004 05:30 PM
Ibm T20 tookey Linux - Hardware 1 03-31-2004 08:00 AM


All times are GMT -5. The time now is 06:25 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration