Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to get extra functional keys to work?
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
m_gustafsson
Apprentice
Apprentice


Joined: 18 Mar 2007
Posts: 243
Location: Sweden

PostPosted: Wed Dec 03, 2008 10:32 pm    Post subject: Reply with quote

Yes, those are the brightness keys.
I have the THINKPAD_ACPI_VIDEO enabled, but not ACPI_VIDEO:
Code:
# gunzip -c  /proc/config.gz | grep VIDEO
# CONFIG_ACPI_VIDEO is not set
CONFIG_THINKPAD_ACPI_VIDEO=y
# CONFIG_IEEE1394_VIDEO1394 is not set
# CONFIG_VIDEO_DEV is not set
# CONFIG_VIDEO_MEDIA is not set
CONFIG_VIDEO_OUTPUT_CONTROL=m
CONFIG_VIDEO_SELECT=y

Should I try with ACPI_VIDEO as well?
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Wed Dec 03, 2008 11:29 pm    Post subject: Reply with quote

m_gustafsson wrote:
Yes, those are the brightness keys.
I have the THINKPAD_ACPI_VIDEO enabled, but not ACPI_VIDEO:
Code:
# gunzip -c  /proc/config.gz | grep VIDEO
# CONFIG_ACPI_VIDEO is not set
CONFIG_THINKPAD_ACPI_VIDEO=y
# CONFIG_IEEE1394_VIDEO1394 is not set
# CONFIG_VIDEO_DEV is not set
# CONFIG_VIDEO_MEDIA is not set
CONFIG_VIDEO_OUTPUT_CONTROL=m
CONFIG_VIDEO_SELECT=y


Should I try with ACPI_VIDEO as well?


You should, and you can disable THINKPAD_ACPI_VIDEO.
If both are compiled, THINKPAD_ACPI_VIDEO will be disabled on boot anyway, with a note in dmesg that ACPI_VIDEO is much prefered.
Even kernel config help says that VIDEO support in THINKPAD_ACPI often does not work and one should use ACPI_VIDEO if at all possible.

You should also check that
CONFIG_LCD_CLASS_DEVICE=m
CONFIG_BACKLIGHT_CLASS_DEVICE=y

are enabled (but ACPI_VIDEO option will not even appear without them)
Back to top
View user's profile Send private message
m_gustafsson
Apprentice
Apprentice


Joined: 18 Mar 2007
Posts: 243
Location: Sweden

PostPosted: Thu Dec 04, 2008 7:43 am    Post subject: Reply with quote

Quote:
You should, and you can disable THINKPAD_ACPI_VIDEO.
If both are compiled, THINKPAD_ACPI_VIDEO will be disabled on boot anyway, with a note in dmesg that ACPI_VIDEO is much prefered.
Even kernel config help says that VIDEO support in THINKPAD_ACPI often does not work and one should use ACPI_VIDEO if at all possible.

You should also check that
CONFIG_LCD_CLASS_DEVICE=m
CONFIG_BACKLIGHT_CLASS_DEVICE=y

are enabled (but ACPI_VIDEO option will not even appear without them)

I changed my kernel, and now it looks like:
Code:
# CONFIG_THINKPAD_ACPI_VIDEO is not set
CONFIG_ACPI_VIDEO=m
CONFIG_LCD_CLASS_DEVICE=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y

Don't know if it matters that I missed to change CONFIG_LCD_CLASS_DEVICE to a module?
Anyway, now acpi_listen reacts to the brightness keys, but I also noticed that the key mappings now differ quite much from before. This is what I see now (nothing on the other keys):
Code:
F4 button/sleep SLPB 00000080 00000004
F5 nothing but it affects the Bluetooth led
F7 video VID 00000080 00000000
End video LCD0 00000087 00000000
Home video LCD0 00000086 00000000

While previous I saw (like described in an earlier post by muebi):
Code:
F1 ibm/hotkey HKEY 00000080 00001001
F2 ibm/hotkey HKEY 00000080 00001002
F3 ibm/hotkey HKEY 00000080 00001003
F4 ibm/hotkey HKEY 00000080 00001004
F5 ibm/hotkey HKEY 00000080 00001005
F6 ibm/hotkey HKEY 00000080 00001006
F7 ibm/hotkey HKEY 00000080 00001007
F8 ibm/hotkey HKEY 00000080 00001008
F9 ibm/hotkey HKEY 00000080 00001009
F10 nothing
F11 ibm/hotkey HKEY 00000080 0000100b
F12 ibm/hotkey HKEY 00000080 0000100c
F Home nothing
F End nothing

I guess that this change does not matter, as I just have to adjust in the scripts for those new values.
Brightness adjustments does not work, but I guess that is due to that my brightness file, used in /etc/acpi/video.sh is located in a different place than the path used in the script:
Code:
# find / -iname brightness
/proc/acpi/video/VID1/CRT0/brightness
/proc/acpi/video/VID1/LCD0/brightness
/proc/acpi/video/VID/CRT0/brightness
/proc/acpi/video/VID/LCD0/brightness
/sys/class/backlight/acpi_video0/brightness
/sys/class/backlight/acpi_video1/brightness
/sys/class/leds/mmc0/brightnes

I will try them out to see if anyone of them might work.
And by the way, "hibernate" now works :D
When trying "hibernate-ram" I think I see the same problem as muebi, it goes to sleep but cannot be brought up again. Then it just stops with a black screen and the moon led flashing.

Many thanks for your support :D I will try not to interrupt your discussion again, sorry for this.
Back to top
View user's profile Send private message
muebi
Guru
Guru


Joined: 07 Nov 2008
Posts: 312

PostPosted: Thu Dec 04, 2008 10:03 pm    Post subject: Reply with quote

m_gustafsson,

yes, I have the same problem with hibernate-ram than you. It's good that I am not the only one with this problem. Maybe we can solve this problem together.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Thu Dec 04, 2008 10:10 pm    Post subject: Reply with quote

m_gustafsson wrote:
Quote:
You should, and you can disable THINKPAD_ACPI_VIDEO.
If both are compiled, THINKPAD_ACPI_VIDEO will be disabled on boot anyway, with a note in dmesg that ACPI_VIDEO is much prefered.
Even kernel config help says that VIDEO support in THINKPAD_ACPI often does not work and one should use ACPI_VIDEO if at all possible.

You should also check that
CONFIG_LCD_CLASS_DEVICE=m
CONFIG_BACKLIGHT_CLASS_DEVICE=y

are enabled (but ACPI_VIDEO option will not even appear without them)

I changed my kernel, and now it looks like:
Code:
# CONFIG_THINKPAD_ACPI_VIDEO is not set
CONFIG_ACPI_VIDEO=m
CONFIG_LCD_CLASS_DEVICE=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y

Don't know if it matters that I missed to change CONFIG_LCD_CLASS_DEVICE to a module?
Anyway, now acpi_listen reacts to the brightness keys, but I also noticed that the key mappings now differ quite much from before. This is what I see now (nothing on the other keys):
Code:
F4 button/sleep SLPB 00000080 00000004
F5 nothing but it affects the Bluetooth led
F7 video VID 00000080 00000000
End video LCD0 00000087 00000000
Home video LCD0 00000086 00000000

While previous I saw (like described in an earlier post by muebi):
Code:
F1 ibm/hotkey HKEY 00000080 00001001
F2 ibm/hotkey HKEY 00000080 00001002
F3 ibm/hotkey HKEY 00000080 00001003
F4 ibm/hotkey HKEY 00000080 00001004
F5 ibm/hotkey HKEY 00000080 00001005
F6 ibm/hotkey HKEY 00000080 00001006
F7 ibm/hotkey HKEY 00000080 00001007
F8 ibm/hotkey HKEY 00000080 00001008
F9 ibm/hotkey HKEY 00000080 00001009
F10 nothing
F11 ibm/hotkey HKEY 00000080 0000100b
F12 ibm/hotkey HKEY 00000080 0000100c
F Home nothing
F End nothing

I guess that this change does not matter, as I just have to adjust in the scripts for those new values.
Brightness adjustments does not work, but I guess that is due to that my brightness file, used in /etc/acpi/video.sh is located in a different place than the path used in the script:
Code:
# find / -iname brightness
/proc/acpi/video/VID1/CRT0/brightness
/proc/acpi/video/VID1/LCD0/brightness
/proc/acpi/video/VID/CRT0/brightness
/proc/acpi/video/VID/LCD0/brightness
/sys/class/backlight/acpi_video0/brightness
/sys/class/backlight/acpi_video1/brightness
/sys/class/leds/mmc0/brightnes

I will try them out to see if anyone of them might work.
And by the way, "hibernate" now works :D
When trying "hibernate-ram" I think I see the same problem as muebi, it goes to sleep but cannot be brought up again. Then it just stops with a black screen and the moon led flashing.

Many thanks for your support :D I will try not to interrupt your discussion again, sorry for this.



Well, you have disabled ALL thinkpad_acpi (or have not loaded it). You should have disabled only VIDEO option of THINKPAD_ACPI module.

Moon led flashing means it is suspended, you should press power button to bring it back (but not for too long so as not to power down the machine)
Back to top
View user's profile Send private message
m_gustafsson
Apprentice
Apprentice


Joined: 18 Mar 2007
Posts: 243
Location: Sweden

PostPosted: Fri Dec 05, 2008 8:01 am    Post subject: Reply with quote

muebi wrote:
Quote:
yes, I have the same problem with hibernate-ram than you. It's good that I am not the only one with this problem. Maybe we can solve this problem together.

Good idea :D

dmpogo wrote:
Quote:
Well, you have disabled ALL thinkpad_acpi (or have not loaded it). You should have disabled only VIDEO option of THINKPAD_ACPI module.

Ok, I think that I am a bit confused about modules etc. Anyway, I added thinkpad_acpi and thinkpad into /etc/modules.autoload.d/kernel-2.6.
Now the function keys seem to be there again:
Code:
$ acpi_listen
ibm/hotkey HKEY 00000080 00001001
ibm/hotkey HKEY 00000080 00001002
ibm/hotkey HKEY 00000080 00001003
ibm/hotkey HKEY 00000080 00001004
ibm/hotkey HKEY 00000080 00001005
ibm/hotkey HKEY 00000080 00001006
ibm/hotkey HKEY 00000080 00001007
ibm/hotkey HKEY 00000080 00001008
ibm/hotkey HKEY 00000080 00001009
ibm/hotkey HKEY 00000080 0000100b
ibm/hotkey HKEY 00000080 0000100c
video LCD0 00000086 00000000
ibm/hotkey HKEY 00000080 00005010
video LCD0 00000087 00000000
ibm/hotkey HKEY 00000080 00005010

FN+Home and FN+End now generates two printouts, e.g. for FN+Home I get video LCD0 00000086 00000000
and ibm/hotkey HKEY 00000080 00005010.
I then tried:
Code:
# hibernate-ram

The computer then stops, with the "moon" lit (not flashing).
When pressing the power button it starts but hangs with black screen and the moon flashing.
Code:
# cat /var/log/hibernate.log
...
Starting suspend at Fri Dec 5 08:29:40 CET 2008
hibernate-ram: [01] Executing CheckLastResume ...
hibernate-ram: [01] Executing CheckRunlevel ...
hibernate-ram: [01] Executing LockFileGet ...
hibernate-ram: [01] Executing NewKernelFileCheck ...
hibernate-ram: [10] Executing EnsureSysfsPowerStateCapable ...
hibernate-ram: [11] Executing XHacksSuspendHook1 ...
hibernate-ram: [12] Executing IbmAcpiStartSuspend ...
hibernate-ram: [20] Executing MiscLaunchAuxFunc1 ...
Executing echo "Good night!"...
Good night!
hibernate-ram: [20] Executing MiscLaunchAuxFunc3 ...
Executing echo "Good night!"...
Good night!
hibernate-ram: [59] Executing RemountXFSBootRO ...
hibernate-ram: [61] Executing NMSuspend ...
hibernate-ram: [89] Executing SaveKernelModprobe ...
hibernate-ram: [91] Executing LockGnomeScreensaver ...
hibernate-ram: [91] Executing ModulesUnloadBlacklist ...
hibernate-ram: [91] Executing ModulesUnloadBlacklist ...
hibernate-ram: [95] Executing XHacksSuspendHook2 ...
hibernate-ram: [98] Executing CheckRunlevel ...
hibernate-ram: [99] Executing DoSysfsPowerStateSuspend ...
hibernate-ram: Activating sysfs power state mem ...

When trying hibernate the computer hangs with black screen and moon flashing.
Code:
# hibernate

Code:
# cat /var/log/hibernate.log
...
Starting suspend at Fri Dec 5 08:36:16 CET 2008
hibernate: [01] Executing CheckLastResume ...
hibernate: [01] Executing CheckRunlevel ...
hibernate: [01] Executing LockFileGet ...
hibernate: [01] Executing NewKernelFileCheck ...
hibernate: [10] Executing EnsureSysfsPowerStateCapable ...
hibernate: [11] Executing XHacksSuspendHook1 ...
hibernate: [12] Executing IbmAcpiStartSuspend ...
hibernate: [20] Executing MiscLaunchAuxFunc1 ...
Executing echo "Good night!"...
Good night!
hibernate: [20] Executing MiscLaunchAuxFunc3 ...
Executing echo "Good night!"...
Good night!
hibernate: [59] Executing RemountXFSBootRO ...
hibernate: [61] Executing NMSuspend ...
hibernate: [89] Executing SaveKernelModprobe ...
hibernate: [91] Executing LockGnomeScreensaver ...
hibernate: [91] Executing ModulesUnloadBlacklist ...
hibernate: [91] Executing ModulesUnloadBlacklist ...
hibernate: [95] Executing XHacksSuspendHook2 ...
hibernate: [98] Executing CheckRunlevel ...
hibernate: [99] Executing DoSysfsPowerStateSuspend ...
hibernate: Activating sysfs power state disk ...

I tried to tweak some of the settings in /etc/hibernate/common.conf, but with no success.
Code:
# cat /etc/hibernate/common.conf
# Configuration options common for suspending to disk or RAM.
# Options are not case sensitive.
#
# See hibernate.conf(5) for help on the configuration items.

##############################################################################
### Some global settings
##############################################################################

Verbosity 0
LogFile /var/log/hibernate.log
LogVerbosity 1
# LogTimestamp yes
# AlwaysForce yes
# AlwaysKill yes
# HibernateVT 15
Distribution gentoo
# XDisplay :0

##############################################################################
### Scriptlets
###   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.
##############################################################################

### bootsplash
## 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

### clock
SaveClock restore-only

### devices
# IncompatibleDevices /dev/dsp /dev/video*

### diskcache
# DisableWriteCacheOn /dev/hda

### fbsplash (enable SwitchToTextMode if you use this)
# FBSplash on
# FBSplashTheme suspend2

### filesystems
# Unmount /nfsshare /windows /mnt/sambaserver
# UnmountFSTypes smbfs nfs
# UnmountGraceTime 1
# Mount /windows

### grub
# ChangeGrubMenu yes
# GrubMenuFile /boot/grub/menu.lst
# AlternateGrubMenuFile /boot/grub/menu-suspended.lst
# BackupGrubMenuFile /boot/grub/menu.lst.hibernate.bak

# see http://bugs.debian.org/317479
# RemountXFSBoot yes

### hardware_tweaks
IbmAcpi yes
# RadeonTool yes
# Runi915resolution yes
# FullSpeedCPU yes

### lilo
# EnsureLILOResumes yes

### lock (generally you only want one of the following options)
## For console you need vlock available.
## For x you need xscreensaver-command-command available.
## For gnome you need gnome-screensaver-command available.
## For kde you need dcop, kscreensaver available.
## For XAuto you need xautolock available.
## For Xtr you need xtrlock available.
# LockConsoleAs root
# LockXScreenSaver yes
LockGnomeScreenSaver yes
# LockKDE yes
# LockXLock yes
# LockXAutoLock yes
# LockXtrLock yes

### misclaunch
OnSuspend 20 echo "Good night!"
OnResume 20 echo "Good morning!"

### modules
# UnloadModules snd_via82cxxx usb-ohci
# UnloadAllModules yes
UnloadBlacklistedModules yes
LoadModules auto
# LoadModulesFromFile /etc/modules

### modules-gentoo
GentooModulesAutoload yes

### network
#DownInterfaces eth0
#DownInterfaces eth1
#UpInterfaces auto

### networkmanager
EnableNMReconnect yes

### pause_audio
# MuteAudio yes
# PauseAudio yes

### pcmcia
# EjectCards yes

### programs
# IncompatiblePrograms xmms

### services
# RestartServices laptop_mode anacron
# StopServices alsasound
# StartServices aumix

### vbetool
# EnableVbetool yes
# RestoreVbeStateFrom /var/lib/vbetool/vbestate
# VbetoolPost yes
# RestoreVCSAData yes

### xhacks
SwitchToTextMode yes
# UseDummyXServer yes
# DummyXServerConfig xorg-dummy.conf

### xstatus
## This can be set to gnome, kde or x:
## For gnome you need zenity available.
## For kde you need dcop, kstart, kdialog available.
## For x you need to have xosd OR xmessage available.
# XStatus gnome
# XmessageDisable yes
# XSuspendText Preparing to suspend...
# XResumeText Resuming from suspend...
## 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

### xbacklight
# BackLight yes

### gaim
## You need to have dbus, gaim_remote available.
# LogoutGaim yes
# GaimRestoreStatus yes
# GaimLogoutMessage Hibernating
# GaimLoginMessage Back from hibernation
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Fri Dec 05, 2008 4:33 pm    Post subject: Reply with quote

Typically, if the hibernate does not work, it is the question of some harware sybsytem hanging. The solution is usually to compile the drivers for these subsystems as modules and instruct the hibernate script to unload those modules before the hibernation and, perhaps, load them
back on resume.

Classical modules that sometimes do not hibernate well are usb (ehci_hcd, uhci_hcd/ohci_hcd), perhaps bluetooth, wifi and wired network,
and sometimes video driver (if there is a kernel module associtate with it, like for nvidia).

hibenrate script has a rather extensive infrastructure to do that

Code:

### modules
# UnloadModules snd_via82cxxx usb-ohci
# UnloadAllModules yes
UnloadBlacklistedModules yes
LoadModules auto
# LoadModulesFromFile /etc/modules


here you have

UnloadBlacklistedModules - there is a whole file with the list of modules known to cause troubles within specified range of kernels.
look into blacklist file to see what is there
UnloadModules - list of modules you want to unload, in the order of their unload. I have ehci_hcd and uhci_hcd here
LoadModulesAuto - load back on resume the modules that were unloaded on suspend

