Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

And on the seventh day, He exited from append mode.


devel / comp.unix.bsd.freebsd.misc / Re: laptop battery charging control?

SubjectAuthor
* laptop battery charging control?David Chmelik
`* Re: laptop battery charging control?Andreas Kempe
 `* Re: laptop battery charging control?David Chmelik
  `* Re: laptop battery charging control?David Chmelik
   `* Re: laptop battery charging control?Andreas Kempe
    `* Re: laptop battery charging control?David Chmelik
     `- Re: laptop battery charging control?Andreas Kempe

1
laptop battery charging control?

<umrg08$1mqop$1@dont-email.me>

 copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=552&group=comp.unix.bsd.freebsd.misc#552

 copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dchmelik@gmail.com (David Chmelik)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: laptop battery charging control?
Date: Sun, 31 Dec 2023 10:32:40 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 5
Message-ID: <umrg08$1mqop$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 31 Dec 2023 10:32:40 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f68e569223eb2a706edbb5fe7c82152d";
logging-data="1796889"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19nfC5zJyvC4Q8FdiR49yQzOS3GNDH+pSI="
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:wF5b4L6TESZMx6FzejHmABBTvZY=
 by: David Chmelik - Sun, 31 Dec 2023 10:32 UTC

Is there laptop battery charging control for FreeBSD UNIX? I have two
Lenovo ThinkPad X1 Yoga 20s (FR, UB) and read it's possible, but an
article I read was for older ThinkPads (maybe IBM) so those instructions
didn't work. I'd like to keep them plugged-in with battery to stop
charging at 70% and restart at 50%.

Re: laptop battery charging control?

<umrotr$2dut$1@nyheter.lysator.liu.se>

 copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=553&group=comp.unix.bsd.freebsd.misc#553

 copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!pasdenom.info!nyheter.lysator.liu.se!.POSTED!not-for-mail
From: kempe@lysator.liu.se (Andreas Kempe)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: laptop battery charging control?
Date: Sun, 31 Dec 2023 13:04:59 -0000 (UTC)
Organization: Lysator ACS
Message-ID: <umrotr$2dut$1@nyheter.lysator.liu.se>
References: <umrg08$1mqop$1@dont-email.me>
Injection-Date: Sun, 31 Dec 2023 13:04:59 -0000 (UTC)
Injection-Info: nyheter.lysator.liu.se; posting-account="kempe";
logging-data="79837"; mail-complaints-to="newsmaster@lysator.liu.se"
User-Agent: slrn/1.0.3 (FreeBSD)
 by: Andreas Kempe - Sun, 31 Dec 2023 13:04 UTC

Den 2023-12-31 skrev David Chmelik <dchmelik@gmail.com>:
> Is there laptop battery charging control for FreeBSD UNIX? I have two
> Lenovo ThinkPad X1 Yoga 20s (FR, UB) and read it's possible, but an
> article I read was for older ThinkPads (maybe IBM) so those instructions
> didn't work. I'd like to keep them plugged-in with battery to stop
> charging at 70% and restart at 50%.

I've been using the patch from
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234403 that adds
this functionality to the acpi_ibm module. It gives you two sysctls,
dev.acpi_ibm.0.bat0_charge_stop and dev.acpi_ibm.0.bat0_charge_start
that can be set to you desired percentages to start and stop charging.

It works well on my X280, but I don't know if it applies on the X1 as
well.

Re: laptop battery charging control?

<umtc8d$1t2vt$2@dont-email.me>

 copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=555&group=comp.unix.bsd.freebsd.misc#555

 copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dchmelik@gmail.com (David Chmelik)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: laptop battery charging control?
Date: Mon, 1 Jan 2024 03:41:02 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <umtc8d$1t2vt$2@dont-email.me>
References: <umrg08$1mqop$1@dont-email.me>
<umrotr$2dut$1@nyheter.lysator.liu.se>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 1 Jan 2024 03:41:02 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b8844b3dab1b1e5760eba88450861439";
logging-data="2001917"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18mZfbzsvQrNNmpybDiukvN21FHsScx1Ec="
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:j2nYV1OQYxcyH4hBftOkeAlwf08=
 by: David Chmelik - Mon, 1 Jan 2024 03:41 UTC

On Sun, 31 Dec 2023 13:04:59 -0000 (UTC), Andreas Kempe wrote:

> Den 2023-12-31 skrev David Chmelik <dchmelik@gmail.com>:
>> Is there laptop battery charging control for FreeBSD UNIX? I have two
>> Lenovo ThinkPad X1 Yoga 20s (FR, UB) and read it's possible, but an
>> article I read was for older ThinkPads (maybe IBM) so those
>> instructions didn't work. I'd like to keep them plugged-in with
>> battery to stop charging at 70% and restart at 50%.
>
> I've been using the patch from
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234403 that adds this
> functionality to the acpi_ibm module. It gives you two sysctls,
> dev.acpi_ibm.0.bat0_charge_stop and dev.acpi_ibm.0.bat0_charge_start
> that can be set to you desired percentages to start and stop charging.
>
> It works well on my X280, but I don't know if it applies on the X1 as
> well.

Looked at that report and found a script to set charge thresholds, but got
the following errors (not clear to me yet if I have to load some module/
driver).

root@microcosmos:~ # battery_ctrl.sh
acpi_call kernel modules not loaded.
loading acpi_call ...
kldload: can't load acpi_call: No such file or directory
acpi_call kernel modules failed to load.

Re: laptop battery charging control?

<umte7r$225vs$1@dont-email.me>

 copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=556&group=comp.unix.bsd.freebsd.misc#556

 copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dchmelik@gmail.com (David Chmelik)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: laptop battery charging control?
Date: Mon, 1 Jan 2024 04:14:51 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 40
Message-ID: <umte7r$225vs$1@dont-email.me>
References: <umrg08$1mqop$1@dont-email.me>
<umrotr$2dut$1@nyheter.lysator.liu.se> <umtc8d$1t2vt$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 1 Jan 2024 04:14:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b8844b3dab1b1e5760eba88450861439";
logging-data="2168828"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18PMdevYQSLYWzl4Lh8cU8VKv6JLIdpKbE="
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:5yB6j8Y7Owlm8KRCeaVGGyxh/2s=
 by: David Chmelik - Mon, 1 Jan 2024 04:14 UTC

On Mon, 1 Jan 2024 03:41:02 -0000 (UTC), David Chmelik wrote:

> On Sun, 31 Dec 2023 13:04:59 -0000 (UTC), Andreas Kempe wrote:
>
>> Den 2023-12-31 skrev David Chmelik <dchmelik@gmail.com>:
>>> Is there laptop battery charging control for FreeBSD UNIX? I have two
>>> Lenovo ThinkPad X1 Yoga 20s (FR, UB) and read it's possible, but an
>>> article I read was for older ThinkPads (maybe IBM) so those
>>> instructions didn't work. I'd like to keep them plugged-in with
>>> battery to stop charging at 70% and restart at 50%.
>>
>> I've been using the patch from
>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234403 that adds this
>> functionality to the acpi_ibm module. It gives you two sysctls,
>> dev.acpi_ibm.0.bat0_charge_stop and dev.acpi_ibm.0.bat0_charge_start
>> that can be set to you desired percentages to start and stop charging.
>>
>> It works well on my X280, but I don't know if it applies on the X1 as
>> well.
>
> Looked at that report and found a script to set charge thresholds, but
> got the following errors (not clear to me yet if I have to load some
> module/ driver).
>
> root@microcosmos:~ # battery_ctrl.sh acpi_call kernel modules not
> loaded.
> loading acpi_call ...
> kldload: can't load acpi_call: No such file or directory acpi_call
> kernel modules failed to load.

Loaded that then it said the below (so apparently not dev.acpi_ibm
anymore, but I don't know what replaces it after Lenovo took over from
IBM).

root@microcosmos:~/freebsd.sys/etc # battery_ctrl.sh 50 70
sysctl: unknown oid 'dev.acpi_ibm.0.%location'
[: Unknown: unexpected operator
start threshold was set to : 50
[: Unknown: unexpected operator
stop threshold was set to : 70

Re: laptop battery charging control?

<umu03s$19t$1@nyheter.lysator.liu.se>

 copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=559&group=comp.unix.bsd.freebsd.misc#559

 copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!nyheter.lysator.liu.se!.POSTED!not-for-mail
From: kempe@lysator.liu.se (Andreas Kempe)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: laptop battery charging control?
Date: Mon, 1 Jan 2024 09:19:56 -0000 (UTC)
Organization: Lysator ACS
Message-ID: <umu03s$19t$1@nyheter.lysator.liu.se>
References: <umrg08$1mqop$1@dont-email.me>
<umrotr$2dut$1@nyheter.lysator.liu.se> <umtc8d$1t2vt$2@dont-email.me>
<umte7r$225vs$1@dont-email.me>
Injection-Date: Mon, 1 Jan 2024 09:19:56 -0000 (UTC)
Injection-Info: nyheter.lysator.liu.se; posting-account="kempe";
logging-data="1341"; mail-complaints-to="newsmaster@lysator.liu.se"
User-Agent: slrn/1.0.3 (FreeBSD)
 by: Andreas Kempe - Mon, 1 Jan 2024 09:19 UTC

Den 2024-01-01 skrev David Chmelik <dchmelik@gmail.com>:
> On Mon, 1 Jan 2024 03:41:02 -0000 (UTC), David Chmelik wrote:
>
>> On Sun, 31 Dec 2023 13:04:59 -0000 (UTC), Andreas Kempe wrote:
>>
>>> Den 2023-12-31 skrev David Chmelik <dchmelik@gmail.com>:
>>>> Is there laptop battery charging control for FreeBSD UNIX? I have two
>>>> Lenovo ThinkPad X1 Yoga 20s (FR, UB) and read it's possible, but an
>>>> article I read was for older ThinkPads (maybe IBM) so those
>>>> instructions didn't work. I'd like to keep them plugged-in with
>>>> battery to stop charging at 70% and restart at 50%.
>>>
>>> I've been using the patch from
>>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234403 that adds this
>>> functionality to the acpi_ibm module. It gives you two sysctls,
>>> dev.acpi_ibm.0.bat0_charge_stop and dev.acpi_ibm.0.bat0_charge_start
>>> that can be set to you desired percentages to start and stop charging.
>>>
>>> It works well on my X280, but I don't know if it applies on the X1 as
>>> well.
>>
>> Looked at that report and found a script to set charge thresholds, but
>> got the following errors (not clear to me yet if I have to load some
>> module/ driver).
>>
>> root@microcosmos:~ # battery_ctrl.sh acpi_call kernel modules not
>> loaded.
>> loading acpi_call ...
>> kldload: can't load acpi_call: No such file or directory acpi_call
>> kernel modules failed to load.
>
> Loaded that then it said the below (so apparently not dev.acpi_ibm
> anymore, but I don't know what replaces it after Lenovo took over from
> IBM).
>
> root@microcosmos:~/freebsd.sys/etc # battery_ctrl.sh 50 70
> sysctl: unknown oid 'dev.acpi_ibm.0.%location'
> [: Unknown: unexpected operator
> start threshold was set to : 50
> [: Unknown: unexpected operator
> stop threshold was set to : 70

acpi_ibm is not just for IBM ThinkPads, the historical name just stuck
around. Try kldload acpi_ibm and dev.acpi_ibm.0.%location should
become available.

Re: laptop battery charging control?

<un0amb$2cukp$1@dont-email.me>

 copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=560&group=comp.unix.bsd.freebsd.misc#560

 copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dchmelik@gmail.com (David Chmelik)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: laptop battery charging control?
Date: Tue, 2 Jan 2024 06:32:43 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 46
Message-ID: <un0amb$2cukp$1@dont-email.me>
References: <umrg08$1mqop$1@dont-email.me>
<umrotr$2dut$1@nyheter.lysator.liu.se> <umtc8d$1t2vt$2@dont-email.me>
<umte7r$225vs$1@dont-email.me> <umu03s$19t$1@nyheter.lysator.liu.se>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 2 Jan 2024 06:32:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="81c0260a7524c4c60e125ff5cca54924";
logging-data="2521753"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18n3KUPkZLTgAwnlV0sMGlnTJbBgE2noGw="
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:cV96dCYE+2QAVCnWffua9aHKxYI=
 by: David Chmelik - Tue, 2 Jan 2024 06:32 UTC

On Mon, 1 Jan 2024 09:19:56 -0000 (UTC), Andreas Kempe wrote:
> Den 2024-01-01 skrev David Chmelik <dchmelik@gmail.com>:
>> On Mon, 1 Jan 2024 03:41:02 -0000 (UTC), David Chmelik wrote:
>>> On Sun, 31 Dec 2023 13:04:59 -0000 (UTC), Andreas Kempe wrote:
>>>> Den 2023-12-31 skrev David Chmelik <dchmelik@gmail.com>:
>>>>> Is there laptop battery charging control for FreeBSD UNIX? I have
>>>>> two Lenovo ThinkPad X1 Yoga 20s (FR, UB) and read it's possible, but
>>>>> an article I read was for older ThinkPads (maybe IBM) so those
>>>>> instructions didn't work. I'd like to keep them plugged-in with
>>>>> battery to stop charging at 70% and restart at 50%.
>>>>
>>>> I've been using the patch from
>>>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234403 that adds
>>>> this functionality to the acpi_ibm module. It gives you two sysctls,
>>>> dev.acpi_ibm.0.bat0_charge_stop and dev.acpi_ibm.0.bat0_charge_start
>>>> that can be set to you desired percentages to start and stop
>>>> charging.
>>>>
>>>> It works well on my X280, but I don't know if it applies on the X1 as
>>>> well.
>>>
>>> Looked at that report and found a script to set charge thresholds, but
>>> got the following errors (not clear to me yet if I have to load some
>>> module/ driver).
>>>
>>> root@microcosmos:~ # battery_ctrl.sh acpi_call kernel modules not
>>> loaded.
>>> loading acpi_call ...
>>> kldload: can't load acpi_call: No such file or directory acpi_call
>>> kernel modules failed to load.
>>
>> Loaded that then it said the below (so apparently not dev.acpi_ibm
>> anymore, but I don't know what replaces it after Lenovo took over from
>> IBM).
>>
>> root@microcosmos:~/freebsd.sys/etc # battery_ctrl.sh 50 70 sysctl:
>> unknown oid 'dev.acpi_ibm.0.%location'
>> [: Unknown: unexpected operator start threshold was set to : 50 [:
>> Unknown: unexpected operator stop threshold was set to : 70
>
> acpi_ibm is not just for IBM ThinkPads, the historical name just stuck
> around. Try kldload acpi_ibm and dev.acpi_ibm.0.%location should become
> available.

That works; thanks! Just wondering if I need to do these after reboot or
put in some /etc configuration file...

Re: laptop battery charging control?

<un25e2$1c4a$1@nyheter.lysator.liu.se>

 copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=562&group=comp.unix.bsd.freebsd.misc#562

 copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!nyheter.lysator.liu.se!.POSTED!not-for-mail
From: kempe@lysator.liu.se (Andreas Kempe)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: laptop battery charging control?
Date: Tue, 2 Jan 2024 23:15:14 -0000 (UTC)
Organization: Lysator ACS
Message-ID: <un25e2$1c4a$1@nyheter.lysator.liu.se>
References: <umrg08$1mqop$1@dont-email.me>
<umrotr$2dut$1@nyheter.lysator.liu.se> <umtc8d$1t2vt$2@dont-email.me>
<umte7r$225vs$1@dont-email.me> <umu03s$19t$1@nyheter.lysator.liu.se>
<un0amb$2cukp$1@dont-email.me>
Injection-Date: Tue, 2 Jan 2024 23:15:14 -0000 (UTC)
Injection-Info: nyheter.lysator.liu.se; posting-account="kempe";
logging-data="45194"; mail-complaints-to="newsmaster@lysator.liu.se"
User-Agent: slrn/1.0.3 (FreeBSD)
 by: Andreas Kempe - Tue, 2 Jan 2024 23:15 UTC

Den 2024-01-02 skrev David Chmelik <dchmelik@gmail.com>:
> On Mon, 1 Jan 2024 09:19:56 -0000 (UTC), Andreas Kempe wrote:
>> Den 2024-01-01 skrev David Chmelik <dchmelik@gmail.com>:
>>> Loaded that then it said the below (so apparently not dev.acpi_ibm
>>> anymore, but I don't know what replaces it after Lenovo took over from
>>> IBM).
>>>
>>> root@microcosmos:~/freebsd.sys/etc # battery_ctrl.sh 50 70 sysctl:
>>> unknown oid 'dev.acpi_ibm.0.%location'
>>> [: Unknown: unexpected operator start threshold was set to : 50 [:
>>> Unknown: unexpected operator stop threshold was set to : 70
>>
>> acpi_ibm is not just for IBM ThinkPads, the historical name just stuck
>> around. Try kldload acpi_ibm and dev.acpi_ibm.0.%location should become
>> available.
>
> That works; thanks! Just wondering if I need to do these after reboot or
> put in some /etc configuration file...

On my X280, the computer remembers the setting as long as I don't
completely discharge the battery.

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor