LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 04-25-2008, 01:32 PM   #1
diver
LQ Newbie
 
Registered: Apr 2008
Posts: 24

Rep: Reputation: 15
Fn button


Hi.
A use laptop Acer 5620
Slackware 12 -current

Anyone have idea how to get to work Fn button on laptop?
I mean Fn+brightness and Fn+sound volume...
 
Old 04-25-2008, 01:47 PM   #2
gmartin
Member
 
Registered: Mar 2003
Location: PA
Distribution: Slackware 13.37 Linux Reg # 341245
Posts: 285

Rep: Reputation: 40
Take a look at this blog post (Google is your friend). It is talking about a Dell, but offers a generic solution. It's near the bottom

http://intr.overt.org/blog/?page_id=56
 
Old 04-25-2008, 02:27 PM   #3
diver
LQ Newbie
 
Registered: Apr 2008
Posts: 24

Original Poster
Rep: Reputation: 15
Hi, gmartin

Thanks for help and for a new friend "Google".
I didn't know what to look for, not been lazy one ...

So i get :

you will need to use setkeycodes to do that.

usage: setkeycode scancode keycode ...
(where scancode is either xx or e0xx, given in hexadecimal,
and keycode is given in decimal)

* Fn -Down (e005) - Automatically decreases brightness and generates a key event.
* Fn -Up (e006) - Automatically increases brightness and generates a key event.

How i run it?

setkeycode e005 ???

Last edited by diver; 04-25-2008 at 02:29 PM.
 
Old 04-25-2008, 02:40 PM   #4
gmartin
Member
 
Registered: Mar 2003
Location: PA
Distribution: Slackware 13.37 Linux Reg # 341245
Posts: 285

Rep: Reputation: 40
Quote:
Originally Posted by diver View Post
Hi, gmartin

So i get :

you will need to use setkeycodes to do that.

usage: setkeycode scancode keycode ...
(where scancode is either xx or e0xx, given in hexadecimal,
and keycode is given in decimal)

* Fn -Down (e005) - Automatically decreases brightness and generates a key event.
* Fn -Up (e006) - Automatically increases brightness and generates a key event.

How i run it?

setkeycode e005 ???
Perhaps after you have it working from the command-line you could add it to /etc/rc.d/rc.local. That script get's executed at bootup
 
Old 04-25-2008, 03:28 PM   #5
diver
LQ Newbie
 
Registered: Apr 2008
Posts: 24

Original Poster
Rep: Reputation: 15
Still i don't get how to run it.
I used xev to find keycode

fn+IncBright keycode is 212
Fn-DecBright keycode is 101

so i run

setkeycodes e030 212
setkeycodes e02e 101

Nothing happens. The keys not functioning.
Am i missing something?
 
Old 04-25-2008, 10:46 PM   #6
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
What I do for the multimedia keys ...

find out the keycodes of the buttons ...and then edit my ~/.Xmodmap
(create if not present)

my ~/.Xmodmap is :
Quote:
keycode 174 = F20
keycode 176 = F21
keycode 160 = F22
keycode 144 = F23
keycode 160 = F24
keycode 153 = F25
keycode 162 = F26
Then in my KDE autostart , I have put
Quote:
$cat ~/.kde/Autostart/start.sh
#! /bin/bash
xmodmap ~/.Xmodmap
Now KDE can detect my multimedia keys. After that, I have to set the various shortcuts at different places ... I don't know where to set the change brightness shortcut in KDE sorry
 
Old 04-26-2008, 09:49 AM   #7
LordAnta
Member
 
Registered: Apr 2008
Location: Bucharest, Romania
Distribution: Slackware current
Posts: 126

Rep: Reputation: 17
On 3 different laptops (Asus, Benq, Acer) with different linux distros (Slackware, Debian, OpenSuse) i saw that you don't need to set the keycodes for Fn+BrightenessUP or Down. It's a call directly to the BIOS, it doesn't involve the kernel (for example try incresing and decreasing the brightness when you are at lilo or when it's booting, and you will se that the brightness changes). It doesn't show that progress bar like in Windows, but it does his job. Same thing is with Fn and the Displays (the button with LCD/CRT image or something like that - the trick is to install the video drivers with dual-head).

For the multimedia keys, it's a bit different story.
 