On my thinkpad X300 I found that bluetooth did not hibernate too well if radio active before suspend and ehci_hcd was giving the problems. I am contemplaiting including iwlagn (it used to be on blacklist) but it does not affect resume for me, just the wireless itself is
sometimes (1 out of 10 times) stuck on resume.

There is possibility that wired network e1000(e) can cause trouble


But the first step is to ensure that these subsystems are compiled as modules. Only then you have freedom to play with them
Then you can instruct the hibernate to unload all of them (you can start even with UnloadAllModules yes) and if that makes suspend work, narrow down which exactly is giving a problem and trim your list. (It is better at the end not to unload modules unnecessary, since it takes time, and may not bring the system exactly to original state)


The other possble problems stem from X windows. I don't have them, but I'm using intel embedded graphics which does not require
special kernel module. I heard about problems with nvidia and ati proprietary drivers. Include them into module unload list.
X own problems is usually cured by enabling switch to VT console before hibernation (in the script). But these can be easily check
just attempting hibernate from the VT console.


hibernate script also have infrastructure to stop services on hibernate. I actually do stop both net.wlan0 and net.eth0
(this is how I resolved some issues I had with wired ethernet), but on resume I automatically bring back only net.eth0
(In general I try not to bring back wlan0 automatically whether on boot or on resume - only when I know I need wireless)


Last edited by dmpogo on Fri Dec 05, 2008 5:26 pm; edited 1 time in total
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Fri Dec 05, 2008 5:01 pm    Post subject: Reply with quote

Quote:

The computer then stops, with the "moon" lit (not flashing).
When pressing the power button it starts but hangs with black screen and the moon flashing


You know what, I wonder if your power button is mapped to 'suspend' rather than to 'power-off'.
Check your BIOS settings.
Back to top
View user's profile Send private message
m_gustafsson
Apprentice
Apprentice


Joined: 18 Mar 2007
Posts: 243
Location: Sweden

PostPosted: Fri Dec 05, 2008 5:12 pm    Post subject: Reply with quote

Thanks for your efforts :D
I have read through your answers and will take a look at them once I finish work :?
One short question though...
You said:
Quote:
You know what, I wonder if your power button is mapped to 'suspend' rather than to 'power-off'.
Check your BIOS settings.

I have not checked my BIOS yet, but I was just thinking of the setting in Gnome, i.e. in System->Preferences->Power management.
Does the settings on the general tab matter in this case? I have "When the power button is pressed" set to "Ask me"...
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Fri Dec 05, 2008 5:34 pm    Post subject: Reply with quote

m_gustafsson wrote:
Thanks for your efforts :D
I have read through your answers and will take a look at them once I finish work :?
One short question though...
You said:
Quote:
You know what, I wonder if your power button is mapped to 'suspend' rather than to 'power-off'.
Check your BIOS settings.

I have not checked my BIOS yet, but I was just thinking of the setting in Gnome, i.e. in System->Preferences->Power management.
Does the settings on the general tab matter in this case? I have "When the power button is pressed" set to "Ask me"...


It is a pure specultation on my part. What made me think is that solid and flashing moon signify two different states of the system.
I don't have manual nor my laptop handy - but it would be good if checked what they are. Perhaps suspend/standby ?
So there is something that puts the system into another state. It is either someting in resume process, or your manual input,
the only which was pressing the button. Could it have send a conflicting signal besides wakeup ?

I would not think if gnome settings had time to kick in when you have not even got your screen, since it probably just captures
ACPI event from power button, but who knows (maybe it comes before the screen or backlight is not getting up by some other reason) ? So my first guess was the BIOS level, and BIOSes usually do have this option to choose power button behaviour.

When I press a power button for resume, I get white led on the button lid, some flashing of other lights. Do you get it before the moon gets into blinking mode ?
Back to top
View user's profile Send private message
m_gustafsson
Apprentice
Apprentice


Joined: 18 Mar 2007
Posts: 243
Location: Sweden

PostPosted: Fri Dec 05, 2008 6:57 pm    Post subject: Reply with quote

When I press the power button after hibernate-ram (the moon is lit) the power on, and battery button is lit and the moon starts blinking.
There is no setting in my BIOS for the power button. I have a Thinkpad X60s (at least I did not find it).
The manual says that when the moon is lit the computer is in standby mode and when the moon is blinking the computer is entering standby mode or hibernation mode, or is resuming normal operation.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Fri Dec 05, 2008 7:35 pm    Post subject: Reply with quote

m_gustafsson wrote:
When I press the power button after hibernate-ram (the moon is lit) the power on, and battery button is lit and the moon starts blinking.
There is no setting in my BIOS for the power button. I have a Thinkpad X60s (at least I did not find it).
The manual says that when the moon is lit the computer is in standby mode and when the moon is blinking the computer is entering standby mode or hibernation mode, or is resuming normal operation.


Ah, so it is never resumes. Back to module story
Back to top
View user's profile Send private message
m_gustafsson
Apprentice
Apprentice


Joined: 18 Mar 2007
Posts: 243
Location: Sweden

PostPosted: Sat Dec 06, 2008 9:39 am    Post subject: Reply with quote

Unfortunately I will not be home this weekend, so I will have to wait till Monday before I can do any tests with modules.
Maybe muebi can continue Saturday and Sunday :)
Back to top
View user's profile Send private message
m_gustafsson
Apprentice
Apprentice


Joined: 18 Mar 2007
Posts: 243
Location: Sweden

PostPosted: Wed Dec 10, 2008 9:36 pm    Post subject: Reply with quote

I walked through the modules listed among the blacklisted to find the ones I had compiled into my kernel and moved them to modules.
The only one that I found was "forcedeth".
After recompiling my kernel it looks like hibernate works, but hibernate-ram is still not ok.
Anyway, I think this is good enough for me... :)
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6656
Location: The soundosphere

PostPosted: Thu Dec 11, 2008 3:40 pm    Post subject: Reply with quote

I don't have a Thinkpad but I emerged some thinkpad-specific stuff on a Dell when trying to get some MM buttons working.

app-laptop/thinkpad and such, I think. Maybe that will help. And maybe kmilo.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Fri Dec 12, 2008 9:26 am    Post subject: Reply with quote

m_gustafsson wrote:
I walked through the modules listed among the blacklisted to find the ones I had compiled into my kernel and moved them to modules.
The only one that I found was "forcedeth".
After recompiling my kernel it looks like hibernate works, but hibernate-ram is still not ok.
Anyway, I think this is good enough for me... :)


Let me come back from a trip and we'll have a look
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Mon Dec 15, 2008 8:10 am    Post subject: Reply with quote

I see there is a new 2.6.27 kernel with 'fix regression with suspend/resume' in ChangeLog
Back to top
View user's profile Send private message
m_gustafsson
Apprentice
Apprentice


Joined: 18 Mar 2007
Posts: 243
Location: Sweden

PostPosted: Mon Dec 15, 2008 9:19 am    Post subject: Reply with quote

Ok, then that will maybe solve my problems.
I am running Gentoo-sources and will wait until the 2.6.27 is considered stable before I update (using 2.6.26-r3 today).
I know that I am a bit of a coward, but I am using this computer in my daily work at office...
Back to top
View user's profile Send private message
muebi
Guru
Guru


Joined: 07 Nov 2008
Posts: 312

PostPosted: Tue Jan 27, 2009 11:21 pm    Post subject: Reply with quote

Hi,
I wondered if anybody succeeded with the Fn+F7 buttons in order to use an external monitor. At the moment I can't use mine and I guess it may because nothing is happening with Fn+F7 so far. Can anybody provide me with a working script or advice how to set things up?
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Wed Jan 28, 2009 5:17 am    Post subject: Reply with quote

muebi wrote:
Hi,
I wondered if anybody succeeded with the Fn+F7 buttons in order to use an external monitor. At the moment I can't use mine and I guess it may because nothing is happening with Fn+F7 so far. Can anybody provide me with a working script or advice how to set things up?


Yes, I have it working, but it still sometimes require manual play with resolution when using external projector (some of them require
to set external monitor resolution, I did not yet find way to do it automatically for arbitrary settings.

I have the followign script, which does the toggle
/usr/local/sbin/thinkpad-fn7

Code:

#!/bin/bash

# External output may be "VGA" or "VGA-0" or "DVI-0" or "TMDS-1"
EXTERNAL_OUTPUT="VGA"
INTERNAL_OUTPUT="LVDS"
EXTERNAL_LOCATION="left"
 
case "$EXTERNAL_LOCATION" in
     left|LEFT)
                EXTERNAL_LOCATION="--left-of $INTERNAL_OUTPUT"
               ;;
     right|RIGHT)
                EXTERNAL_LOCATION="--right-of $INTERNAL_OUTPUT"
               ;;
     top|TOP|above|ABOVE)
                EXTERNAL_LOCATION="--above $INTERNAL_OUTPUT"
               ;;
     bottom|BOTTOM|below|BELOW)
                EXTERNAL_LOCATION="--below $INTERNAL_OUTPUT"
               ;;
     *)
                EXTERNAL_LOCATION="--left-of $INTERNAL_OUTPUT"
               ;;
esac

# Figure out current state
INTERNAL_STATE=$($SU xrandr | grep ^$INTERNAL_OUTPUT | grep con | sed "s/.*connected //" | sed "s/(.*//")
EXTERNAL_STATE=$($SU xrandr | grep ^$EXTERNAL_OUTPUT | grep con | sed "s/.*connected //" | sed "s/(.*//")
 
if [ -z "$INTERNAL_STATE" ]; then
     STATE="external"
elif [ -z "$EXTERNAL_STATE" ]; then
     STATE="internal"
else
     INTERNAL_STATE=$(echo $INTERNAL_STATE | sed "s/[0-9]*x[0-9]*//")
     EXTERNAL_STATE=$(echo $EXTERNAL_STATE | sed "s/[0-9]*x[0-9]*//")
     if [ "$INTERNAL_STATE" = "$EXTERNAL_STATE" ]; then
           STATE="mirror"
     else
           STATE="both"
     fi
fi

function screen_external(){
       xrandr --output $INTERNAL_OUTPUT --off
       xrandr --output $EXTERNAL_OUTPUT --auto
}

function screen_internal(){
       xrandr --output $EXTERNAL_OUTPUT --off
       xrandr --output $INTERNAL_OUTPUT --auto
}

function screen_mirror(){
       xrandr --output $INTERNAL_OUTPUT --auto
#       xrandr --output $EXTERNAL_OUTPUT --auto --same-as $INTERNAL_OUTPUT
       xrandr --output $EXTERNAL_OUTPUT --auto
}

function screen_both(){
       xrandr --output $INTERNAL_OUTPUT --auto
       xrandr --output $EXTERNAL_OUTPUT --auto $EXTERNAL_LOCATION
}

function screen_toggle(){
       case "$STATE" in
             internal)
                     screen_mirror
                     ;;
               mirror)
                     screen_external
                     ;;
             external)
                     screen_internal
                     ;;
                 *)
                     screen_internal
                     ;;
        esac
}

# What should we do?
DO="$1"
if [ -z "$DO" ]; then
      if [ $(basename $0) = "thinkpad-fn-f7" ]; then
           DO="toggle"
      fi
fi
   
case "$DO" in
      toggle)
              screen_toggle
              ;;
    internal)
              screen_internal
              ;;
    external)
              screen_external
              ;;
      mirror)
         screen_mirror
         ;;
   both)
         screen_both
         ;;
      status)
              echo "Current Fn-F7 state is: $STATE"
              echo
              echo "Attached monitors:"
              xrandr | grep "\Wconnected" | sed "s/^/ /"
              ;;
        *)
              echo "usage: $0 <command>" >&2
              echo >&2
              echo "  commands:" >&2
              echo "          status" >&2
              echo "          internal" >&2
              echo "          external" >&2
              echo "          mirror" >&2
              echo "          both" >&2
              echo "          toggle" >&2
              echo >&2#!/bin/sh
              ;;
esac


which can be used as stand alone or from acpid script. My acpid script /etc/acpi/ibm.sh is
Code:

# Specific signal handling

THINKPAD_ACPI_DIR=/sys/devices/platform/thinkpad_acpi

X_USER=`who | sed -ne "s/^\([^[:space:]]*\)[[:space:]]*:0.*/\1/p"`
if [ -n "$X_USER" ]; then
   export DISPLAY=":0.0"
   export XAUTHORITY=/home/${X_USER}/.Xauthority
fi

function x_info () {
   if [ -n "$XAUTHORITY" ]; then
           echo $1 | osd_cat -d 3 -p bottom -A center -o -50 -s 2 -c $2 -f -adobe-courier-bold-r-normal--*-240-*-*-m-*-iso8859-1
        fi
}

case $4 in
   00001002)
           su $X_USER -c 'alock -bg shade:shade=20 -cursor theme:name=xtr -auth pam'
      ;;
   00001004)
      # Fn-F4 suspends to RAM (standard)
      # loaded thinkpad_acpi always captures Fn-F4, even masked 
      /usr/sbin/hibernate-ram
      ;;
   00001005)
      # Fn-F5 toggles bluetooth radio (standard)
      # On toggle auto loads driver (hotplug ??), off leaves it
      # Services are currently untouched
      if [ `cat ${THINKPAD_ACPI_DIR}/bluetooth_enable` == 1 ] ; then
         echo 0 > ${THINKPAD_ACPI_DIR}/bluetooth_enable
      elif [ `cat ${THINKPAD_ACPI_DIR}/hotkey_radio_sw` == 1 ] ; then
      # we enable radio only if "hard" switch is on
         echo 1 >  ${THINKPAD_ACPI_DIR}/bluetooth_enable
      fi
      ;;      
   00001006)
      # Fn-F6 starts-stops wireless services (NON-standard)
      # In my network config wlan stop comes with disabling radio
      status=`/etc/init.d/net.wlan0 status`
      status=${status#* status:}
      if   [ $status == started ] ; then
         /etc/init.d/net.wlan0 stop   
      elif [ $status == stopped ] ; then
           if [ `cat ${THINKPAD_ACPI_DIR}/hotkey_radio_sw` == 1 ] ; then
         /etc/init.d/net.wlan0 start   
           else
              x_info "Radio Kill Switch in the back is enabled" red
           fi
      elif [ $status == inactive ] ; then
           # This perhaps can arise if there are no AP's
           # this is why I do not restart automatically
           # May do it when understand wpa_supplicant better
           message="No AP's or WLAN may have hanged. Restart manually, perhaps reinserting iwlagn"
           x_info "$message" red
           logger "$message"
      fi
      ;;
   00001007)
      # Fn-F7 cycles through monitors (standard)
      /usr/local/sbin/thinkpad-fn-f7 toggle
      ;;
   00001008)
      # Fn-F8 switches touchpad on and off (standard)
      if synclient -l | grep -q TouchpadOff[^[:alnum:]]*0 ; then
         synclient TouchpadOff=1
         status="TouchPad OFF"
      else
         synclient TouchpadOff=0
         status="TouchPad ON"
      fi
      x_info "$status" green
      ;;
   0000100c)
      # Fn-F12 hibernates (standard)
      /usr/sbin/hibernate
      ;;
   00001014)
      # Fn-Space zoom application (standard)
           su $X_USER -c xmag
      ;;
   00007000)
      # Hard radio switch off (standard)
      if [ `cat  ${THINKPAD_ACPI_DIR}/hotkey_radio_sw` == 0 ] ; then
          status=`/etc/init.d/net.wlan0 status`
         status=${status#* status:}
         /etc/init.d/net.wlan0 stop   
         echo 0 >  ${THINKPAD_ACPI_DIR}/bluetooth_enable
      fi
      ;;
              ;;
esac
Back to top
View user's profile Send private message
muebi
Guru
Guru


Joined: 07 Nov 2008
Posts: 312

PostPosted: Wed Jan 28, 2009 10:20 pm    Post subject: Reply with quote

dmpogo,

I copied and pasted your Fn+F7 script and made it executable but still nothing happens...
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Wed Jan 28, 2009 11:29 pm    Post subject: Reply with quote

muebi wrote:
dmpogo,

I copied and pasted your Fn+F7 script and made it executable but still nothing happens...



what do you mean by 'nothing happens' ?
does it work if you call it by hand ? l

Code:

/usr/local/sbin/thinkpad-fn7 toggle


If it does, next you need to setup your acpid to call the script. In my case it is done by having /etc/acpi/ibm.sh which handles all Fn-F? keys
and having in /etc/acpi/events/ibm file with the following content

Code:

event=ibm/hotkey
action=/etc/acpi/ibm.sh %e
Back to top
View user's profile Send private message
muebi
Guru
Guru


Joined: 07 Nov 2008
Posts: 312

PostPosted: Thu Jan 29, 2009 12:49 am    Post subject: Reply with quote

dmpogo,

Unfortunately, it does not work if I run /usr/local/sbin/thinkpad-fn7 toggle by hand. :-(
Although the monitor cable is plugged I have the feeling that there is no communication between laptop and monitor at all...
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Thu Jan 29, 2009 3:18 am    Post subject: Reply with quote

muebi wrote:
dmpogo,

Unfortunately, it does not work if I run /usr/local/sbin/thinkpad-fn7 toggle by hand. :-(
Although the monitor cable is plugged I have the feeling that there is no communication between laptop and monitor at all...


what does simply running
Code:

xrandr


says ? (please post output)
I also forgot, what video drivers are you using ? Do they have xrandr extension (look into /var/log/xorg.log)
Back to top
View user's profile Send private message
muebi
Guru
Guru


Joined: 07 Nov 2008
Posts: 312

PostPosted: Thu Jan 29, 2009 5:25 pm    Post subject: Reply with quote

dmpogo,

here is the output from xrandr:

$ xrandr
Screen 0: minimum 1280 x 1024, current 1680 x 1050, maximum 1680 x 1050
default connected 1680x1050+0+0 0mm x 0mm
1680x1050 61.0*
1280x1024 61.0

I actually do not have a /var/log/xorg.log file. I only have /var/log/Xorg.0.log which did not contain any information regarding xrandr.
I found the following in my xorg.conf which may be helpful:

Section "Device"
Identifier "Card0"
Driver "vesa"
Option "NoLogo" "True"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Configured Monitor"
DefaultDepth 24
EndSection

I also have a ATI Mobility Radeon video card but I didn't manage to get it running so far...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum