[RESPONDED] Some issues running Gentoo Linux

Hey Guys, new framework laptop owner here (got the DIY edition),
I managed to install Gentoo Linux successfully with LUKS and all that,
but I have some issues that I’m running into that I’m not sure how to solve.

Power Issue

When I power on and use my laptop for the first time in a while, I’m able to logon, do some work, but then it suddenly looses all power (note, not the shutdown sequence).

Once I start it up again, it seems like everything goes smoothly for quite a while. I also have not noticed this issue while its connected to the charger.

I want to validate whether its a Gentoo Issue or if something is legitimately wrong with my battery.

Trackpad Issue

A minor issue, but I find that the trackpad is very very sensitive and constantly selecting my other windows while I’m typing. Not sure if this can be fixed easily, but the more bigger issue is that scrolling seems to be disabled. I’ve tried libinput and synaptics but both come up with the same results here.

Screen Backlight Buttons

The brightness up and down buttons don’t register as XF86MonBrightnessUp and XF86MonBrightnessDown key presses. I was wondering if there was a fix for that?

Closing Notes

Let me know if you guys have any questions about my setup, Thank you to team at Framework for this amazing laptop! I hope that once these issues are resolved, I can make this my main daily driver!

Look at the scroll_method option for libinput. Or at least, that’s how it’s exposed in sway (the naming might be slightly different based on how you’re configuring your touchpad).

Try holding the Fn key? Or is it that they’re not doing anything? Because if that’s the case, then you might have to bind those keys to e.g. brightnessctl commands to actually change the brightness.

Is there anything in the system log when this happens? You can look at sudo journalctl -xe (for the userspace log) and sudo journalctl -kxe (for the kernel log). If you’re not using systemd, then you’ll have to do sudo cat /var/log/syslog and sudo dmesg to get the same information.

I’ll have to explore this setting in libinput. It’s likely that it isn’t be set and I have to manually set it up.

So its not really an issue of whether I’m using the Fn keys correctly or not or even if I mistakenly had Fn Lock turned on/off. I’ve tried all the combinations and even so, the other function keys work as expected. Basically right now I’m using xev to identify keys. For example, if I were to press the volume up key, Xorg identifies that as the XF86AudioRaiseVolume key. Of course letter keys and Function keys are all recognized. This is just how it works under the hood. What is suprising to me is that when pressing the brightness keys, I don’t see the XF86MonBrightness* key presses being registered (note on other laptops, their respective button presses do register). Now the proposed solution here is to bind those keys, but to bind them to brightnessctl (or xbacklight if you’re not using systemd), requires you map the command to the XF86MonBrightness key! Hence the issue. In fact, xev doesn’t even identify that a key is being pressed at all unfortunately. Very likely an issue with the keyboard driver probably.

I’ll take a close look at /var/log/syslog when it happens again, but I’m worried the issue is to quick to even register in the logs.

That almost sounds like a hardware issue to me, not a driver problem. @FrameworkSupport, any ideas?

What I haven’t gotten the chance to do yet is run a live usb of like Ubuntu Desktop or something. That way, I can totally verify its a driver issue and not something I forgot to configure correctly in gentoo

For what it’s worth, how are you enabling libinput? Missing both scrolling and brightness is kind of suspicious when they go together… in my case, they worked out of the box when I set INPUT_DEVICES=“libinput” in make.conf. If you boot up Fedora 35 from a USB, do they work? Because I know for sure Fedora supports scrolling and brightness out of the box, I made plenty use while setting up my new install haha.

1 Like

If I wasn’t at work I could test this haha. I installed gentoo off a ubuntu live CD and while it’s been a while, I feel like I would have noticed if the scrolling didn’t work while I used firefox in that session. I’ll verify this today and get back. Maybe I can even document what drivers are being used and their settings and add it to the gentoo wiki page for the framework laptop

Heyo, so just an update. Turns out, I completely freaking lied. I originally ported my old installation directly, but KDE was having a lot of trouble adjusting to the new screen size, I kept getting weird flickering artifacts when opening the start menu and windows wouldn’t align correctly. I also experienced the same random poweroffs you mentiomed, but I just attributed them to the install’s glitchiness, which is why I started over. Turns out, even with the same old config and the libinput setting, the trackpad does indeed fail to work :nerd_face:

So it looks like we’ll be debugging this issue together haha. I’m currently rebuilding the kernel from the stock genkernel config to my own, and I’ll see if that fixes it. But you’re not crazy, I shouldn’t have spoken out without trying a fresh install myself earlier, my apologies.

Also, someone actually filled in the details on the wiki page! Not sure if it was you or if someone else did it earlier, but it’s awesome, they listed the exact settings needed for the trackpad and the fingerprint scanner and the like.

No worries! I’m glad someone else is able to reproduce the same issue! That’s big!

I did not update the wiki page there, but I did use while I was installing. I did get a chance to confirm that the ubuntu live usb I booted into had a working trackpad and brightness buttons. Hopefully later today I can double check my kernel settings against the wiki page again to make sure i used the same settings.

I also copied over the xinput parameters from the ubuntu live usb. Maybe that might help as well

Did you ever get to the bottom of any of these issues?

I’m having the same weird random power-off issue (even when connected to AC), and for me nothing is even detecting the trackpad - it’s being picked up as a generic PS/2 mouse, so I don’t even get a right-click.

I’ve followed the gentoo wiki page, and triple-checked I’ve got the same kernel options selected.

Unfortunately, I have not yet. Sorry about that :frowning:
Maybe I’ll be able to explore it more thoroughly in the future but i’m swamped with work at this time.

After a lot of messing around with kernel options & re-compiling, I was able to get the trackpad recognized as a proper trackpad. I think I experienced the power shut-off once or twice, but not since I started this process…but I also have it connected to the charger most of the time (force of habit). I’ve been using Gentoo for about a month, and I never messed with the kernel before installing Gentoo. So this was just me going through the options thinking “this looks like it might be relevant, let’s try it.”

Here’s the details of my setup:
i5 model
BIOS version 3.07
gentoo-sources version 5.15.26
KDE Plasma (probably not very relevant in this case)

I also use genkernel to build the kernel & generate the initramfs, so it may have set some of the options; I didn’t really notate the changes I made, I was in a “just want to get this to work” mode.

For the sake of keeping this post a reasonable length, I created a pastebin with the relevant kernel options:

Yeah, that IS kinda the exercise, especially on newish hardware that hasn’t been picked to pieces by the community yet. When I started the gentoo wiki entry for this machine I ended up enabling a lot of extraneous stuff before trying to suss out which items were actually used by combing through dmesg, lsmod, lspci -v, etc. But there are definitely some mysteries remaining.

Ryan_Sise: Thank you for documenting this! I’m trying to compile a custom kernel on Alpine to get trackpad recognition and this is very useful.

Out of curiosity, which init system are you using on Gentoo - openrc or systemd?

Thanks again.

I use OpenRC, as systemd is more than what I need.

I have no experience with Alpine, and I don’t know how gentoo-sources compares to the kernel provided by Alpine. Hopefully the kernel options between the two line-up pretty well.

Also, of note…
Since my last post, I’ve been using it on battery, and haven’t experienced any involuntary power shut-offs. So there’s a non-zero chance that my edits addressed that as well, as I did have a few of those before I started customizing the kernel.

After a couple of days of messing with it, I finally managed to get the touchpad working properly, I still have some kernel refinement to do in order to determine exactly what the issue was, but I think one of the major things that was left out of the wiki was the need to enable CONFIG_PINCTRL_TIGERLAKE (I enabled all of them, but I think just TIGERLAKE should be enough)

If anyone wants I can post a sanitized version of my kernel config.

2 Likes

Zhephad - Thank you for this note! I followed Ryan_Sise’s very helpful pastebin in building a custom Alpine kernel a couple of weeks ago, but with still no success.

After a month long educational sojourn in FreeBSD, I came back to Alpine a few days ago and was able to successfully build a custom kernel with full & stable trackpad functionality. I’m fairly sure that pinctrl on Tigerlake was the thing that did the trick.

For those interested in Alpine, this wiki gives a breakdown of building a custom kernel - though it’s a bit hard to follow. I’ll be happy to outline what I did if anyone can use it.

Alpine is a terrifc lightweight & well-maintained distro that’s gearing up for their next major(ish) release. I’m typing this on Sway & qutebrowser and I can idle at 2.5W with a few tabs & terminals open, followiing the usual cocktail of tlp & powertop.

1 Like

Hate to bump a year old thread but I just wanted to thank you @Zhephod. I am using a debian sid based distro Siduction, was having the same issue, the kernel dev enabled CONFIG_PINCTRL_TIGERLAKE and that fixed my problem. That needs to be enabled for it to work correctly.

Disable “CONFIG_HID_SENSOR_HUB” in the kernel config, that fixed it for me.