Skip to content

Instantly share code, notes, and snippets.

@AnotherKamila

AnotherKamila/iichid.conf

Last active Apr 14, 2021
Embed
What would you like to do?
# Put me into /usr/local/etc/X11/xorg.conf.d/
# Replace XXX by the appropriate device:
# guess from `sudo libinput list-devices` (TODO I should write more precise instructions)
Section "ServerLayout"
Identifier ":-("
InputDevice "Trackpoint0" "CorePointer"
InputDevice "Touchpad0" "CorePointer"
EndSection
Section "InputDevice"
Identifier "Touchpad0"
Driver "libinput"
Option "Device" "/dev/input/event6"
Option "DisableWhileTyping" "on"
Option "ScrollMethod" "twofinger"
Option "Tapping" "on"
Option "TappingButtonMap" "lrm"
Option "ClickMethod" "clickfinger"
EndSection
Section "InputDevice"
Identifier "Trackpoint0"
Driver "libinput"
Option "Device" "/dev/input/event3"
EndSection
@xk2600

This comment has been minimized.

Copy link

@xk2600 xk2600 commented Aug 26, 2020

saw your post on the freebsd wiki. Assuming you have a Gen 7 X1 Carbon. Would you be willing to post your 'pciconf -lvV' for comparison... I have a Gen 8 and am just wanting to compare notes.

@AnotherKamila

This comment has been minimized.

Copy link
Owner Author

@AnotherKamila AnotherKamila commented Aug 26, 2020

@xk2600: I posted it at the wiki ( https://wiki.freebsd.org/Laptops/Thinkpad_X1_Carbon#pciconf_-lvV ). Hope that helps!

@josereyesjrz

This comment has been minimized.

Copy link

@josereyesjrz josereyesjrz commented Sep 12, 2020

What do you have in your /etc/rc.conf?

@ltning

This comment has been minimized.

Copy link

@ltning ltning commented Oct 9, 2020

saw your post on the freebsd wiki. Assuming you have a Gen 7 X1 Carbon. Would you be willing to post your 'pciconf -lvV' for comparison... I have a Gen 8 and am just wanting to compare notes.

If you have a gen8 I'd be very interested in knowing how it works for you. Mine hard-wedges under load after a minute or two (no X running, just building pkg immediately after install), and at random intervals if idle. I did get drm-devel-kmod working and after many many reboots plasma5 runs (for a short while). Basically nothing else works.

@AnotherKamila

This comment has been minimized.

Copy link
Owner Author

@AnotherKamila AnotherKamila commented Oct 10, 2020

@josereyesjrz:

What do you have in your /etc/rc.conf?

The only relevant line is:

kld_list="i915kms dtraceall cuse coretemp fuse iichid acpi_video acpi_ibm"

moused_enable is unset (NO is the default).

@AnotherKamila

This comment has been minimized.

Copy link
Owner Author

@AnotherKamila AnotherKamila commented Oct 10, 2020

@ltning:

If you have a gen8 I'd be very interested in knowing how it works for you. Mine hard-wedges under load after a minute or two (no X running, just building pkg immediately after install), and at random intervals if idle. I did get drm-devel-kmod working and after many many reboots plasma5 runs (for a short while). Basically nothing else works.

I am assuming you are running CURRENT. My gen7 started hard-wedging (first only under heavy load, later just "a minute or two after startup") too. It seems like someone was fiddling with CPU powersaving sometime around February and messed up for these CPUs. I have not had time to bisect for the exact commit, it would be great if someone could. In the meantime, my (sad) workaround is to disable all CPU powersaving:

/boot/loader.conf

hint.hwpstate_intel.0.disabled="1"
@ltning

This comment has been minimized.

Copy link

@ltning ltning commented Oct 10, 2020

throws caution to the wind and goes back to CURRENT

Thank you for this hint! (bazinga!)

@AnotherKamila

This comment has been minimized.

Copy link
Owner Author

@AnotherKamila AnotherKamila commented Oct 10, 2020

@itning:

throws caution to the wind and goes back to CURRENT

Hmm, if you're not in CURRENT, has the bug made it into the release? That's unfortunate :-/

Thank you for this hint! (bazinga!)

I both hope that it works (because it would help you) and that it doesn't (because the bug is sad) :D

@ltning

This comment has been minimized.

Copy link

@ltning ltning commented Oct 10, 2020

@AnotherKamila:

throws caution to the wind and goes back to CURRENT
Hmm, if you're not in CURRENT, has the bug made it into the release? That's unfortunate :-/

I've been going back in time to try to figure out when this broke. Builds from 2019-12 seem stable-ish, 2020-10 dies quickly. Was down to two snapshots from late January when the one I thought was stable wedged unexpectedly. I haven't been able to reproduce that. Builds from Jan 25 are already badly broken and easily wedged.

Thank you for this hint! (bazinga!)
I both hope that it works (because it would help you) and that it doesn't (because the bug is sad) :D

What worries me is that if this is really the issue, then getting it fixed properly might turn out to be harder than it should be. I'm told the contirbutor of this particular code may not be (as) able to work on it as they were.

@AnotherKamila

This comment has been minimized.

Copy link
Owner Author

@AnotherKamila AnotherKamila commented Oct 10, 2020

@itning:

I've been going back in time to try to figure out when this broke. Builds from 2019-12 seem stable-ish, 2020-10 dies quickly. Was down to two snapshots from late January when the one I thought was stable wedged unexpectedly. I haven't been able to reproduce that. Builds from Jan 25 are already badly broken and easily wedged.

Yup, I have a faint memory of Jan 24 being already broken (but hard work to trigger, something like kernel build with 8 threads would do it after some time). Unfortunately because of the time-consuming nature of triggering it I don't have the exact commit.

What worries me is that if this is really the issue, then getting it fixed properly might turn out to be harder than it should be. I'm told the contirbutor of this particular code may not be (as) able to work on it as they were.

That's not good :-/ Getting modern CPUs to behave is said to be a pain in the ass... Wonder how much awareness there is about this bug?

@ltning

This comment has been minimized.

Copy link

@ltning ltning commented Oct 10, 2020

@AnotherKamila:

Yup, I have a faint memory of Jan 24 being already broken (but hard work to trigger, something like kernel build with 8 threads would do it after some time). Unfortunately because of the time-consuming nature of triggering it I don't have the exact commit.

$morale--

What worries me is that if this is really the issue, then getting it fixed properly might turn out to be harder than it should be. I'm told the contirbutor of this particular code may not be (as) able to work on it as they were.

That's not good :-/ Getting modern CPUs to behave is said to be a pain in the ass... Wonder how much awareness there is about this bug?

$morale--

Seems to be stable so far with your "hint", though.
As for awareness, I'm trying to kick up some dust. There are a few people with similar hardware and corresponding problems, so all hope is not lost. I got the gen8 in the hopes I'd have faster wifi than on my gen6 (once the new work-in-progress lands) - I really did not expect this kind of problem to crop up. Nor the complete lack of touchpad. Any ideas there? :)

That said, I'm prepared to throw hardware at people qualified, trustworthy, willing and able to get this fixed. If you know anyone, shout. :P

@AnotherKamila

This comment has been minimized.

Copy link
Owner Author

@AnotherKamila AnotherKamila commented Oct 10, 2020

@itning:

$morale--

Yup :-(

Seems to be stable so far with your "hint", though.

Yeah, likewise on my gen7.

As for awareness, I'm trying to kick up some dust.

Where? IRC or something? I have very little time, but am obviously interested in this problem... and I might be the kind of masochist that wants a commit bit :D

Nor the complete lack of touchpad. Any ideas there? :)

I have no idea what's in the gen8. My laptop more or less works with this (on CURRENT), but honestly my life has been so much of a mess that I'm still running a kernel from March 😅

Does the gen8 have the same hardware? I heard some birds singing about the (WIP, buggy, may eat your dog but sometimes working) iichid kernel module working on 12-RELEASE, but I haven't tried it myself, and I don't have easy access to the gen8 HW (nor the time to do development ATM).

That said, I'm prepared to throw hardware at people qualified, trustworthy, willing and able to get this fixed. If you know anyone, shout. :P

Well actually, I might, depending on how bored they are :-) I'm guessing you might be on IRC for example? If yes, I'm kamila on Freenode and EFnet, PM me?

@ltning

This comment has been minimized.

Copy link

@ltning ltning commented Oct 10, 2020

kamila :No such nick/channel

@ltning

This comment has been minimized.

Copy link

@ltning ltning commented Oct 10, 2020

Also looks like comet lake support is not in the ig4 driver yet, so I guess my trackpad is gonna remain dead for a while too..

@AnotherKamila

This comment has been minimized.

Copy link
Owner Author

@AnotherKamila AnotherKamila commented Oct 10, 2020

@itning:

kamila :No such nick/channel

Oops, looks like my IRC client has been dead since June and I never noticed 😅 talk about not enough time for FreeBSD...

Um, try kamila_ on Freenode now to coordinate on a way to talk that isn't broken? XD

@ltning

This comment has been minimized.

Copy link

@ltning ltning commented Oct 11, 2020

Ok after our discussion yesterday I created four new entries in sys/dev/ichiic/ig4_pci.c based on openbsd/src@1978b91#diff-28186f30ef84f7822c43ae061d30df23 . This was a "brute force" attempt; I made no other changes, but after building the latest iichid from https://github.com/wulf7/iichid and kldloading ig4 and iichid - touchpad works!

I am running plasma5 and using the out-of-the-box config (no custom xorg config) it initially looks very promising.

Note that the sysutils/iichid port is outdated and has issues with the gen8 touchpad, at least. It "works", but jerky, and goes to sleep at times.

Whoop-de-doo!

@dacracker

This comment has been minimized.

Copy link

@dacracker dacracker commented Apr 14, 2021

@ltning:

If you have a gen8 I'd be very interested in knowing how it works for you. Mine hard-wedges under load after a minute or two (no X running, just building pkg immediately after install), and at random intervals if idle. I did get drm-devel-kmod working and after many many reboots plasma5 runs (for a short while). Basically nothing else works.

I am assuming you are running CURRENT. My gen7 started hard-wedging (first only under heavy load, later just "a minute or two after startup") too. It seems like someone was fiddling with CPU powersaving sometime around February and messed up for these CPUs. I have not had time to bisect for the exact commit, it would be great if someone could. In the meantime, my (sad) workaround is to disable all CPU powersaving:

/boot/loader.conf

hint.hwpstate_intel.0.disabled="1"

Any news regarding this issue? I upgraded my Thinkpad X1 Carbon to
FreeBSD 13.0-RELEASE and experience the same issue. I have applied
the suggested workaround for now. Do you know if this issue has been
reported as a bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment