[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Questions about kernel 2.4.4



Hi,

On  22 May, this message from Leandro Noferini echoed through cyberspace:
> I  compiled  a  kernel  from  my  iBook using  the  sources  from  the
> kernel-sources-2.4.4     package      and     the     patches     from
> kernel-patch-2.4.4-powerpc. 

I don't know what debian's current patches include; but they should work
quite well...

> Now I have two troubles:
> 
> - the keyboard doesn't work under X. Every gives a different result! 

Only under X? Try the following in your XF86Config-4:

Section "InputDevice"
        Identifier      "Generic Keyboard"
        Driver          "keyboard"
        Option          "CoreKeyboard"
        Option          "XkbRules"      "xfree86"
        Option          "XkbModel"      "macintosh"
        Option          "XkbLayout"     "us"
EndSection

This should get you basic a US layout, which you can correct with
xmodmap.

Also, for this to work right, make sure you are using ADB keycodes:

echo 0 > /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes


> - the  trackpad doesn't  work, either  using console  with  gpm either
>   under X. This  worked fine using a 2.2.19  kernel (probed only under
>   console). 

You're probably hitting a bizarre bug, in which using too much colours
for the framebuffer console driver renders your trackpad unuseable...

Try adding this:

	append=" video=aty128fb:vmode:14,cmode:8"
(iBook has the Rage Mobility M3, right?)

to the apropriate image section of your yaboot.conf file.

This makes your console use 8 bits colordepth; my TiBook trackpad only
works with this setting.

> Now I was reading a document coming from SuSe, where I read:
> 
> ============SuSe====================================
> 
>  echo "1"  > /proc/sys/dev/mac_hid/mouse_button_emulation
>  echo "87" > /proc/sys/dev/mac_hid/mouse_button3_keycode # F11
>  echo "88" > /proc/sys/dev/mac_hid/mouse_button2_keycode # F12
> 
>  This makes the function keys F11 and F12 take on the function of the
>  respective mouse buttons

Yes, and you can also use other values for other keys, if F11 and F12
don't suit you.

> -- at least until the next reboot. So to make
>  the change persistent put the three 'echo' commands at the end of the
>  file /sbin/init.d/boot.local which is executed at each system startup.

This is right for Suse, but not for Debian. Rather add it to the file
/etc/sysctl.conf (man sysctl(8)). Here is mine:

#
# /etc/sysctl.conf - Configuration file for setting system variables
# See sysctl.conf (5) for information.
#
#kernel.domainname = example.com
#net/ipv4/icmp_echo_ignore_broadcasts=1

# Mouse button emulation:
dev/mac_hid/mouse_button_emulation = 1
dev/mac_hid/mouse_button2_keycode = 96
dev/mac_hid/mouse_button3_keycode = 87

# Disable ECN:
net/ipv4/tcp_ecn = 0

> So  I discovered  the  /proc/sys/dev/mac_hid directory  where I  found
> these files:
> 
> ==========/proc/sys/dev/mac_hid======================
> ls /proc/sys/dev/mac_hid
> keyboard_lock_keycodes
> mouse_button_emulation
> keyboard_sends_linux_keycodes
> mouse_button2_keycode
> mouse_button3_keycode
> =====================================================
> 
> The  first  three  files  contains  0,  the  fourth  97  and  100  the
> fifth. Should I change some of these to correct my problems?

You need to set mouse_button_emulation to 1 in order to enable mouse
button 2&3 emulation. The two files with the obvious names give you the
keycodes used for buttons two and three. Just use my above example....

Cheers

Michel

-------------------------------------------------------------------------
Michel Lanners                 |  " Read Philosophy.  Study Art.
23, Rue Paul Henkes            |    Ask Questions.  Make Mistakes.
L-1710 Luxembourg              |
email   mlan@cpu.lu            |
http://www.cpu.lu/~mlan        |                     Learn Always. "



Reply to: