# Keyboard not being detected

## kucklehead

I have a ChromeBook In which the keyboard itself is not being detected. The system boots up fine and I have to use a external keyboard to log in. It does in fact work with other installations such as Arch, ubuntu, etc. But not gentoo for some reason. 

This is the specs of it:

https://www.samsung.com/us/computing/chromebooks/under-12/chromebook-3-11-6-xe500c13-k01us/

That said, I don't know where to start so to say as this article I've tried in the passed didn't work: https://wiki.gentoo.org/wiki/Chromebook

Any information is helpful, thanks!

----------

## mike155

I would boot Arch or Ubuntu on the ChromeBook and run

```
lsmod
```

to get a list of alle kernel modules that are loaded. 

After that, I would enable all those modules in the Gentoo kernel.

----------

## kucklehead

Here's the modules from arch linux: 

http://ix.io/473t

And here's the gentoo kernel modules:

http://ix.io/473u

----------

## mike155

I copied your modules from Arch linux to file 'arch' - and your modules from Gentoo linux to file 'gentoo'.

The commands below show the modules that are loaded under Arch, but not under Gentoo:

```
cut -d " " -f 1 arch | sort -u > arch.sorted

cut -d " " -f 1 gentoo | sort -u > gentoo.sorted

diff arch.sorted gentoo.sorted | egrep "^<" | cut -d " " -f 2
```

```
8250_dw

aesni_intel

af_alg

agpgart

algif_aead

algif_hash

algif_skcipher

atkbd

cbc

ccm

cdrom

cmac

coreboot_table

crc16

cros_ec

cros_ec_chardev

cros_ec_debugfs

cros_ec_dev

cros_ec_lightbar

cros_ec_lpcs

cros_ec_sysfs

cryptd

crypto_simd

des_generic

ecb

fb_sys_fops

fuse

i8042

intel_gtt

intel_pmc_bxt

intel_spi

intel_spi_platform

ip_tables

isofs

libdes

libps2

loop

md4

mousedev

mtd

overlay

pkcs8_key_parser

rng_core

serio

serio_raw

spi_nor

squashfs

syscopyarea

sysfillrect

sysimgblt

tpm

tpm_tis

tpm_tis_core

wl

x_tables
```

cros_ec_* are the modules for Chrome hardware. You should enable them.

'atkbd' looks like a module that is missing. Please check that CONFIG_KEYBOARD_ATKBD is enabled in your Gentoo kernel config.

It could be that modules like spi, libps2, mousedev, i8042 etc. are required as well. 

I would enable all of the modules listed above. 

Do you know how to enable those modules and how to rebuild and install a new Gentoo kernel?

----------

## kucklehead

I know how to recompile my kernel and what not. I am using genkernel --luks --lvm  --menuconfig all 

to check and add the keyboard module into it as we speak. To enable all the modules manually? Yeah, I can do it manually, but these modules are needed during boot and I don't know how to do that ( especially if I need to configure my kernel in order to add them )

I was thinking on making a file called modules.conf that holds all the modules you have recommended and adding it into /etc/modules-load.d/ directory. Lemme know if that's a good idea or not

----------

## mike155

modules.conf can help if a module is installed on a machine, but udev doesn't load it automatically. Or if you want a module to be loaded with special parameters.

Nowadays, udev loads most modules automatically. So it's likely that the missing modules are not installed on your machine. Therefore, it's necessary to enable them in your kernel config first. Most likely, it's NOT necessary to add anything to modules.conf.

Let's start with a few modules:

```
cd /usr/src/linux    # or wherever your kernel sources are

cp .config .config.backup-2022.08.09

make menuconfig

Go to: Device Drivers -> Platform support for Chrome hardware

Enable this option (Press SPACE)

Enter the menu (Press ENTER)

Enable all items in the sub-menu. (Press SPACE until you see [M])

Leave the menu (Press ESC)

Go to: Input device support -> Generic input layer (needed for keyboard, mouse, ...) -> Keyboards

Make sure that "AT keyboard" is enabled ([M])

Press ESC, ESC, ESC, .... to get back 

Enter Yes to save the new kernel config file.
```

Now compile and install a new kernel. See https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Kernel for instructions.

One more thing. A common pitfall is that users compile and install their new kernel - and something goes wrong. If that's the case, your machine will boot the old kernel after a reboot.

Whenever you install a kernel and reboot: always check that the machine boots the desired kernel. It's easy. Just run:

```
dmesg | head
```

and look at the first line. It should look like:

 *Quote:*   

> Linux version 5.18.16 (root@your_machine_name) (gcc (Gentoo 11.3.0 p4) 11.3.0, GNU ld (Gentoo 2.3 8 p4) 2.37) #1 SMP PREEMPT_DYNAMIC Wed Aug 3 21:26:46 CEST 2022 

 

You should see your machine name and the date and time when you compiled your kernel. Something is wrong if you see a machine name like 'livecd' or a timestamp that is older than the time you compiled your kernel.

----------

## kucklehead

Sorry it took so long. I struggled using genkernel producing something to boot. And I had to change my kernel parameters to coexist with dracut and just used dracut to build my initramfs instead of genkernel. 

Here's my config file for the kernel I just got done compiling:

http://ix.io/479u

That said, I believe I did what you told me such as:

* Go into the Device Drivers 

* Google ChromeBook Hardware 

* Enable everything with M

Doubled checked on the AT keyboard and well that is also enabled and whenever I boot into my kernel, the keyboard still doesn't function. 

Recently, I just installed gentoo live cd onto a usb and it also doesn't detect my keyboard for some reason.

----------

## mike155

Thanks for posting your kernel config. It looks good so far.

Please boot from your new kernel. 

1) Verify that the first line of 'dmesg' shows that you really boot from your new kernel.

2) Run 'lsmod'. Do you see the cros_ec-* modules?

----------

## kucklehead

I know I am booting from my new kernel because I literally just ran grub-mkconfig -o /boot/grub/grub.cfg from chroot, popped the micro sd card into my chromebook and booted from grub. I added quiet to my grub as their was a ton of message that would pop up, but now they don't show up anymore. And my menuentries only associated with 5.19.0-gentoo-x86_64. Nothing more, nothing less. So I am 100% certain that i am booting into my new kernel.

Also, I ran lsmod | grep "cross_ec" and lsmod | grep "cross" ( when logging into my new kernel ) nothing came back. Because I searched cross and not cros.

But just skimming through it, I do see some modules cros with it 

Here's the modules:

http://ix.io/47dw

It's better to have four eyes looking at something other than my own   :Very Happy: 

----------

## mike155

 *Quote:*   

> Also, I ran lsmod | grep "cros_ec" and lsmod | grep "cros" ( when logging into my new kernel ) nothing came back.
> 
> Here's the modules:
> 
> http://ix.io/47dw

 

The cros-* modules are shown in the list you posted - they seem to be there.   :Smile: 

Okay, let's add more modules. Please post your current kernel config using wgetpaste. I will try to add the missing modules and send it back to you.

----------

## kucklehead

Here it is: http://dpaste.com/6BRF766UA  :Very Happy: 

----------

## mike155

Thanks for your kernel config. It seems that everything needed is there.

You can build drivers as modules [M] or directly into the kernel [*]. lsmod won't show modules that were built directly into kernel. That's the reason for the differences in your lsmod outputs. For example, take i915, the Intel video driver. In your first lsmod outputs from your Arch and Gentoo kernels, the driver was built as a module. Therefore it's shown in your lsmod output. In your current kernel config, the driver is marked as [*]. It is built directly into the kernel and for that reason, it's missing in your lsmod output.

It can be dangerous to mix [M] and [*]. It's better to either build all drivers directly into the kernel - or to build all drivers as modules.

But I think your kernel is fine.

I think we have to look elsewhere. In which mode does your keyboard fail? In TTY console mode? Or in X11/Wayland mode? Or in both modes? If you boot directly into X11 mode, then please press Alt-Ctrl-F2 to switch to a TTY console. Does your keyboard work there? You can switch back to X11/Wayland mode with either Alt-Ctrl-F1 or Alt-Ctrl-F7.

----------

## kucklehead

When pressing CTRL + ALT + F1 OR CTRL + ALT + F2 I can swap from tty1 to tty2. Which is what I am amusing you're wanting and sadly no. The keyboard won't work in either of those consoles, but the external keyboard can and that's not what I want though. 

Here's the dmesg output I just gathered: 

http://ix.io/47eR

I don't know if the dmesg output will help in this late of the game. Also, I don't know if I am in X11 mode or not, all that worked for me was swapping from different consoles

I also ran this a long time ago: systemctl enable getty@tty{2,3,4,5,6}.service 

Could that be an issue?

----------

## mike155

If the keyboard doesn't work on the TTY console, it's probably a kernel problem. I just wanted to make sure that we're not chasing an X11 issue.

I can see messages from your Dell KB216 Wired Keyboard in the output of dmesg.

Please post the output from 'dmesg' under Arch Linux (where the keyboard works) as well. I would like to see the kernel command line parameters and the messages for your ChromeBook's internal keyboard.

----------

## kucklehead

As requested I gathered the dmesg from the arch kernel. It has the external keyboard plugged in even when the internal keyboard works just fine 

http://ix.io/47fx

----------

## mike155

Thanks, kucklehead. That's interesting!

Your Arch kernel prints:

```
[    8.905446] i8042: PNP: PS/2 Controller [PNP0303:PS2K] at 0x60,0x64 irq 182

[    8.905457] i8042: PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp

[    8.914597] i8042: Warning: Keylock active

[    8.914790] serio: i8042 KBD port at 0x60,0x64 irq 182

[    9.082376] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input3      # <--- That's your keyboard

```

And your Gentoo kernel:

```
[    9.811095] i8042: PNP: PS/2 Controller [PNP0303:PS2K] at 0x60,0x64 irq -51

[    9.811095] i8042: PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp

[    9.812482] i8042: Warning: Keylock active

[    9.812790] i8042: probe of i8042 failed with error -22     # <--- Something goes wrong!
```

It seems to be related to i8042.

The modules i8042 is enabled in your kernel [*], but it can't be initialized.

----------

## mike155

It could be the problem I mentioned in one of my posts above: [*] and [M] are mixed in your kernel config.

Please switch the following options from [*] (=y) to [M] (=m):

```
CONFIG_KEYBOARD_ATKBD=y -> CONFIG_KEYBOARD_ATKBD=m

CONFIG_SERIO_I8042=y    -> CONFIG_SERIO_I8042=m

CONFIG_SERIO_LIBPS2=y   -> CONFIG_SERIO_LIBPS2=m
```

See: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1943832

Please don't change .config with your text editor. Always use "make menuconfig" to make changes!

There's a search facility in 'make menuconfig'. Press slash ('/') and enter a search string (CONFIG_KEYBOARD_ATKBD, for example). On the result page, there are numbers on the left side ( (1), (2), or (3) for example ). If your press the corresponding key (1, for example), "make menuconfig" will show you that configuration item.

----------

## kucklehead

Again my apoligies for taking a whole day without saying anything. I was trying to configure my kernel for my arch linux ( year old ) Still having issues. That said, there's a problem. I cannot change -*- into -M- for this kernel. 

So this right here 

```

CONFIG_SERIO_I8042=y    -> CONFIG_SERIO_I8042=m

CONFIG_SERIO_LIBPS2=y   -> CONFIG_SERIO_LIBPS2=m

```

I can't change it so it seems.

----------

## pietinger

Some modules/options in your kernel depends on other modules/options. For example:

"AT keyboard" (KEYBOARD_ATKBD) needs "i8042 PC Keyboard controller" (SERIO_I8042)

Every module which is necessary for another module MUST be loaded (before dependent module), so you can not disable it anymore. This module has now this sign

- -

or this

{ }

Go into <Help> of "AT keyboard" and you will see:

```
CONFIG_KEYBOARD_ATKBD:

[...]

Selects: SERIO [=y] && SERIO_LIBPS2 [=y] && SERIO_I8042 [=y] && SERIO_GSCPS2 [=n]
```

Now there exists two choices:

1. IF you set "AT keyboard" static into your kernel with <*> 

   THEN all dependent modules will get a -*- (and this is not changeable) BECAUSE it must be loaded also static.

2. IF you set "AT keyboard" as module into your kernel with <M>

   THEN some dependent modules will get a {M}

   What does this means ?

   Because your keyboard is now a module, SERIO_I8042 CAN BE a module OR static in your kernel - but it MUST exists.

   Now you are allowed to change this to {*} (=static in your kernel) BUT your are NOT allowed to disable it.

The other side:

Go into <Help> of "i8042 PC Keyboard controller" and you will see:

```
CONFIG_SERIO_I8042:

[...]

Selected by [y]:

  - KEYBOARD_ATKBD [=y] && INPUT [=y] && INPUT_KEYBOARD [=y] && ARCH_MIGHT_HAVE_PC_SERIO [=y]
```

Now have a look into "Input device -> Keyboard -> AT keyboard". Change this from <*> to <M> and then go back to CONFIG_SERIO. Now it was changed from -*- to {M}. Correct ?

P.S.: Best is toggle option with <Space bar>

----------

## kucklehead

From what I am understanding what you're saying is the reason why I am seeing -*- in CONFIG_SERIO is because KEYBOARD_ATKBD needs it to work and it is set as <*> in my config. Because of setting it like that the CONFIG_SERIO are set  as -*-? Kinda butchered it but I am following what're saying I believe so

Unfortunately, I just tripled checked and AT keyboard is set as <M> and when I go back to CONFIG_SERIO it still is -*- for some reason. And here is the config

http://dpaste.com/55KMB9ELE

----------

## pietinger

You have not looked into <Help> ...

like I said ...

Just do it.

Then you see a second line of dependencies of SERIO_I8042

Now go into your Mouse definitions ...

----------

## kucklehead

Compiling it right now on a faster machine. I8042  Will be compiled as a module now and will post if my keyboard works or not. Also, despite the amount of times I have compiled a kernel I never ever used the help tab. In other words you gotta be patient with me. Thanks   :Very Happy: 

----------

## kucklehead

Got done compiling and booted it. I did exactly what you said to do and it's now {M} 

Here's the config to show that I have done exactly what you requested:

https://dpaste.com/97BDD3JD9

Even with the recommended options, it still will not work. Here's the dmesg for it:

http://ix.io/47sr

When I type dmesg | grep "i8042"

I will get this:

```

[   13.487482] i8042: PNP: PS/2 Controller [PNP0303:PS2K] at 0x60,0x64 irq -51

[   13.487493] i8042:  PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp

[   13.491103] i8042: Warning: Keylock active

[   13.494012] i804: probe of i8042 failed with error -22

```

EDIT:

I did some research and found this: https://bbs.archlinux.org/viewtopic.php?id=274130

I added i8042.nopnp and it cleared the error, but it's doing something KBD? Yeah, I am wanting to debug my kernels later on and I have those configurations set.

Here's the new dmesg output:

http://ix.io/47sC

----------

## pietinger

kucklehead,

I have only helped with kernel configuration. I am sure @mike155 (or others) will help you further with your problem (he is a great systemd expert; I am not). 

 *kucklehead wrote:*   

> Also, despite the amount of times I have compiled a kernel I never ever used the help tab.

 

Our famous legend @NeddySeagoon gave us no fish - he teached us fishing ! Now, we do the same  :Wink: 

Working with <Help> is a must when doing kernel configurations - it is easier and faster than looking in Kconfig-files.

Have fun with Gentoo !   :Smile: 

----------

## mike155

dmesg with i8042.nopnp looks better:

```
[   13.420196] i8042: PNP detection disabled

[   13.422010] i8042: Warning: Keylock active

[   13.492804] serio: i8042 KBD port at 0x60,0x64 irq 1        # <--- There it is!

```

Still missing is the line below:

```
[    9.082376] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input3
```

----------

## mike155

Please stay with i8042.nopnp.

Please switch CONFIG_SERIO to [M] "=m" as well.

BTW: Your case is highly unusual. Don't be surprised that we are trying to solve this with a trial and error method...

----------

## kucklehead

Even if it does load up, none of the buttons work on it. Do I have to create a keymap for it? What should I do?

----------

## mike155

Please post the output of 'dmesg'.

Please make sure that you test on a TTY console. It could well be that that there's another issue in your X11 configuration. We must fix the kernel issue first.

----------

## kucklehead

Here it is:

http://ix.io/47vR

This is the latest dmesg

----------

## mike155

I must admit that I don't know what to do. I'm sorry that I can't help you.  :Crying or Very sad: 

----------

## CooSee

 *kucklehead wrote:*   

> Here it is:
> 
> http://ix.io/47vR
> 
> This is the latest dmesg

 

TL;DR

```
i8042.noloop i8042.nomux i8042.nopnp i8042.reset i8042.kbdreset
```

are these really necessary?

you booted arch for comparison - did arch also used some of these kernel flags?

```
cat /proc/cmdline
```

----------

## kucklehead

No, those configs are not needed. I am or was testing certain arguments seeing what would work. And from what I've seen so far that a couple arguments from here https://wiki.gentoo.org/wiki/Synaptics

```

i8042.nopnp  i8042.noloop i8042.nomux i8042.nopnp

```

Seem to work nicely such as it will produce something with my AUX port and Keyboard, however, the keyboard itself still will not work :/ 

I did add INPUT_DEVICE to my make.conf. Arch linux does not have any of those flags let alone i8042.nopnp. I've been trying to configure and create a working kernel again since it's been over a year but for some reason I am just struggling to get a working one.

I get warnings about deprecation,RWDX permissions loaded in tmp.vmlinuz, just unusual stuff that I've never seen or dealt with before. Even when I run grub-mkconfig -o /boot/grub/grub.cfg I don't see any initramfs.img.. Only my vmlinuz and a intel.img. Even when I have compiled and created kernel multiple times, it's a far cry compared to compiling a gentoo kernel manually. When I do compile a kernel manually for gentoo compared to arch ( as for right now ), I don't get any errors at all. 

I also run these commands when I compiled gentoo:

```

make -j3

make modules

make modules_install

make bzImage

cp -v cp -v arch/x86/boot/bzImage /boot/vmlinuz-linux5190

cp System.map /boot/System.map-5-19-0-x86_64

dracut --kver=5.19.0-gentoo

```

There's no issue for some reason. No warnings nothing. That said, I cannot get a current arch linux config file uploaded as right now. For now, I can show the configs from a archlinux iso which I have said this before, the keyboard works perfectly in it. 

But for some reason gentoo live, the keyboard does not work at all. 

I use to have arch linux-5.15.5 or whatever it was, but I deleted it as I got cocky might have to make a post for that issue separately. I hope you understand my situation  

And

```

[    9.082376] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input3

```

Is not in the dmesg. I assure you that I am not editing it out or anything like that. I really want to get this machine to work and to continue to configure it before fall term

----------

## pietinger

Many Linux distributions use heavily patched kernels; Gentoo sources has only very little patches (its nearly vanilla). So, it could be possible that we dont have all needed modules for a latest chromebook (chromebooks are rather special anyway). Maybe we miss a patch for a/some module/-s ... maybe we have to wait for next kernel versions when patches goes into mainline kernel.

----------

## kucklehead

Is there a way I can report this? Even with the keyboard and the mouse built as a module and or built-in, it won't work. Or maybe I have to map it? Kind of grasping at straws here..

----------

## mike155

@kucklehead: it's difficult to say what's wrong here.

It could be a bug or a missing quirk in the vanilla kernel

It could be a bug or a missing quirk in the Gentoo kernel (which is not the vanilla kernel)

It could be a bug in your configuration

It could be a problem in the way you use Linux. I don't like that you switched to unstable and that you use GCC 12. It's not stable

So no, I don't think it makes sense to file a bug. 

I think that I could make your keyboard work if I had the notebook here on my desk. But it's too difficult to explain it in this forum. 

There's one thing you can do. Instead of using the Gentoo kernel, you could try Arch's kernel. Download and install Arch's kernel sources and compile them with Arch's default .config. If Arch's kernel makes your keyboard work under Arch Linux, it should also make your keyboard work under Gentoo Linux.  If you do that, don't forget to copy Arch's modules.conf as well. Maybe there's a module option for one of the modules (i8042, PNP, etc.) that makes your keyboard work? You may also want to use Arch's kernel command line options.

----------

## kucklehead

I'll install a stable kernel and use a stable GCC compiler. And if that doesn't work, I'll download arch linux kernel and I'll post

----------

## mike155

It saddens me that you have so much trouble. 

Please keep in mind that a dysfunctional keyboard is highly unusual. Many users report a black screen after booting or a dysfunctional audio card. But as far as I know, we haven't had a broken keyboard for a long time. 

Either your Samsung Chromebook has a very odd keyboard interface - or there's something wrong in your kernel config or with your Gentoo setup. That's why I recommend to start making major changes like switching back to GCC 11.3,  or switching to the Arch kernel and using Arch's default .config.Last edited by mike155 on Tue Aug 16, 2022 8:21 pm; edited 1 time in total

----------

## kucklehead

I don't know why but vanilla version with arch linux that I compiled manually works fine it's why it took longer to reply.

Here's the one I used https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/linux/trunk/config

Here's the config I am using right now with minor adjustment to it: 

http://ix.io/47NA

Here's the grub:

http://ix.io/47NC

I am still planning on switching my GCC to a more stable version and installing this kernel https://packages.gentoo.org/packages/sys-kernel/gentoo-kernel-bin

----------

## CooSee

i get Secure Site Not Available when i try to look at your uploads at ix.io.

please use wgetpaste from now on.

getting your own kernel options takes some time, because there are so many.

just start with the kernel .config which works perfect on your system and later you can slim down some options step by step.

greetings

----------

## kucklehead

Sadly even compiling my kernel with GCC 11.3, my keyboard still will not work.

Here's the config:

https://dpaste.com/HYRAHHBWK

I'll post my config of arch linux kernel config later on tonight or tomorrow. Keep in mind it also does say something about "Key lock active" one of the links I've sent surely has it. If not I will also post the dmesg config as well

Here's my grub config:

https://dpaste.com/8NZU9PZUM

Here's the /proc/cmdline:

https://dpaste.com/7GD9ERE58

NOTE: These links are from gentoo and not from Arch linux. After this reply, I will be working on posting the configs from arch linux. The system is kind of broken for some reason as I vaguely explained what I was dealing with

----------

## kucklehead

Here's my grub config as well:

http://dpaste.com/DB7KQ84EE

My apolgies that again that it took so long. I was chrooting arch linux using ubuntu and my ubuntu installation is odd. I am using kali linux and getting the links FINALLY:

Oh and here's .config that works for my keyboard:

http://ix.io/47Zb

I've been having issues with building my kernels and I think it's because of my ubuntu installation. 

That said, I should have cmdline link by tonight if I am right.   :Very Happy: 

Edit:

@mike155, I swapped my GCC for a stable version and built a stable version I downloaded from gentoo-sources. I have the links above this reply

Do I have to rebuild all my packages for my gentoo installation? All my packages have been built with 12.11 GCC, and only 5.19.2 and the stable I grabbed (5.15.59 ) has been built with 11.3 GCC

Oh and if you get what @CooSee gets. let me know as soon as possible

----------

## mike155

Please let me ask a question.

I don't understand this sentence:

 *Quote:*   

> I don't know why but vanilla version with arch linux that I compiled manually works fine it's why it took longer to reply. 

 

Which kernel did you compile? And where? Did you copy the Arch kernel sources (or the vanilla kernel sources?) to Gentoo? Did you compile it under Gentoo? With GCC 12? Does it work under Gentoo?

----------

## mike155

 *kucklehead wrote:*   

> @mike155, I swapped my GCC for a stable version and built a stable version I downloaded from gentoo-sources. I have the links above this reply
> 
> Do I have to rebuild all my packages for my gentoo installation? All my packages have been built with 12.11 GCC, and only 5.19.2 and the stable I grabbed (5.15.59 ) has been built with 11.3 GCC

 

Well, it depends (as always).

You can install multiple versions of GCC in parallel (it is slotted). You can switch GCC versions with the commands below: 

```
eselect gcc list

eselect gcc set
```

Usually, there's no need to rebuild the toolchain or all packages if you switch to GCC 11 to build a kernel. Switch back after that. 

Additional steps may be necessary if you update the GCC you use to compile your world. Sometimes, it is necessary to rebuild binutils and libtools. Sometimes, when there are changes in the C++ ABI, it is necessary to rebuild all C++ libraries and applications. Usually, Portage takes care of that. In rare cases, there's a news item with additional instructions.

----------

## kucklehead

I was referring to what I did to my arch linux. Basically, I downloaded the 5.19.1 from www.kernel.org ( Which has a lot of issues about deprecating and what not. ), and I am assuming that's the vanilla version I grabbed ( correct me if I am wrong ) compiled it even when I was getting warnings. Installed the modules and made the initramfs using mkinitcpio -p linux5191. Booted the machine and the keyboard works just fine. This was with the archlinux default config. Anyways, I did this because I wanted proof and to show you and everyone who's viewing this that vanilla kernel sources even when compiling it with a 12.1 GCC, the keyboard works just fine. 

No I didn't copy any of the arch kernel sources to gentoo at all. Instead I did what you suggested before (swapping to a stable GCC and a stable kernel ) to which I did. And the keyboard wouldn't even work despite compiling 5.15.59 and 5.19.1 with GCC 11.3. Basically swapping to GCC 11.3 and building my kernel with it for gentoo, does not work. Those are one of your solutions you recommended correct?

The only option I would have would be building arch linux kernel and moving it over to gentoo. But even so, should I? Would it even work? 

If so, how would i compile arch linux kernel under gentoo?

I was thinking all I need is to grab the default config, download 5.19.2 from kernel.org and compile it. Everything should be in there and there shouldn't be any need for copying things over right?

----------

## mike155

 *Quote:*   

> The only option I would have would be building arch linux kernel and moving it over to gentoo. But even so, should I? Would it even work? 

 

Yes, of course. I use the vanilla kernel (from www.kernel.org) as well. There's even a package you could use: sys-kernel/gentoo-sources.

You can either copy the binary kernel (and all modules) or you can copy the sources and the Arch .config and compile it under Gentoo. Both should work. The latter is probably better.

----------

## kucklehead

These are the commands I ran when compiling and installing arch linux kernel under gentoo:

```

wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.19.2.tar.xz

tar -xvf linux-5.19.2.tar.xz

cd linux-5.19.2

wget  https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/linux/trunk/config

make menuconfig 

make -j3 

make modules;

make modules_install  INSTALL_MOD_PATH=/mnt/gentoo

cp -Pr linux-5.19.2 /mnt/gentoo/usr/src/

cp -v /mnt/gentoo/boot/vmlinuz-5.19.2-arch-x86_64

ln -sf /usr/src/linux-5.19.2-arch /usr/src/linux

eselect kernel set #

# <-- The number that linux-5.19.2-arch is 

dracut --kver=5.19.2

mv /boot/initramfs-5.19.2.img /boot//initramfs-5.19.2-arch-x86_64.img

```

@mike155 is this good so far?

Oh and the /proc/cmdline. The only difference is the arguments corresponding with crypt:

http://dpaste.com/39CS5GRUW

There's no special parameters and if you really want me to boot with the exact parameters then I need to create a initramfs without using dracut or genkernel

as dracut requires special arguments to boot a crypt device. For example:

https://dpaste.com/7N3983M94Last edited by kucklehead on Sat Aug 20, 2022 2:16 am; edited 2 times in total

----------

## kucklehead

Well, I compiled it and got it to boot. The keyboard still won't work after copying the vanilla version 5.19.2, and compiling it with my arch workstation with Arch linux default config:

http://ix.io/484Z

I'm thinking it's a bug at this point

----------

## mike155

How did you compile and install the kernel and its modules under Gentoo Linux? Exactly the same way as under Arch? Or did you use different commands?

Do you use an initramfs? Do you want and/or need an initramfs?

If you do NOT want an initramfs, the recommended way to compile and install a kernel and its modules is:

```
make

make modules

make install

ls -la /boot          # make sure you kernel is there and that your grub.cfg has an entry for it

make modules_install

ls -la /lib/modules   # make sure there's is a directory for your kernel

```

It could make sense to remove /lib/modules/<your kernel version> before you run the commands above. 

Another approach would be to disable modules and to build all drivers directly into the kernel image. That's what I usually do. If you do that, it's necessary to disable all drivers and kernel options you don't need or use - otherwise your kernel image will get too big.

----------

## kucklehead

@mike155 Yes, I want a initramfs to boot from. I compiled it exactly how I compile the arch linux kernels following this guide here: https://wiki.archlinux.org/title/Kernel/Traditional_compilation

The only difference when making the kernel and the initramfs is that I use mkinitcpio -p <vanilla-kernel-sources> and for gentoo, I use dracut --kver=kernel-version-bin

I ran these commands which are stated in another reply:

```

make menuconfig

make -j3

make modules;

make modules_install  INSTALL_MOD_PATH=/mnt/gentoo

cp -Pr linux-5.19.2 /mnt/gentoo/usr/src/

cp -v /mnt/gentoo/boot/vmlinuz-5.19.2-arch-x86_64 

```

While on my archlinux workstation

I switched to my terminal that had gentoo chrooted in and followed this guide here:

https://wiki.gentoo.org/wiki/Kernel/Configuration

And linked it. At this point, It's either file a bug ( which I have not done before ) or stick with arch linux for this chromebook and move my gentoo installation to match this laptop: https://www.amazon.com/HP-Portable-Micro-Edge-Anti-Glare-14-fq1025nr/dp/B09G8SK2KK/ref=sr_1_6?crid=35EG19HFOTMUF&keywords=asus%2Blaptop%2Bcore%2Bi5%2Bmicro+sd+port&qid=1661075282&refinements=p_36%3A-40000&rnid=386442011&s=electronics&sprefix=asus%2Blaptop%2Bcore%2Bi5%2Bmicro+sd+por%2Celectronics%2C162&sr=1-6

How it's going right now it ( as I don't think there's any other recommendations or suggestions ), seems like just sticking with arch linux for it seems easier to do and modifying the gentoo installation I have right now to be compatible with this new laptop. Or perhaps there is another solution I haven't tried which you do state; build everything inside the kernel and not as a module. seems like a pain to do for something that can't even run gentoo by itself. But I'll give it a shot sometime later \o/

----------

## pietinger

@kucklehead,

this patch mentions a "ThinkPad C13 Yoga", but also other Chromebooks. If your problem is not solved in the mean time, please try 5.15.65 because of: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=d74ce3ece4028a85aacf0d26a5ce13c872fcb949

----------

