# Macbook keyboard won't work (except in GRUB) [SOLVED]

## daaaaang

Even with genkernel, the built-in laptop keyboard will not work (i.e. I press keys, nothing happens). USB keyboards work just fine (that is what I am using now). Also, in GRUB the built-in keyboard does work. So somewhere, somehow, my computer has the ability to use its keyboard, but I do not know where to even start looking?

I am something of a linux half-newbie; I am the sysadmin of a couple of servers, and I have run such as Ubuntu on a desktop before. I'm certainly not new to linux, or even a lot of the inner workings of linux, but I am also used to Ubuntu just kind of working (or a server where someone else figured out hardware), so I've never actually had to deal with drivers before and know little about how to do so. I say this because probably I am missing something obvious.

I did install pommed, but I don't think it is even supposed to solve this issue. Any ideas of where I might look? Also definitely let me know if there is anything I should add that would be helpful.

This is my first time with gentoo, and I am having a blast so far. You guys know how to party, haha!

Cheers,

MattLast edited by daaaaang on Sun Aug 15, 2010 3:08 am; edited 1 time in total

----------

## BradN

It kinda sounds like maybe there's a special macbook/apple keyboard driver somewhere in the kernel input config that you might have to enable, but I don't own a mac so I don't know specifically what it might be called.  I tried googling a little bit and found someone that has some sample configs for a particular macbook - it might be worth taking a look at:

http://www.odi.ch/prog/macbookpro/index.php

----------

## daaaaang

I've tried copying several config files (not literally copying, but configuring through the menu and looking at the config file line by line -- this takes forever), and I can't even get the kernel to run when I do that. Or, the one time it did, my USB keyboard wouldn't work either. So I am still sticking with the genkernel for now.

I don't even know if I am on the right track, but I emerged HAL, and noticed that when I run hal-device, one of the devices is "Apple Internal Keyboard". It is usb_device_5ac_236_noserial and is located at /dev/bus/usb/003/004.

I'm not sure what that means, and I am not sure that it means anything. Is there something I can do with that information?

----------

## BradN

It sounds then like your keyboard is being found but perhaps there's a bug in the kernel (or maybe hal or udev) that prevents it from working.  You could try an older or newer kernel version and see if that changes anything.

----------

## daaaaang

I just tried version 2.6.32 from git, and that had exactly the same problem as before (neither keyboard worked, so I had to do a hard shutdown, and also eth0 did not load). I am going to try emerging the gentoo sources for  2.6.28 next, to see if that changes anything. I don't exactly have high hopes though.

On the other hand, this is sort of nice, since I am getting more and more comfortable compiling a kernel. I mean it is frustrating and a hassle, but I am reading more and more of the help messages and coming to understand more of the settings and what I am configuring. Exciting!

I guess it is one of those things where I will be glad I went through all this once I'm actually on the other side.

Oh, I'm not sure whether I mentioned that the internal keyboard was not working on the minimal install CD either. Do you think it would be worth finding some bootable CD where it does work, and try starting over with that? Or at least just recompiling genkernel? Or would that be a waste of time?

Cheers!

Matt

EDIT: I couldn't figure out how to emerge an older version of gentoo-sources (or rather, it didn't immediately work, and it didn't seem important enough to put effort into) so I am using git again. Also the git kernel archives does not have version 2.6.28, so I am rocking 2.6.27 instead. I doubt that these are important things, but hey it isn't like I'm going to pretend to have any idea what is and isn't important at this point. Anyway this seems to take me about 4 or 5 hours, so see you later!

----------

## BradN

It's just unfortunate that you have to learn this stuff on a machine without a working keyboard!

One thing you could try is using the config and kernel version from a livecd that does work for you - you might be able to copy the config from /proc/config.gz while running it.

----------

## daaaaang

Okay, so I tried the ubuntu live cd, and the internal keyboard and trackpad both worked. There was no /proc/config.gz, but there was a /boot/config-2.6.32-21-generic which

was clearly a configuration file.

Sadly, using it to compile the kernel version 2.6.32 resulted in a kernel that couldn't recognize /dev/sda3, and it just goes immediately into a kernel panic.

Incidentally, this is a problem that I am having on my own kernel compilation attempts still. One thing I have seen is that I am supposed to include support for the devfs filesystem, but searching for DEVFS yields nothing.

Either way, there are a lot of threads of people having this problem, so I still have stuff I can try; it's just kind of ugly (like, try including support for every hard drive controller). Ugh.

----------

## lxg

Did you use the other kernel's config directly to build the new kernel? If so, you should better try it with make oldconfig (i.e. copy the .config file into the kernel source tree and run 'make oldconfig'). Sometimes kernel options are renamed or moved somewhere else, and oldconfig will show you what's new/different. After that, you can run 'make menuconfig'. And: Both Ubuntu and Gentoo use patched kernels, so you should definitely not simply compile a Gentoo kernel with an Ubuntu kernel's config.

Furthermore: Ubuntu compiles almost everything as a module, and you will certainly not want that on a customized Gentoo system. And, it may well be that this is also the reason why mounting your /dev/sda3 fails: Ubuntu ships an initial ramdisk, and it loads certain kernel modules from there in advance. If you don't use an initrd, you must have all respective drivers compiled in.

----------

## daaaaang

Thanks for all your help guys!

I ended up going through the kernel and just enabling everything that could possibly relate to any keyboard or USB anything. Unsurprisingly, that screwed up some other things, but then it was a matter of deselecting things in chunks until everything was back to working, including the keyboard. I guess I wouldn't wholeheartedly recommend this technique, but all the data I care about is backed up, so I wasn't too worried, and it worked!

Thanks again,

Matt

----------

