You are not logged in.

#1 2007-05-23 06:06:16

stmok
Member
From: Sydney, Australia
Registered: 2006-11-19
Posts: 72

Minor ThinkPad issues and some questions

What I'm using
IBM ThinkPad R40
Pentium-M 1.4Ghz (Banias)
Mobility Radeon 7500 with 32MB RAM
512MB RAM
Hitachi DVD-ROM/CD-burner combo
PCMICA Gigabit Ethernet card using Realtek r8139 chip (as the onboard one is broke)
Hitachi 40GB 4200rpm HDD

I don't use wireless.

How's Arch installed? (details)
I've used the "base" install CD of the recently released 2007.05 "Duke". I basically took all the default suggestions in regards to partitions (as I'm testing an install process that works best on this ThinkPad).

For the power saving bits:

I installed acpid, powernowd, and powersave.
As well, from the "unsupported" AUR: kpowersave (0.7.x one) and kima.

For the kernel, its the default one but recompiled with resume as one of the HOOKS. Other than that, no other changes were made.

In /etc/rc.conf,
for the MODULES section, I've added: speedstep_centrino and ibm_acpi
for the DAEMONS section, I've added: acpid, powernowd, and powersaved

In /etc/rc.local,
I added: echo enable,0xffff >/proc/acpi/ibm/hotkey

In /etc/modprobe.conf,
I added: options ibm_acpi experimental=1

For some reason the swap partition was never activated, so this is necessary: mkswap /dev/sda2
(Is that a bug in the 2007.05 release?)

For Suspend-to-Disk to work, I had to add the following in /boot/grub/menu.lst
On the line that starts with kernel, I added: resume=/dev/sda2

I got everything I needed to work. smile
(Everything that mattered to me)

This includes the ThinkPad Fn+keys (F3, F4, and F12), and the two grey keys for Forward and Back in KDE and Firefox. (ThinkPad owners will know these F19 and F20 key through xmodmap). Suspend-to-RAM and Suspend-to-Disk works. Dynamic CPU throttling works. Manually setting the CPU speed works as well (via kpowersave). Through kima KDE applet, I can view CPU speed, uptime and temp on the taskbar.

What's the problem? (and questions)
But not everything is perfect...

(1) When I do Suspend-to-Disk OR when I shutdown the system, the hard disk does NOT shutdown properly (like it was in Windows or my old install of Arch Linux). Instead of a normal cricket sound of the HDD head parking, I get the same sound as if I pushed the power button (no battery installed) while its on. A high-pitched shutdown. sad

This results in Arch booting up occasionally with a message about HDD not properly shutting down and needing to force a check. This is obviously bad from a data integrity and HDD perspective.

Has anyone else experienced this? How did you resolve this issue?

(2) Once I finished testing Suspend-to-RAM, I check dmesg. I get some lines referring to a problem with the USB ports:
hub 1-0:1.0: over-current change on Port 3
(happens on Port 1 and 4 as well).

Anybody have an idea what its complaining about? Should I ignore it?
(I don't have any USB devices plugged in)

Other questions?
(3) I previous installed Arch Linux 0.72 with hibernate-script and the kernel26beyond kernel without the two issues as noted previously. Since the "Beyond" kernel is no longer being maintained, Is it OK to use the recently released default kernel with hibernate-script? Will it work?

(4) If I use the hibernate-script approach to Suspend-to-RAM and Suspend-to-Disk, what applet or app does on use in KDE to allow you to set the desired speed or power scheme? (I like how kpowersave does things, but that reads off powersave)


As you can see, I almost have my Thinkpad working the way I want it with Arch Linux. There's just a few niggles that need to be resolved. I hope you can help. Thanks in advance. smile


The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. -Eric S. Raymond

Offline

#2 2007-05-23 09:19:07

Sigi
Member
From: Thurgau, Switzerland
Registered: 2005-09-22
Posts: 1,131

Re: Minor ThinkPad issues and some questions

Some suggestions:
- I'd use kernel26suspend2 and the hibernate scripts
- I'd change resume=/dev/sda2 to resume2=swap:/dev/sda2 in /boot/grub/menu.lst
- Slightly OT: Have you installed hdaps(d) and thinkfinger-svn (in AUR)? Or where fingerprint scanners and HD protection not yet built into thinkpads back in the days of the R40? wink


Haven't been here in a while. Still rocking Arch. smile

Offline

#3 2007-05-23 23:08:43

stmok
Member
From: Sydney, Australia
Registered: 2006-11-19
Posts: 72

Re: Minor ThinkPad issues and some questions

Sigi wrote:

Some suggestions:
- I'd use kernel26suspend2 and the hibernate scripts

My HDD issue is because the system shuts down BEFORE the HDD can be safely put to idle (park). This behaviour doesn't change as long as I keep using the default kernel. (doesn't make a difference if I use it with hibernate-scripts).

So, you're right in suggesting I should use the suspend2 kernel.

Sigi wrote:

- I'd change resume=/dev/sda2 to resume2=swap:/dev/sda2 in /boot/grub/menu.lst

Yeah, I did that with the old install of Arch using "Beyond" kernel.

Sigi wrote:

- Slightly OT: Have you installed hdaps(d) and thinkfinger-svn (in AUR)? Or where fingerprint scanners and HD protection not yet built into thinkpads back in the days of the R40? wink

The fingerprint scanner and HDD protection wasn't in the R40.

They started introducing the HDD protection from R51 and onwards.
For the fingerprint scanner, that came in for the R-series as of R52.


Do you know if powersave can use suspend2 kernel features?


The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. -Eric S. Raymond

Offline

#4 2007-05-23 23:24:48

slackhack
Member
Registered: 2004-06-30
Posts: 738

Re: Minor ThinkPad issues and some questions

how did you get navkeys working? i've always added the keycodes to ~/.Xmodmap and then installed a firefox xpi, but the extension doesn't work for >1.5 and isn't being maintained anymore. the firefox browser.jar file you used to be able to edit doesn't seem to exist anymore, either. mad 

also, is there synpatic touchpad support in arch? i got used to being able to scroll with the side of the touchpad, would like to get that back again.  ( >> edit: d'oh! n/m, i was searching the repos for ksynaptics and qsynaptics. tongue )

i just do Fn + F4 to suspend -- not sure what it suspends to (ram?), but it didn't require a kernel recompile. i haven't noticed any problems with that, fwiw.

Last edited by slackhack (2007-05-23 23:29:05)

Offline

#5 2007-05-24 13:06:46

damjan
Member
Registered: 2006-05-30
Posts: 451

Re: Minor ThinkPad issues and some questions

There's a more recent keyconfig extension that works with Fx-2.0 .. you'll have to search it, I don't have the url handy.

Fn-F4 does suspend to ram ... and generally it's not a problem, except it still drains your battery a bit.. so if you leave your laptop suspended to ram it might get completelly empty and you loose your work (as if you suddenly pull the battery out while working).

Offline

#6 2007-05-25 01:39:03

stmok
Member
From: Sydney, Australia
Registered: 2006-11-19
Posts: 72

Re: Minor ThinkPad issues and some questions

slackhack wrote:

how did you get navkeys working? i've always added the keycodes to ~/.Xmodmap and then installed a firefox xpi, but the extension doesn't work for >1.5 and isn't being maintained anymore. the firefox browser.jar file you used to be able to edit doesn't seem to exist anymore, either. mad

In my .Xmodmap, I entered:

keycode 234 = F19
keycode 233 = F20

(Which is the typical thing for ThinkPads with the grey Nav Keys).

Then in KDE, change the keyboard shortcuts for navigation. Forward and Back are designated for XF86Forward and XF86Back by default. Re-designate them to F19 for Back and F20 for Forward. (This allows the Nav Keys to work on Konqueror browser. So you can use these keys to go forward and back while navigating through files!)

For Firefox, browser.jar is still there. You're just not looking in the right directory.
Its not that hard to find, its in /opt/mozilla/lib/firefox-2.0.0.3/chrome for the current version of Firefox.
Just uncompress the jar file, edit browser.xul, and then recompress it back.


Here's something interesting...I used acpid, powernowd, powersave/kpowersave, kernel26suspend2, hibernate-script. And guess what? IT ALL WORKS!

Using kpowersave in KDE, I can:

(1) Manually adjust the speed setting (Powersave, Dynamic, Performance)
(2) Adjust the power scheme.
(3) Suspend-to-RAM (via powersave)
(4) Suspend-to-Disk (via hibernate-script + kernel26suspend2)

I actually changed hibernate-script to using Suspend-to-RAM with Suspend-to-Disk as backup. The suspend2 project refers this as "RediSafe-like functionality". The hard disk now shuts down and suspends smoothly. smile

And then in kima, I can see:
(1) Temps
(2) Uptime
(3) CPU Speed
...on my taskbar in KDE.


Now my only problem is that, when I resume back from Suspend-to-RAM (via powersave) or Suspend-to-Disk (via hibernate scripts), I lose the functionality of the Fn+F3,F4,F12 keys! sad

If I resolve this, I will finally have solved ALL my problems! big_smile

Should I just use .Xmodmap for those Fn key combos? OR is there a better solution?


The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. -Eric S. Raymond

Offline

#7 2007-05-25 02:07:55

slackhack
Member
Registered: 2004-06-30
Posts: 738

Re: Minor ThinkPad issues and some questions

thanks, you were right, i was looking in the wrong location. navkeys work now - life is complete! big_smile

i used acpid and powernowd, too, works great. i use xfce4 instead of kde, and the xfce4 panel plugins work for cpu and battery monitoring. i like gkrellm though, and that has a plugin for cpu freq as well as standard support for temps. 

wish i could help with the Fn keys/suspend problem but i have no idea. i used to have a problem in slackware with losing ethernet and not being able to get it back after suspend, and i just wrote a little script to turn it off first before suspending and then reinitializing it on wake. could never find out what was causing it, though. sad

Last edited by slackhack (2007-05-25 02:09:36)

Offline

#8 2007-05-25 07:34:21

Sigi
Member
From: Thurgau, Switzerland
Registered: 2005-09-22
Posts: 1,131

Re: Minor ThinkPad issues and some questions

stmok wrote:

Now my only problem is that, when I resume back from Suspend-to-RAM (via powersave) or Suspend-to-Disk (via hibernate scripts), I lose the functionality of the Fn+F3,F4,F12 keys! sad

Isn't there an option in /etc/hibernate/common.conf to solve exactly this issue? I'm sorry I can't provide more info right now. (I'm not working at my system atm)