Old 04-26-2008, 12:49 PM   #8
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 34
Quote:
Originally Posted by diver View Post
A use laptop Acer 5620
Too vague - which series? Aspire, Extensa, TravelMate (or even Ferrari)?

Quote:
Originally Posted by lordanta
On 3 different laptops (Asus, Benq, Acer) with different linux distros (Slackware, Debian, OpenSuse) i saw that you don't need to set the keycodes for Fn+BrightenessUP or Down. It's a call directly to the BIOS, it doesn't involve the kernel
Depends on the Acer laptop. Yes, on older ones, this is the case (i.e. anything pre-2005 is guaranteed to just work). Post 2005 is a bit more hit-and-miss.

Quote:
Originally Posted by lordanta
Same thing is with Fn and the Displays
AFAIK, this hasn't been true on Acer laptops for at least four years now.

Quote:
Originally Posted by diver View Post
Anyone have idea how to get to work Fn button on laptop? I mean Fn+brightness and Fn+sound volume...
Sound is a matter of using the right X keymapping (evdev should work here, see further down).

From what you're saying, you probably have one of the newer Acer laptops that doesn't just work out-of-the-box for this, so you'll need either acer_acpi (an out-of-tree module, if using a pre 2.6.25 kernel) or acer-wmi (an in-tree driver as of 2.6.25) to tell the kernel how to control the backlight.

The next step for the backlight keys is to then get the scancodes mapped properly to the right keycodes (then I believe the kernel handles toggling the brightness). HAL takes care of this for many laptops already (and I've been adding the Acer ones like mad as I come across them). Chances are though, in 12.1 (whenever that comes out), this step will just be done for you. 12.0 might be a bit more hit-and-miss. Try the Fn+{Left, Right} keys and see if they produce any scancode messages in dmesg to tell if they're already mapped or not.

After that, the easiest way (and what I use) to get the keys working in X properly is to use evdev as your keyboard driver - once your keys are mapped properly, evdev does the necessary kernel-to-X translation and things just work (and yes, I really do use this on my own Acer).

Last edited by cathectic; 04-26-2008 at 12:50 PM.
 
Old 04-26-2008, 01:09 PM   #9
LordAnta
Member
 
Registered: Apr 2008
Location: Bucharest, Romania
Distribution: Slackware current
Posts: 126

Rep: Reputation: 17
@cathetic:
My Benq JoyBook A52 it's made in november 2007. The Acer I was talking about is bought in november 2007 (with a intel Core2Dou at 2Ghz and a NVidia 8600GT 512Mb, i don't think it is that old ). The Fn + Display I only tested on my Asus and Beng at presentations, but the first thing after easter I will try it on my roomates Acer cause you made me curios.
 
Old 04-26-2008, 02:00 PM   #10
roshaph
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware
Posts: 11

Rep: Reputation: 0
Quote:
Originally Posted by LordAnta View Post
On 3 different laptops (Asus, Benq, Acer) with different linux distros (Slackware, Debian, OpenSuse) i saw that you don't need to set the keycodes for Fn+BrightenessUP or Down. It's a call directly to the BIOS, it doesn't involve the kernel (for example try incresing and decreasing the brightness when you are at lilo or when it's booting, and you will se that the brightness changes). It doesn't show that progress bar like in Windows, but it does his job. Same thing is with Fn and the Displays (the button with LCD/CRT image or something like that - the trick is to install the video drivers with dual-head).

For the multimedia keys, it's a bit different story.
Totally agree with you, just don't get what you mean by "to install the video drivers with dual-head"? Because I have problems throwing pictures to the beamer, when its connected to my laptop.
 
Old 04-26-2008, 03:18 PM   #11
LordAnta
Member
 
Registered: Apr 2008
Location: Bucharest, Romania
Distribution: Slackware current
Posts: 126

Rep: Reputation: 17
On my Benq laptop I have an Ati Radeon Express 200M with 128Mb shared from RAM (don't throw rocks at me, i know about ati based video card and linux, but Compiz still works like a charm ). After the driver installation, i have to run:

Code:
 ./aticonfig --initial=dual-head
This writes in xorg.conf that i have 2 monitors (the laptops LCD and an external screen -- video projector, monitor, whatever) which can be used in the same time.
 
Old 04-27-2008, 10:33 AM   #12
grissiom
Member
 
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 423

Rep: Reputation: 45
Quote:
Originally Posted by duryodhan View Post
What I do for the multimedia keys ...

find out the keycodes of the buttons ...and then edit my ~/.Xmodmap
(create if not present)

my ~/.Xmodmap is :

keycode 174 = F20
keycode 176 = F21
keycode 160 = F22
keycode 144 = F23
keycode 160 = F24
keycode 153 = F25
keycode 162 = F26

Then in my KDE autostart , I have put


Now KDE can detect my multimedia keys. After that, I have to set the various shortcuts at different places ... I don't know where to set the change brightness shortcut in KDE sorry
OK, I know what "174","176","160", mean, but what do "F20", "F21", "F22" mean?
 
Old 04-27-2008, 03:03 PM   #13
diver
LQ Newbie
 
Registered: Apr 2008
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by cathectic View Post
Too vague - which series? Aspire, Extensa, TravelMate (or even Ferrari)?

Depends on the Acer laptop. Yes, on older ones, this is the case (i.e. anything pre-2005 is guaranteed to just work). Post 2005 is a bit more hit-and-miss.

AFAIK, this hasn't been true on Acer laptops for at least four years now.

Sound is a matter of using the right X keymapping (evdev should work here, see further down).

From what you're saying, you probably have one of the newer Acer laptops that doesn't just work out-of-the-box for this, so you'll need either acer_acpi (an out-of-tree module, if using a pre 2.6.25 kernel) or acer-wmi (an in-tree driver as of 2.6.25) to tell the kernel how to control the backlight.

The next step for the backlight keys is to then get the scancodes mapped properly to the right keycodes (then I believe the kernel handles toggling the brightness). HAL takes care of this for many laptops already (and I've been adding the Acer ones like mad as I come across them). Chances are though, in 12.1 (whenever that comes out), this step will just be done for you. 12.0 might be a bit more hit-and-miss. Try the Fn+{Left, Right} keys and see if they produce any scancode messages in dmesg to tell if they're already mapped or not.

After that, the easiest way (and what I use) to get the keys working in X properly is to use evdev as your keyboard driver - once your keys are mapped properly, evdev does the necessary kernel-to-X translation and things just work (and yes, I really do use this on my own Acer).
Hi.
Thanks for help.
I use acer Extensa 5620Z.
Slackware -current
kernel 2.6.24.5 generic-smp

If i get your point, i need first acer-wmi driver to tell the kernel how to control the backlight.
How i install it?

Than, get the scancodes mapped properly to the right keycodes...

Than, to use evdev as my keyboard driver ...

Not sure, i am at this level of understanding, but i will try ...

Now i try to google for :
acer-wmi download slackware
 
Old 04-27-2008, 03:16 PM   #14
diver
LQ Newbie
 
Registered: Apr 2008
Posts: 24

Original Poster
Rep: Reputation: 15
OK. Here we go ...

I found this module and installed it.

cat /proc/modules | grep acer
acer_acpi 19264 0 - Live 0xf8acd000
led_class 7300 1 acer_acpi, Live 0xf8aaa000
wmi_acer 10668 1 acer_acpi, Live 0xf8a3d000


I hope i do ok ???
 
Old 04-27-2008, 04:53 PM   #15
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,298

Rep: Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722
I don't know where you got the module, but the correct place, as far as I can tell, is here: http://code.google.com/p/aceracpi

It even has a SlackBuild so you can build a package. (Beyond that you're on your own unless someone else, like cathectic, can help out.)
 
  


Reply

Tags
hardware


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how should i enable the middle button of 3-button mouse ?? b0nd Slackware 1 07-17-2006 03:46 AM
Mutlipe text/button form, one submit button bappreacher Programming 8 06-27-2006 09:07 AM
make thumb button/third button double-click taboom Linux - Hardware 0 03-20-2006 03:39 PM
Vector 5.1 SOHO. Start button/K button, Sound card suseforge VectorLinux 0 01-30-2006 01:14 PM
3 button mouse (scroll button) Spyiish Slackware 24 07-23-2005 02:37 PM


All times are GMT -5. The time now is 08:41 PM.

Main Menu
Advertisement
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