Discussion:
Lenovo T470s Questions
(too old to reply)
Bridger Dyson-Smith
2018-02-02 02:13:05 UTC
Permalink
Hi list and Michael -

I received a T470s at work and decided to jump into the CURRENT end of the
FreeBSD pool. I have a weird acpi_ibm issue and I'm not sure where to start
trying to diagnose the issue.

# uname -a
FreeBSD spanner 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r328126: Thu Jan 18
15:25:44 UTC 2018 ***@releng3.nyi.freebsd.org:/
usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64

I've loaded acpi_ibm via /boot/loader.conf:
acpi_ibm_load="YES"

and the module shows as being loaded:
# kldstat | grep acpi_ibm
8 1 0xffffffff8278e000 7570 acpi_ibm.ko

However, I don't have any of the sysctl knobs available; e.g.
# sysctl -a | grep acpi_ibm
#

or
# sysctl dev.acpi_ibm.0.fan_speed
sysctl: unknown oid 'dev.acpi_ibm.0.fan_speed'

I've (tried) to look through the commit messages on svn-src-head, but I'm
not seeing anything specifically related to acpi work, or I just don't know
what I'm looking at (a definite possibility).

Would someone be able to provide a bit of debugging direction here?
Reviewing `dmesg -a` doesn't tell me anything specific about acpi_ibm.

Thanks in advance for your time and trouble.
Bridger
Jan Bramkamp
2018-02-02 10:11:15 UTC
Permalink
Post by Bridger Dyson-Smith
Hi list and Michael -
I received a T470s at work and decided to jump into the CURRENT end of the
FreeBSD pool. I have a weird acpi_ibm issue and I'm not sure where to start
trying to diagnose the issue.
# uname -a
FreeBSD spanner 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r328126: Thu Jan 18
usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
acpi_ibm_load="YES"
# kldstat | grep acpi_ibm
8 1 0xffffffff8278e000 7570 acpi_ibm.ko
However, I don't have any of the sysctl knobs available; e.g.
# sysctl -a | grep acpi_ibm
#
or
# sysctl dev.acpi_ibm.0.fan_speed
sysctl: unknown oid 'dev.acpi_ibm.0.fan_speed'
I've (tried) to look through the commit messages on svn-src-head, but I'm
not seeing anything specifically related to acpi work, or I just don't know
what I'm looking at (a definite possibility).
I made the same discovery on my T470s running FreeBSD 12-CURRENT. It has
been a long time since Thinkpads were designed by IBM. The fan control
works just fine without any special purpose module. The acpi_ibm module
main usecase for me was always handling the special button events, but
these days they are just secondary function on the regular function
keys. Who needs an additional row of buttons on >2k€ laptop when you can
waste the space on a large useless trackpad.
Michael Gmelin
2018-02-02 10:37:17 UTC
Permalink
On Fri, 2 Feb 2018 11:11:15 +0100
Post by Jan Bramkamp
Post by Bridger Dyson-Smith
Hi list and Michael -
I received a T470s at work and decided to jump into the CURRENT end
of the FreeBSD pool. I have a weird acpi_ibm issue and I'm not sure
where to start trying to diagnose the issue.
# uname -a
FreeBSD spanner 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r328126: Thu
usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
acpi_ibm_load="YES"
# kldstat | grep acpi_ibm
8 1 0xffffffff8278e000 7570 acpi_ibm.ko
However, I don't have any of the sysctl knobs available; e.g.
# sysctl -a | grep acpi_ibm
#
or
# sysctl dev.acpi_ibm.0.fan_speed
sysctl: unknown oid 'dev.acpi_ibm.0.fan_speed'
I've (tried) to look through the commit messages on svn-src-head,
but I'm not seeing anything specifically related to acpi work, or I
just don't know what I'm looking at (a definite possibility).
I made the same discovery on my T470s running FreeBSD 12-CURRENT. It
has been a long time since Thinkpads were designed by IBM. The fan
control works just fine without any special purpose module. The
acpi_ibm module main usecase for me was always handling the special
button events, but these days they are just secondary function on the
regular function keys. Who needs an additional row of buttons on >2k€
laptop when you can waste the space on a large useless trackpad.
I personally love having a large, well built trackpad *and* function
keys.

That aside, I've been working on a patch to acpi_ibm to support special
button events, bluetooth on/off and controlling the keyboard
backlight (not just for the T470s, but also for other recent Lenovo
models). I still need to update the man page and polish it, but it's
already available in a code review and I use it myself successfully (I
didn't look into things like fan control though, as those really
shouldn't be touched these days):

https://reviews.freebsd.org/D14103

Direct link to the patch:

https://reviews.freebsd.org/D14103?download=true

Testers and code reviews are welcome.

Best,
Michael

p.s. Make sure to load the correct kernel module in case you rebuilt
it individually.
--
Michael Gmelin
Rodney W. Grimes
2018-02-02 06:23:01 UTC
Permalink
Post by Bridger Dyson-Smith
Hi list and Michael -
I received a T470s at work and decided to jump into the CURRENT end of the
FreeBSD pool. I have a weird acpi_ibm issue and I'm not sure where to start
trying to diagnose the issue.
# uname -a
FreeBSD spanner 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r328126: Thu Jan 18
usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
acpi_ibm_load="YES"
# kldstat | grep acpi_ibm
8 1 0xffffffff8278e000 7570 acpi_ibm.ko
However, I don't have any of the sysctl knobs available; e.g.
# sysctl -a | grep acpi_ibm
#
or
# sysctl dev.acpi_ibm.0.fan_speed
sysctl: unknown oid 'dev.acpi_ibm.0.fan_speed'
I've (tried) to look through the commit messages on svn-src-head, but I'm
not seeing anything specifically related to acpi work, or I just don't know
what I'm looking at (a definite possibility).
Would someone be able to provide a bit of debugging direction here?
Reviewing `dmesg -a` doesn't tell me anything specific about acpi_ibm.
Do you at least get this line in dmesg:
acpi_ibm0: <IBM ThinkPad ACPI Extras> on acpi0

If not then the module did not find the ibm acpi stuff and that
is why none of the other stuff works.
Post by Bridger Dyson-Smith
Thanks in advance for your time and trouble.
Bridger
_______________________________________________
https://lists.freebsd.org/mailman/listinfo/freebsd-current
--
Rod Grimes ***@freebsd.org
Tomoaki AOKI
2018-02-02 11:23:32 UTC
Permalink
Not 100% sure but possibly some (one?) EisaId are (is) missing in
ibm_ids definition of sys/dev/acpi_support/acpi_ibm.c.
Currently it contains "IBM0068" and "LEN0068".

Run `acpidump -d -t | fgrep EisaId` as root on your T470s and look for
EisaId something other than...

IBM0068
LEN0068
IBM3780
PNP????

If there's something new, insert them (it) to
static char *ibm_ids[] = {"IBM0068", "LEN0068", NULL};
line of sys/dev/acpi_support/acpi_ibm.c, between "LEN0068" and "NULL".

If there's none, it's over my hand. :-(
There could be some incompatibility, like struct member change etc.

See my web page [1] of part "Note for limitations of ACPI in ThinkPad
T420" and The FreeBSD Forums' thread noted there [2] for more info.
Although old, but part of them can be useful.

[1] http://www.dec.sakura.ne.jp/~junchoon/machine/freebsd-e.html
[2] https://forums.freebsd.org/threads/26759/


On Thu, 1 Feb 2018 21:13:05 -0500
Post by Bridger Dyson-Smith
Hi list and Michael -
I received a T470s at work and decided to jump into the CURRENT end of the
FreeBSD pool. I have a weird acpi_ibm issue and I'm not sure where to start
trying to diagnose the issue.
# uname -a
FreeBSD spanner 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r328126: Thu Jan 18
usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
acpi_ibm_load="YES"
# kldstat | grep acpi_ibm
8 1 0xffffffff8278e000 7570 acpi_ibm.ko
However, I don't have any of the sysctl knobs available; e.g.
# sysctl -a | grep acpi_ibm
#
or
# sysctl dev.acpi_ibm.0.fan_speed
sysctl: unknown oid 'dev.acpi_ibm.0.fan_speed'
I've (tried) to look through the commit messages on svn-src-head, but I'm
not seeing anything specifically related to acpi work, or I just don't know
what I'm looking at (a definite possibility).
Would someone be able to provide a bit of debugging direction here?
Reviewing `dmesg -a` doesn't tell me anything specific about acpi_ibm.
Thanks in advance for your time and trouble.
Bridger
_______________________________________________
https://lists.freebsd.org/mailman/listinfo/freebsd-current
--
Tomoaki AOKI <***@dec.sakura.ne.jp>
Michael Gmelin
2018-02-02 11:38:47 UTC
Permalink
On Fri, 2 Feb 2018 20:23:32 +0900
Post by Tomoaki AOKI
Not 100% sure but possibly some (one?) EisaId are (is) missing in
ibm_ids definition of sys/dev/acpi_support/acpi_ibm.c.
Currently it contains "IBM0068" and "LEN0068".
Run `acpidump -d -t | fgrep EisaId` as root on your T470s and look for
EisaId something other than...
IBM0068
LEN0068
IBM3780
PNP????
If there's something new, insert them (it) to
static char *ibm_ids[] = {"IBM0068", "LEN0068", NULL};
line of sys/dev/acpi_support/acpi_ibm.c, between "LEN0068" and "NULL".
If there's none, it's over my hand. :-(
There could be some incompatibility, like struct member change etc.
Hi Tomoaki,

Could you please take a look at this?

https://reviews.freebsd.org/D14103

Thanks,
Michael
Post by Tomoaki AOKI
See my web page [1] of part "Note for limitations of ACPI in ThinkPad
T420" and The FreeBSD Forums' thread noted there [2] for more info.
Although old, but part of them can be useful.
[1] http://www.dec.sakura.ne.jp/~junchoon/machine/freebsd-e.html
[2] https://forums.freebsd.org/threads/26759/
On Thu, 1 Feb 2018 21:13:05 -0500
Post by Bridger Dyson-Smith
Hi list and Michael -
I received a T470s at work and decided to jump into the CURRENT end
of the FreeBSD pool. I have a weird acpi_ibm issue and I'm not sure
where to start trying to diagnose the issue.
# uname -a
FreeBSD spanner 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r328126: Thu
usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
acpi_ibm_load="YES"
# kldstat | grep acpi_ibm
8 1 0xffffffff8278e000 7570 acpi_ibm.ko
However, I don't have any of the sysctl knobs available; e.g.
# sysctl -a | grep acpi_ibm
#
or
# sysctl dev.acpi_ibm.0.fan_speed
sysctl: unknown oid 'dev.acpi_ibm.0.fan_speed'
I've (tried) to look through the commit messages on svn-src-head,
but I'm not seeing anything specifically related to acpi work, or I
just don't know what I'm looking at (a definite possibility).
Would someone be able to provide a bit of debugging direction here?
Reviewing `dmesg -a` doesn't tell me anything specific about
acpi_ibm.
Thanks in advance for your time and trouble.
Bridger
_______________________________________________
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to
--
Michael Gmelin
Tomoaki AOKI
2018-02-04 11:58:12 UTC
Permalink
Hi, Michael.
Noticed your previous post after sending mine. :-)

Fallback code for older ThinkPads looks reasonable and gives no new
(not known) regression.

As I don't have new (0x200) ThinkPads (T420 is my latest),
I cannot review and test for new protocol and functionality.
Sorry.

Just FYI, `acpidump -d -t DSDT | fgrep MHKV` on my T420 claims
"Method (MHKV, 0, NotSerialized)" only. So it would go fallback way.

Preferrably, user(s) of latest (i.e, T480) models pops in and report
this worked or not. [Is there one more protocol like 0x300?]


Thanks for your work!


On Fri, 2 Feb 2018 12:38:47 +0100
Post by Michael Gmelin
On Fri, 2 Feb 2018 20:23:32 +0900
Post by Tomoaki AOKI
Not 100% sure but possibly some (one?) EisaId are (is) missing in
ibm_ids definition of sys/dev/acpi_support/acpi_ibm.c.
Currently it contains "IBM0068" and "LEN0068".
Run `acpidump -d -t | fgrep EisaId` as root on your T470s and look for
EisaId something other than...
IBM0068
LEN0068
IBM3780
PNP????
If there's something new, insert them (it) to
static char *ibm_ids[] = {"IBM0068", "LEN0068", NULL};
line of sys/dev/acpi_support/acpi_ibm.c, between "LEN0068" and "NULL".
If there's none, it's over my hand. :-(
There could be some incompatibility, like struct member change etc.
Hi Tomoaki,
Could you please take a look at this?
https://reviews.freebsd.org/D14103
Thanks,
Michael
Post by Tomoaki AOKI
See my web page [1] of part "Note for limitations of ACPI in ThinkPad
T420" and The FreeBSD Forums' thread noted there [2] for more info.
Although old, but part of them can be useful.
[1] http://www.dec.sakura.ne.jp/~junchoon/machine/freebsd-e.html
[2] https://forums.freebsd.org/threads/26759/
On Thu, 1 Feb 2018 21:13:05 -0500
Post by Bridger Dyson-Smith
Hi list and Michael -
I received a T470s at work and decided to jump into the CURRENT end
of the FreeBSD pool. I have a weird acpi_ibm issue and I'm not sure
where to start trying to diagnose the issue.
# uname -a
FreeBSD spanner 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r328126: Thu
usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
acpi_ibm_load="YES"
# kldstat | grep acpi_ibm
8 1 0xffffffff8278e000 7570 acpi_ibm.ko
However, I don't have any of the sysctl knobs available; e.g.
# sysctl -a | grep acpi_ibm
#
or
# sysctl dev.acpi_ibm.0.fan_speed
sysctl: unknown oid 'dev.acpi_ibm.0.fan_speed'
I've (tried) to look through the commit messages on svn-src-head,
but I'm not seeing anything specifically related to acpi work, or I
just don't know what I'm looking at (a definite possibility).
Would someone be able to provide a bit of debugging direction here?
Reviewing `dmesg -a` doesn't tell me anything specific about acpi_ibm.
Thanks in advance for your time and trouble.
Bridger
_______________________________________________
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to
--
Michael Gmelin
_______________________________________________
https://lists.freebsd.org/mailman/listinfo/freebsd-current
--
Tomoaki AOKI <***@dec.sakura.ne.jp>
Loading...