Haven't been here in a while. Still rocking Arch. smile

Offline

#9 2007-05-26 07:36:55

albe
Member
Registered: 2007-01-01
Posts: 12

Re: Minor ThinkPad issues and some questions

@stmok:

Hi,
this might be a newbie question (since I'm a newbie concerning laptops...), but... why do you use both powernowd and powersaved? If I understand correctly, powersaved already includes the cpu frequency scaling funcionality, so isn't powernowd redundant?

I also have another question regarding hard disk shutdown: I've got a Thinkpad T42 and I have the same problem described in the first post - "high pitched" hard disk shutdown. In another post you write you solved it using the suspend2 "redisafe-like" functionality. I'm not interested in setting up and using suspend2 and hibernate scripts right now... do you know if there is another way to properly shut down the hard disk? (By the way, I get the same behaviour when I shut down from Ubuntu too.)

Offline

#10 2007-05-27 13:23:27

albe
Member
Registered: 2007-01-01
Posts: 12

Re: Minor ThinkPad issues and some questions

Ok, solution found, I patched the kernel as explained in this thread: http://bbs.archlinux.org/viewtopic.php?pid=249653

Offline

#11 2007-05-28 03:53:48

stmok
Member
From: Sydney, Australia
Registered: 2006-11-19
Posts: 72

Re: Minor ThinkPad issues and some questions

albe wrote:

@stmok:

Hi,
this might be a newbie question (since I'm a newbie concerning laptops...), but... why do you use both powernowd and powersaved? If I understand correctly, powersaved already includes the cpu frequency scaling funcionality, so isn't powernowd redundant?

Because I'm screwing around, trying to find the best combo. smile The install on this ThinkPad isn't permanent, but to explore the possible paths one can take and the issues one will encounter. So yes, I agree with you that its redundant and unnecessary. wink


albe wrote:

I also have another question regarding hard disk shutdown: I've got a Thinkpad T42 and I have the same problem described in the first post - "high pitched" hard disk shutdown. In another post you write you solved it using the suspend2 "redisafe-like" functionality. I'm not interested in setting up and using suspend2 and hibernate scripts right now... do you know if there is another way to properly shut down the hard disk? (By the way, I get the same behaviour when I shut down from Ubuntu too.)


Ok, solution found, I patched the kernel as explained in this thread: http://bbs.archlinux.org/viewtopic.php?pid=249653

Well, I'm glad I'm not the only one suffering this issue. And that's a great find! I'll take a look at it.

I do agree on your view about not needing suspend2. It provides more convenience to have the default kernel do all we need to do. (Easier from a maintenance perspective, for both user and developer to have things unified).

Do you know if Arch Linux's current Kernel (regular one) has this patched? I think we're on 2.6.21.3-1
Or should we wait for 2.6.22 release? (The patch for this HDD issue is in 2.6.22rc1, according to the kernel changelog)


The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. -Eric S. Raymond

Offline

#12 2007-05-28 05:54:29

albe
Member
Registered: 2007-01-01
Posts: 12

Re: Minor ThinkPad issues and some questions

Do you know if Arch Linux's current Kernel (regular one) has this patched? I think we're on 2.6.21.3-1
Or should we wait for 2.6.22 release? (The patch for this HDD issue is in 2.6.22rc1, according to the kernel changelog)

I think the current arch kernel doesn't contain this patch...grepping for "stop_on_shutdown" on stock /var/abs/kernels/kernel26 directory returns nothing.

Offline

#13 2007-05-30 03:48:53

stmok
Member
From: Sydney, Australia
Registered: 2006-11-19
Posts: 72

Re: Minor ThinkPad issues and some questions

Well, I tried both approaches: Kernel with Suspend2 and the regular Kernel (2.6.21.3-1)

Both suffer the same HDD issue, but under slightly different scenarios.

They both will get the problem when you suspend to disk (call it STD from now on). But if you enable "RediSafe-like" function on the Suspend2 side, the HDD problem doesn't occur. It shuts down perfectly. However, when I resume back from STD, I lose all IBM button functionality. sad When I go to shutdown, the HDD problem appears.

With the regular Kernel, the HDD shutdown issue happens regardless if I STD or shutdown the system.

Either way, I'll disable STD use for now. At least until Arch's regular kernel and Suspend2 one moves to 2.6.22 Kernel. So it IS a Kernel related issue.


Here's how I did the Fn keys for my ThinkPad R40 (Pentium-M 1.4Ghz with Mobility Radeon 7500)

In /etc/acpi/events, I created the following files with their respective contents using Suspend2 for STD.
Please note: I don't have wireless on this notebook, that's why you won't see a Fn-F5 one.


Fn-F3  (Turn off and on display backlight. or Blank screen)
event=ibm/hotkey HKEY 00000080 00001003
action=/etc/acpi/events/backlight.sh

backlight.sh (You will need radeontool from the AUR. Be sure to make this executable. ie: chmod +x backlight.sh)
#!/bin/bash

if [ -e /tmp/backlightoff ]
then
        radeontool light on
        rm /tmp/backlightoff
else
        radeontool light off
        touch /tmp/backlightoff
fi

Press Fn-F3 to blank screen. Press Fn-F3 again to get out of it. smile

Fn-F4 (Suspend to RAM)
event=ibm/hotkey HKEY 00000080 00001004
action=echo -n mem >/sys/power/state


Fn-F7 (Switches between VGA and your notebook's display. I haven't tested this, but its what I got form the ibm_acpi README!)
event=ibm/hotkey HKEY 00000080 00001007
action=echo video_switch > /proc/acpi/ibm/video


Fn-F12 (Need sudo and add your user into the wheel as well as an entry into /etc/sudoers.)
event=ibm/hotkey HKEY 00000080 0000100c
action=sudo hibernate


lid (Causes same function as Fn-F4. That is, Suspend to RAM)
event=button/lid
action=echo -n mem >/sys/power/state

As mention the problem with the above, is once I resume from STD with Suspend2 Kernel, I lose their functionality.
Maybe I should be changing handler.sh in /etc/acpi instead of adding stuff to events?


The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. -Eric S. Raymond

Offline

#14 2007-05-30 14:17:35

stmok
Member
From: Sydney, Australia
Registered: 2006-11-19
Posts: 72

Re: Minor ThinkPad issues and some questions

Well, I just tried the following combo.

Regular Kernel with the libata patch (already implemented in 2.6.22rc1), acpid, powersave and kpowersave with Kima handling speed, uptime and temp display.

albe's suggested to remedy the HDD improper shutdown didn't work for me. sad

In the mean time, I'll stick to Suspend-to-RAM.

BTW, this combo allows me to use the Fn keys without manually specifying it like I did above. wink


The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. -Eric S. Raymond

Offline

#15 2007-06-01 06:29:51

albe
Member
Registered: 2007-01-01
Posts: 12

Re: Minor ThinkPad issues and some questions

Maybe you'll have more luck with the new arch kernel (2.6.21.3-2), which already contains the shutdown patch...

Offline

#16 2007-06-01 07:57:26

stmok
Member
From: Sydney, Australia
Registered: 2006-11-19
Posts: 72

Re: Minor ThinkPad issues and some questions

albe wrote:

Maybe you'll have more luck with the new arch kernel (2.6.21.3-2), which already contains the shutdown patch...

Yeah, I reported it as a Kernel bug, (as no one else did), and Tobias (tpowa) got it fixed quick smart! wink

I'll test it now, to see how it all goes.


The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. -Eric S. Raymond

Offline

#17 2007-06-02 03:55:22

stmok
Member
From: Sydney, Australia
Registered: 2006-11-19
Posts: 72

Re: Minor ThinkPad issues and some questions

Looks like it didn't work for suspend to disk. Shutdown seems OK now.

I'll disable STD then. I don't really have a use for it any way. smile


The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. -Eric S. Raymond

Offline

Board footer

Powered by FluxBB