Re: function key usage switched

2007-06-26 Thread Elimar Riesebieter
retitle 429267 usbhid module parameter moved, please update to version 0.8.0
severity 429267 important

-- 

On Mon, 25 Jun 2007 the mental interface of
Matthias Grimm told:

 On Sat, 16 Jun 2007 19:37:14 +0200
 Bin Zhang [EMAIL PROTECTED] wrote:
 
You are right.
In pbbuttonsd-0.7.9's src/module_pmac,
#define PATH_FNMODE 
/sys/module/usbhid/parameters/pb_fnmode
   
It should be /sys/module/hid/parameters/pb_fnmode for 2.6.21.
  
   File a bug against pbbuttonsd then.
  
  
  Done.
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=429267
 
 Hi,
 I'm sorry to enter this discussion so late but better late than never ;-)
 
 Your bug report comes pretty late because pbbuttonsd is able to handle
 the new path since 10. February 2007. Update to version 0.8.0 and it
 should work out of the box.

Confirmed!

Elimar

-- 
  The path to source is always uphill!
-unknown-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: function key usage switched

2007-06-25 Thread Matthias Grimm
On Sat, 16 Jun 2007 19:37:14 +0200
Bin Zhang [EMAIL PROTECTED] wrote:

   You are right.
   In pbbuttonsd-0.7.9's src/module_pmac,
   #define PATH_FNMODE /sys/module/usbhid/parameters/pb_fnmode
  
   It should be /sys/module/hid/parameters/pb_fnmode for 2.6.21.
 
  File a bug against pbbuttonsd then.
 
 
 Done.
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=429267

Hi,
I'm sorry to enter this discussion so late but better late than never ;-)

Your bug report comes pretty late because pbbuttonsd is able to handle
the new path since 10. February 2007. Update to version 0.8.0 and it
should work out of the box.

 Best Regrads
   Matthias


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: function key usage switched

2007-06-16 Thread Gerfried Fuchs
On Fri, Jun 15, 2007 at 11:50:29PM +0200, Bin Zhang wrote:
 On 6/15/07, Elimar Riesebieter [EMAIL PROTECTED] wrote:
 I am booting with append=hid.pb_fnmode=2

 I did put that into /etc/yaboot.conf - am I expected to call anything
after it?  Never changed anything in there so am not familar with it...
Acording to the package file list I think I'd need to call ybin after
having changed it?

 I use key F1 as real F1.
 But I have 1 in my /sys/module/hid/parameters/pb_fnmode, not 2.

 Putting a 2 into that does the trick for me - thanks.  :D

 Why ?

 What kernel version do you use?  This seems to have changed between
2.6.18 and 2.6.21 - see my original mail.

 So long,
Rhonda


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: function key usage switched

2007-06-16 Thread Marko Kaiser
Hello Rhonda,

if you change the yaboot.conf you have to invoke ybin -v afterwards.

Kind regards,
Marko Kaiser


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: function key usage switched

2007-06-16 Thread Bin Zhang

On 6/16/07, Gerfried Fuchs [EMAIL PROTECTED] wrote:

On Fri, Jun 15, 2007 at 11:50:29PM +0200, Bin Zhang wrote:
 On 6/15/07, Elimar Riesebieter [EMAIL PROTECTED] wrote:
 I am booting with append=hid.pb_fnmode=2

 I did put that into /etc/yaboot.conf - am I expected to call anything
after it?  Never changed anything in there so am not familar with it...
Acording to the package file list I think I'd need to call ybin after
having changed it?

 I use key F1 as real F1.
 But I have 1 in my /sys/module/hid/parameters/pb_fnmode, not 2.

 Putting a 2 into that does the trick for me - thanks.  :D

 Why ?

 What kernel version do you use?  This seems to have changed between
2.6.18 and 2.6.21 - see my original mail.



I have 2.6.21 and 2.6.22-rc4.
Maybe Elimar and you have a usb keyboard. I have a adb keyboard which
doesn't use this
/sys/module/hid/parameters/pb_fnmode

$ grep ADB /boot/config-2.6.21-1-powerpc
CONFIG_ADB=y
CONFIG_ADB_CUDA=y
CONFIG_ADB_PMU=y
# CONFIG_ADB_PMU_LED is not set
CONFIG_ADB_MACIO=y
CONFIG_INPUT_ADBHID=y
   ^^^

Bin


 So long,
Rhonda


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]





--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: function key usage switched

2007-06-16 Thread Johannes Berg
On Fri, 2007-06-15 at 20:27 +0200, Gerfried Fuchs wrote:

  I recently update from 2.6.18-4-powerpc to 2.6.21-1-powerpc and
 everything worked pretty well -- except for the function keys.  When I
 press f1 and f2 it switches the brightness of my screen, f3 to f5
 address sound value, and so on.  If I want to use a real f1 I now have
 to press fn-f1.

I see it has already been solved in the thread, but just wanted to chime
in that the problem is that the module parameter moved to a new module,
hence some tools are now unable to change it because they expect it in
the usb_hid and not in the hid module.

As for KBDMode = fkeysfirst that means that F1 is a real F1 and fn-F1 is
brightness down, however, as I said above maybe pbbuttonsd is no longer
able to control it now that the parameter changed to a new module.

As for Bin's ADB keyboard I don't know if there's a parameter at all,
but I can't imagine it changing, pbbuttonsd sets that afaik.

johannes


signature.asc
Description: This is a digitally signed message part


Re: function key usage switched

2007-06-16 Thread Bin Zhang

On 6/16/07, Johannes Berg [EMAIL PROTECTED] wrote:

On Fri, 2007-06-15 at 20:27 +0200, Gerfried Fuchs wrote:

  I recently update from 2.6.18-4-powerpc to 2.6.21-1-powerpc and
 everything worked pretty well -- except for the function keys.  When I
 press f1 and f2 it switches the brightness of my screen, f3 to f5
 address sound value, and so on.  If I want to use a real f1 I now have
 to press fn-f1.

I see it has already been solved in the thread, but just wanted to chime
in that the problem is that the module parameter moved to a new module,
hence some tools are now unable to change it because they expect it in
the usb_hid and not in the hid module.

As for KBDMode = fkeysfirst that means that F1 is a real F1 and fn-F1 is
brightness down, however, as I said above maybe pbbuttonsd is no longer
able to control it now that the parameter changed to a new module.



You are right.
In pbbuttonsd-0.7.9's src/module_pmac,
#define PATH_FNMODE /sys/module/usbhid/parameters/pb_fnmode

It should be /sys/module/hid/parameters/pb_fnmode for 2.6.21.


Bin


As for Bin's ADB keyboard I don't know if there's a parameter at all,
but I can't imagine it changing, pbbuttonsd sets that afaik.

johannes





--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: function key usage switched

2007-06-16 Thread Elimar Riesebieter
On Sat, 16 Jun 2007 the mental interface of
Bin Zhang told:

 On 6/16/07, Johannes Berg [EMAIL PROTECTED] wrote:
[...]
 I see it has already been solved in the thread, but just wanted to chime
 in that the problem is that the module parameter moved to a new module,
 hence some tools are now unable to change it because they expect it in
 the usb_hid and not in the hid module.

 As for KBDMode = fkeysfirst that means that F1 is a real F1 and fn-F1 is
 brightness down, however, as I said above maybe pbbuttonsd is no longer
 able to control it now that the parameter changed to a new module.


 You are right.
 In pbbuttonsd-0.7.9's src/module_pmac,
 #define PATH_FNMODE /sys/module/usbhid/parameters/pb_fnmode

 It should be /sys/module/hid/parameters/pb_fnmode for 2.6.21.

File a bug against pbbuttonsd then.

#if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,20)
#define PATH_FNMODE /sys/module/hid/parameters/pb_fnmode
#else
#define PATH_FNMODE /sys/module/usbhid/parameters/pb_fnmode

Elimar

-- 
  Excellent day for drinking heavily. 
  Spike the office water cooler;-)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: function key usage switched

2007-06-16 Thread Michael Hanselmann
On Sat, Jun 16, 2007 at 06:28:21PM +0200, Elimar Riesebieter wrote:
 File a bug against pbbuttonsd then.

 #if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,20)
 #define PATH_FNMODE /sys/module/hid/parameters/pb_fnmode
 #else
 #define PATH_FNMODE /sys/module/usbhid/parameters/pb_fnmode

… which would make the path depending on the linux-headers version.
Better, pbbuttonsd should do something like this:

  struct stat st;
  const char *path;
  int fd;

  if (stat(/sys/module/usbhid/parameters/pb_fnmode, st) == 0) {
  path = /sys/module/usbhid/parameters/pb_fnmode;
  } else {
  path = /sys/module/hid/parameters/pb_fnmode;
  }

  fd = open(path, O_RDONLY);

Greets,
Michael

-- 
http://hansmi.ch/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: function key usage switched

2007-06-16 Thread Michael Hanselmann
On Sat, Jun 16, 2007 at 07:18:17PM +0200, Michael Hanselmann wrote:
   if (stat(/sys/module/usbhid/parameters/pb_fnmode, st) == 0) {
   […]

   fd = open(path, O_RDONLY);

I just noticed the race condition there. A better way:

fd = open(/sys/module/usbhid/parameters/pb_fnmode, O_RDWR);
if (fd  0) {
fd = open(/sys/module/hid/parameters/pb_fnmode, O_RDWR);
if (fd  0) {
/* Not available */
}
}
/* Use fd */

Greets,
Michael

-- 
http://hansmi.ch/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: function key usage switched

2007-06-16 Thread Bin Zhang

On 6/16/07, Elimar Riesebieter [EMAIL PROTECTED] wrote:

On Sat, 16 Jun 2007 the mental interface of
Bin Zhang told:

 On 6/16/07, Johannes Berg [EMAIL PROTECTED] wrote:
[...]
 I see it has already been solved in the thread, but just wanted to chime
 in that the problem is that the module parameter moved to a new module,
 hence some tools are now unable to change it because they expect it in
 the usb_hid and not in the hid module.

 As for KBDMode = fkeysfirst that means that F1 is a real F1 and fn-F1 is
 brightness down, however, as I said above maybe pbbuttonsd is no longer
 able to control it now that the parameter changed to a new module.


 You are right.
 In pbbuttonsd-0.7.9's src/module_pmac,
 #define PATH_FNMODE /sys/module/usbhid/parameters/pb_fnmode

 It should be /sys/module/hid/parameters/pb_fnmode for 2.6.21.

File a bug against pbbuttonsd then.



Done.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=429267


Bin


#if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,20)
#define PATH_FNMODE /sys/module/hid/parameters/pb_fnmode
#else
#define PATH_FNMODE /sys/module/usbhid/parameters/pb_fnmode

Elimar

--
  Excellent day for drinking heavily.
  Spike the office water cooler;-)


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]





--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: function key usage switched

2007-06-15 Thread Bin Zhang

On 6/15/07, Gerfried Fuchs [EMAIL PROTECTED] wrote:

Hi!

 I recently update from 2.6.18-4-powerpc to 2.6.21-1-powerpc and
everything worked pretty well -- except for the function keys.  When I
press f1 and f2 it switches the brightness of my screen, f3 to f5
address sound value, and so on.  If I want to use a real f1 I now have
to press fn-f1.

 With 2.6.18 this was the other way round: pressing f1 got through as a
real f1, and fn-f1 changed the brightness.  Is there some boot option or
the likes with which I can revert to the old behavior?  I don't
regularly use the function keys for their special meaning but instead
use them as shortcuts.



pbbuttonsd can set this for you.
In /etc/pbbuttonsd.conf, section [MODULE PMAC], there is a line
KBDMode   = 


Best regards,
Bin


 I'm having a PowerBook G4, if that's of any matter.  Any help would be
truly appreciated.  I did look through the diff of /boot/config-* but
didn't find anything that raised my closer interrest.

 So long,
Rhonda


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]





--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: function key usage switched

2007-06-15 Thread Elimar Riesebieter
On Fri, 15 Jun 2007 the mental interface of
Bin Zhang told:

 On 6/15/07, Gerfried Fuchs [EMAIL PROTECTED] wrote:
 Hi!

  I recently update from 2.6.18-4-powerpc to 2.6.21-1-powerpc and
 everything worked pretty well -- except for the function keys.  When I
 press f1 and f2 it switches the brightness of my screen, f3 to f5
 address sound value, and so on.  If I want to use a real f1 I now have
 to press fn-f1.

  With 2.6.18 this was the other way round: pressing f1 got through as a
 real f1, and fn-f1 changed the brightness.  Is there some boot option or
 the likes with which I can revert to the old behavior?  I don't
 regularly use the function keys for their special meaning but instead
 use them as shortcuts.


 pbbuttonsd can set this for you.
 In /etc/pbbuttonsd.conf, section [MODULE PMAC], there is a line
 KBDMode   = 


 Best regards,
 Bin

  I'm having a PowerBook G4, if that's of any matter.  Any help would be
 truly appreciated.  I did look through the diff of /boot/config-* but
 didn't find anything that raised my closer interrest.

I am booting with append=hid.pb_fnmode=2

Ciao

Elimar


-- 
  On the keyboard of life you have always
  to keep a finger at the escape key;-)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: function key usage switched

2007-06-15 Thread Gerfried Fuchs
On Fri, Jun 15, 2007 at 09:31:21PM +0200, Bin Zhang wrote:
 On 6/15/07, Gerfried Fuchs [EMAIL PROTECTED] wrote:
  With 2.6.18 this was the other way round: pressing f1 got through as a
 real f1, and fn-f1 changed the brightness.
 
 pbbuttonsd can set this for you.
 In /etc/pbbuttonsd.conf, section [MODULE PMAC], there is a line
 KBDMode   = 

 I might read that wrong - but it has KBDMode = fkeysfirst in it.  Is
that a wrong setting, then?  I don't think I ever touched that file, and
I even thought it might be related to pbbuttonsd so I stopped the daemon
but it didn't change anything at all, so I'm not too sure if it's
related to pbbuttonsd?

 So long,
Rhonda


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: function key usage switched

2007-06-15 Thread Bin Zhang

On 6/15/07, Elimar Riesebieter [EMAIL PROTECTED] wrote:

On Fri, 15 Jun 2007 the mental interface of
Bin Zhang told:

 On 6/15/07, Gerfried Fuchs [EMAIL PROTECTED] wrote:
 Hi!

  I recently update from 2.6.18-4-powerpc to 2.6.21-1-powerpc and
 everything worked pretty well -- except for the function keys.  When I
 press f1 and f2 it switches the brightness of my screen, f3 to f5
 address sound value, and so on.  If I want to use a real f1 I now have
 to press fn-f1.

  With 2.6.18 this was the other way round: pressing f1 got through as a
 real f1, and fn-f1 changed the brightness.  Is there some boot option or
 the likes with which I can revert to the old behavior?  I don't
 regularly use the function keys for their special meaning but instead
 use them as shortcuts.


 pbbuttonsd can set this for you.
 In /etc/pbbuttonsd.conf, section [MODULE PMAC], there is a line
 KBDMode   = 


 Best regards,
 Bin

  I'm having a PowerBook G4, if that's of any matter.  Any help would be
 truly appreciated.  I did look through the diff of /boot/config-* but
 didn't find anything that raised my closer interrest.

I am booting with append=hid.pb_fnmode=2



I use key F1 as real F1.
But I have 1 in my /sys/module/hid/parameters/pb_fnmode, not 2.
Why ?

Thanks,
Bin


Ciao

Elimar


--
  On the keyboard of life you have always
  to keep a finger at the escape key;-)


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]





--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: function key usage switched

2007-06-15 Thread Elimar Riesebieter
On Fri, 15 Jun 2007 the mental interface of
Bin Zhang told:

 On 6/15/07, Elimar Riesebieter [EMAIL PROTECTED] wrote:
[...]
 I am booting with append=hid.pb_fnmode=2


 I use key F1 as real F1.
 But I have 1 in my /sys/module/hid/parameters/pb_fnmode, not 2.
 Why ?

Hmm,
$ egrep -r hid.pb_fnmode /usr/src/linux/drivers/hid
/usr/src/linux/drivers/hid/hid-input.c:static int hid_pb_fnmode = 1;
/usr/src/linux/drivers/hid/hid-input.c:module_param_named(pb_fnmode, 
hid_pb_fnmode, int, 0644);
/usr/src/linux/drivers/hid/hid-input.c: if (hid_pb_fnmode) {
/usr/src/linux/drivers/hid/hid-input.c: (hid_pb_fnmode == 2   (hid-quirks  
HID_QUIRK_POWERBOOK_FN_ON)) ||
/usr/src/linux/drivers/hid/hid-input.c: (hid_pb_fnmode == 1  !(hid-quirks  
HID_QUIRK_POWERBOOK_FN_ON));


Elimar

-- 
  Learned men are the cisterns of knowledge, 
  not the fountainheads ;-)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]