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: keyboard on ibook G4 with kernel 2.6.18

2007-06-16 Thread Emil Nowak
On 2007-06-15, at 21:03:45 Jack Malmostoso wrote:

 Can you ssh to the iBook from another machine and see if it works? Maybe 
 you could pull some useful information (lsmod and dmesg) that way. Sorry 
 for not being more helpful...
Yes I already done that. And there is nothing interesting in dmesg. It's almost
the same as on working kernel. 

lsmod output is more suspicious. I have the same modules however on non-working
kernel the Used By column in evdev shows 0. 

On non-working kernels I have less devices in /dev/input/.


-- 
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, 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]