VectorLinux
October 02, 2014, 08:22:55 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Laptop Migration  (Read 3965 times)
Sty
Packager
Vectorite
****
Posts: 114


« on: March 21, 2009, 01:12:21 am »

Well guys, I think I've finally found a way to merge over nearly completely to Vector on my laptop.  So, thanks to all the replies in my other topic.

I hope that I can consolidate any questions I have in this topic so that I don't hog a lot of forum space.  Right now, I need help with the following:
  • Link Menu to "Windows Key"
  • Link Log off to "Windows Key + L"
  • Close lid and go to a "sleep mode"
  • Use my Volume buttons (Lenovo Thinkpad T61)
  • "Power Modes" like when on battery power, run screen at lower brightness, less CPU speed, etc.
  • Add programs to "Alt+F2" such as Eclipse

That's it for right now, and I think I've seen some of those answered here before, I just gotta do some digging that I'll go after tomorrow.

Thanks in advance for all y'all's help! Cool
« Last Edit: March 21, 2009, 01:16:05 am by Sty » Logged

* Enterprise *
Running Vector Linux 5.9 Deluxe
|| Intel Core2Duo E6600 | 4 GB DDR2 RAM | ATi Radeon X1900XT ||
wcs
Packager
Vectorian
****
Posts: 1144


« Reply #1 on: March 21, 2009, 03:30:49 am »

Quote
# Close lid and go to a "sleep mode"

This is handled by a couple of different things.
First, put a "resume=/dev/sda2" in lilo's append line, replacing the device by your swap partition, then run lilo -v as root.

After reboot, try running "hibernate" and "hibernate -F /etc/hibernate/ram.conf" as root.

If everything works fine, you can call the hibernate command from the acpi daemon when the lid is closed.
Go to VasmCC > Hardware > HardwareSet and turn on acpi.
Scripts to execute commands go into /etc/acpi/events. I created a file called "lid" inside that directory.
My /etc/acpi/events/lid file, which does what you want:
Code:
event=button/lid.*
action=/usr/sbin/hibernate -F /etc/hibernate/ram.conf

It should work after you restart the acpid daemon.

Logged
wcs
Packager
Vectorian
****
Posts: 1144


« Reply #2 on: March 21, 2009, 03:40:05 am »

Quote
    * Link Menu to "Windows Key"
    * Link Log off to "Windows Key + L"
    * Use my Volume buttons (Lenovo Thinkpad T61)

There are also a couple of things to get keys working.
If keys are already being detected (and you're using xfce), you can just go to Settings > KeyboardSettings > Shortcuts and assign commands to key combinations.

If nothing shows up when you press the key, run "xev" and see what keycodes you get when they're pressed. Then those keycodes go into the .Xmodmap fiile in your home directory where they are asigned names for X to deal with. Logout and login, and then use the xfce keyboard shortcuts to map them to commands.

To give you an example, in my .Xmodmap, I assign the keycode 174 (returned by xev) to the name "XF86AudioRaiseVolume", and then in xfce shortcuts I have the command "amixer set Master 10%+ unmute" to run when that key is pressed.

(with the further complication that some keys weren't even being detected by xev, so something else had to be done, but ignore this for now)

Hope this helps!
Logged
wcs
Packager
Vectorian
****
Posts: 1144


« Reply #3 on: March 21, 2009, 03:47:58 am »

Quote
# "Power Modes" like when on battery power, run screen at lower brightness, less CPU speed, etc.

This stuff should also be dealt with by the acpid daemon... maybe there's an easier way, but I think the best is to create a file in /etc/acpi/events that will execute some command when it goes into battery.

The way I've done this is by having a /etc/acpi/events/cpu file that calls a custom script:
Code:
event=battery.*
action=/usr/local/bin/acpicpu

This acpicpu script will execute when the laptop goes into battery mode or AC mode, checks to see what state we're in, and executes some other commands. In my case, I've only looked at CPU freqs, and not brightness, but it's the same principle.

You can check this How-To to see what the script looks like for changing CPU freqs:
http://forum.vectorlinux.com/index.php?topic=8878.0

 I've used vcpufreq in that script, but it can also be done "directly" by changing the CPU governor.
Logged
lagagnon
Global Moderator
Vectorian
*****
Posts: 1922



WWW
« Reply #4 on: March 21, 2009, 11:53:47 am »

First of all we need to know what version of VL you are using and what window manager/desktop environment.
Logged

"As people become more intelligent they care less for preachers and more for teachers". Robert G. Ingersoll
Sty
Packager
Vectorite
****
Posts: 114


« Reply #5 on: March 21, 2009, 02:12:47 pm »

Whoops, sorry about that.  Vector Linux 6.0 Deluxe with XFCE from it.
Logged

* Enterprise *
Running Vector Linux 5.9 Deluxe
|| Intel Core2Duo E6600 | 4 GB DDR2 RAM | ATi Radeon X1900XT ||
toothandnail
Tester
Vectorian
****
Posts: 2527


« Reply #6 on: March 21, 2009, 03:14:52 pm »


  • Use my Volume buttons (Lenovo Thinkpad T61)

For setting special keys on Thinkpads, have a look here:

http://www.thinkwiki.org/wiki/How_to_get_special_keys_to_work

and here:

http://www.thinkwiki.org/wiki/Tpb

Smiley All you ever wanted to know about Thinkpads and Linux....

paul.
Logged
Sty
Packager
Vectorite
****
Posts: 114


« Reply #7 on: March 25, 2009, 07:42:01 pm »

Ok, still having trouble with the sleep deal.

I think part of it has to do with nVidia not stopping.  Advice?
Logged

* Enterprise *
Running Vector Linux 5.9 Deluxe
|| Intel Core2Duo E6600 | 4 GB DDR2 RAM | ATi Radeon X1900XT ||
Sty
Packager
Vectorite
****
Posts: 114


« Reply #8 on: March 29, 2009, 07:11:48 pm »

Ok, so still working on hibernate.

I have the hibernate command working just fine.  (Part of this involves not being compatible with latest nVidia proprietary driver, found a walkthrough but gotta get this all working before trying that).  Anyway.

When I type:
Code:
root:# hibernate
It shows some text shuts off and comes back to right were I left it.  Here's a log entry:
Quote
Starting suspend at Sun Mar 29 20:47:56 MDT 2009
hibernate: [01] Executing CheckLastResume ...
hibernate: [01] Executing CheckRunlevel ...
hibernate: [01] Executing LockFileGet ...
hibernate: [01] Executing NewKernelFileCheck ...
hibernate: [10] Executing EnsureSwsusp2Capable ...
hibernate: [11] Executing XHacksSuspendHook1 ...
hibernate: [59] Executing RemountXFSBootRO ...
hibernate: [89] Executing SaveKernelModprobe ...
hibernate: [91] Executing ModulesUnloadBlacklist ...
hibernate: [95] Executing XHacksSuspendHook2 ...
hibernate: [97] Executing ChangeToSwsuspVT ...
hibernate: [98] Executing CheckRunlevel ...
hibernate: [98] Executing FullSpeedCPUSuspend ...
hibernate: [98] Executing Swsusp2ConfigSet ...
hibernate: [99] Executing DoSwsusp2 ...
hibernate: Activating suspend ...
hibernate: [98] Executing FullSpeedCPUResume ...
hibernate: [97] Executing ChangeFromSwsuspVT ...
hibernate: [90] Executing ModulesLoad ...
hibernate: [89] Executing RestoreKernelModprobe ...
hibernate: [85] Executing XHacksResumeHook2 ...
hibernate: [70] Executing ClockRestore ...
hibernate: [59] Executing RemountXFSBootRW ...
hibernate: [11] Executing XHacksResumeHook1 ...
hibernate: [01] Executing NoteLastResume ...
hibernate: [01] Executing LockFilePut ...
Resumed at Sun Mar 29 20:50:05 MDT 2009

When I try for:
Code:
root:# hibernate -F /etc/hibernate/ram.conf
The screen goes dark, the system shuts down to sleep and I even get my little laptop "sleep light" to come on.

However, when I hit the power button to resume the system, I think it reboots instead.  Not sure why.  Here's the log from it:
Quote
Starting suspend at Sun Mar 29 20:34:38 MDT 2009
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 AcpiVideoFlagsSuspend ...
hibernate: [59] Executing RemountXFSBootRO ...
hibernate: [89] Executing SaveKernelModprobe ...
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 mem ...

So, anyone have any suggestions?

Vector Linux 6.0 Deluxe, XFCE, 4GB RAM, Lenovo T-61 Laptop.
Logged

* Enterprise *
Running Vector Linux 5.9 Deluxe
|| Intel Core2Duo E6600 | 4 GB DDR2 RAM | ATi Radeon X1900XT ||
M0E-lnx
Administrator
Vectorian
*****
Posts: 3181



« Reply #9 on: March 31, 2009, 09:05:25 am »

I found something in the wiki I normally follow for my hibernation needs.

http://wiki.archlinux.org/index.php/Suspend_to_Disk

Check out the "Nvidia specific settings" section.
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!