Re: vim editor with TERM
There is also the VISUAL param which overrides what is inferred from EDITOR. On Fri, May 31, 2024, at 2:23 PM, Stuart Henderson wrote: > On 2024-05-31, 04-psyche.tot...@icloud.com <04-psyche.tot...@icloud.com> > wrote: > > Hi all, > > > > I use the following terminal: > > > > echo $TERM > > xterm-256color > > > > when in my ~/.profile I do: > > > > export EDITOR=nano > > > > everything works well. > > > > However, if I do > > > > export EDITOR=vim > > > > then when I ssh into the machine, up and down arrow in the terminal do not > > work anymore (it does not give me access to previous commands entered). > > It's an extremely annoying misfeature in ksh. > > If $EDITOR starts with the letters "vi" then it defaults to vi-style > command line editing. You can use "set -o emacs" to override that, but > then if you sudo/doas to root it will reset to vi-style editing because > of the exported EDITOR variable. > > On some machines I got fed up enough with this to symlink > "emacs-notreally" to vim and set EDITOR=emacs-notreally... > > >
Re: >10W idle power usage on framework laptop 12th gen 13inch
> From your dmesg: > > iwx0 at pci6 dev 0 function 0 "Intel Wi-Fi 6 AX210" rev 0x1a, msix > > if you read the end of man page for iwx you'll see: > > This driver does not support powersave mode. Ah. I guess that’s a failure to read man page. Thank you. I’ve tested disabling the port in BIOS saves me significant power vs an unloaded driver but I have a little more testing to do to see if it’s actually fully powered down or not when I do that. 10W is quite a bit.
Re: >10W idle power usage on framework laptop 12th gen 13inch
> 1. Snapshot's kernel: > > Apr 28 13:32:23 matebook apmd: battery status: CRITICAL. external power > status: not connected. estimated battery life 14% (11 minutes life time > estimate) > > 2. Solene's patch: > > May 1 11:52:28 matebook apmd: battery status: CRITICAL. external power > status: not connected. estimated battery life 14% (14 minutes life time > estimate) > > 3. Attached patch: > > Battery state: CRITICAL, 13% remaining, 31 minutes life estimate > AC adapter state: not connected > Performance adjustment mode: powersaving (400 MHz) > Does apmd keep a running average for the current and voltage or is it based on instantaneous (as close as that can be)? If it's not a longer average it might not be that reliable to base a savings test on. But it may be a longer average.
Re: >10W idle power usage on framework laptop 12th gen 13inch
> > I tried disabling cores in my bios down to 3 CPUs and did comparisons and i > didn't really notice a savings. That was for idle usage, though. This may help out with an actual workload
Re: >10W idle power usage on framework laptop 12th gen 13inch
> Linux has drivers for devices shutdown when not used and idle power > states, pretty much like Windows has. Android, who is Linux derived, > took this concept to a much higher level. > Think of a wireless card and you can see on man ath(4): " The driver > does not fully enable power-save operation of the chip; consequently > power use is suboptimal." This is one of the simplest example. I configured a very stripped down linux kernel and it idles at about the same watt usage as OpenBSD. I guess it's a matter of figuring out which drivers or kernel features are saving so much power. I flashed my bios to the newest one they provide and Linux uses even less power; I did not see much difference on OpenBSD.
Re: >10W idle power usage on framework laptop 12th gen 13inch
> It is extention of powersave mode which disabling / enabling CPUs. Interesting, maybe i'll test on it. > Regarding estimated life time: > > Battery state: high, 66% remaining, 152 minutes life estimate > AC adapter state: not connected > Performance adjustment mode: powersaving (400 MHz) > > which is like 2x from usual numbers. > This is for idle current usage? I tried disabling cores in my bios down to 3 CPUs and did comparisons and i didn't really notice a savings.
Re: >10W idle power usage on framework laptop 12th gen 13inch
> I am conducting my tests with manual hw.setperf=0 I think maybe it’s the drivers not powering down like you said
Re: >10W idle power usage on framework laptop 12th gen 13inch
On Tue, Apr 30, 2024, at 3:13 PM, Mihai Popescu wrote: > https://marc.info/?l=openbsd-misc&m=165231418528297&w=2 > > I am conducting my tests with manual hw.setperf=0
Re: >10W idle power usage on framework laptop 12th gen 13inch
Kirill thanks for the patch, but i am still worried about the power usage. Even if i put apmd in manual mode and setperf=0, my system sucks 9-9.5W, which means the patch will not do much in my situation since any benefit from the patch comes from setperf=0. What could be taking so much power? CPUs are idling. I've tried switching to two cores with no help. I've confg'd a mostly driverless kernel and booted my system with all ports off that i could, which i'm assuming actually turns them off since i do notice a power shift. Still major power drain compared to Linux.
Re: >10W idle power usage on framework laptop 12th gen 13inch
On Sun, Apr 28, 2024, at 4:17 PM, Mihai Popescu wrote: > > Any ideas if it's remediable or where to start digging? > > Linux has drivers for devices shutdown when not used and idle power > states, pretty much like Windows has. Android, who is Linux derived, > took this concept to a much higher level. > Think of a wireless card and you can see on man ath(4): " The driver > does not fully enable power-save operation of the chip; consequently > power use is suboptimal." This is one of the simplest example. My BIOS allows me to disable the wireless and three other ports (External I/O, WIFI/Bluetooth, Finger Print, Camera). I turned all of these off and did notice a change but it was only about 1.5-2W out of the ~10W > Next, your CPU has performance cores and efficient cores. The thread > per CPU allocation on Linux is on work but it is more advanced. > > My BIOS also allows me to disable cores, but requires me to keep at least one efficiency and one performance. I did this and the kernel threads dropped to three but I didn't notice any power change. In fact, power usage seemed to go up slightly but not much. Is that expected and this is still a viable path for digging?
Re: >10W idle power usage on framework laptop 12th gen 13inch
On Tue, Apr 30, 2024, at 7:52 AM, Nathaniel Griswold wrote: > For this reason, I’m not sure it’s doing straight pass through — it must be > some kind of hybrid design or something I don’t understand. For anyone interested, I guess I was wrong it stays at zero current even under high load. I must have caught it charging before. > > I haven’t tested 99%, for example. 99% max uses current but 95% max does not. So I guess it just doesn’t go into the mode unless it’s well over the threshold or something.
Re: >10W idle power usage on framework laptop 12th gen 13inch
> Well, I haven't tried it but I've read documentation [1] and it seems a bit > differently, isn't it? Um, obsdfreqd sets a cpu frequency “percentage” which I thought might just be setperf. One difference is it sets a range based on a usage algorithm while solene’s patch seems to setperf 100 or zero based on <1/3 idle with a 2 cycle (400ms) backoff. My serperf seems to be at a consistent zero in my idle tests which makes me think the patch may not help my idle tests much, but may help actual usage. > On idle this laptop has on 400 MHz, and provided patch decrease > responsibility of system when it runs on battery, but allows to win some > time on it. Like additionall half an hour or a bit more. > > Frankly speaking I never care about watt consumption, but offline time which > is depend on it is important in my case, so here the recovered patch. Ok
Re: >10W idle power usage on framework laptop 12th gen 13inch
> is it an genuine (really in strict sense of the term) brand battery or a > compatible replacement (even if they call it "genuine", always puzzles me). > Since I keep alive a lot of vintage laptops and am the author of > GNUstep's BatteryMonitor I share the experience that non-original > battery can have their controllers do the wildest things. Usually > sourced from China they have compatible controllers (well, I can imagine > producing hundreds of different models, they must have compatible > emulating chips). It’s the one that came with my Framework laptop new from factory. I don’t know how cheap they are, I guess framework tries to include good components. > > I have seen incorrect cycle count. Sometimes I think they just miss to > calculate partial cycles... so if you never do full cycles, the battery > appears new. Otherwise it is just buggy or explainable for me. To be honest I never actually verified the cycle count before. I have just recently been letting it go to full exhaustion, I almost never let it “die” so that may have something to do with it. I’ll keep an eye on it. > > Some batteries skimp on the design vs. last capacity too. Most often I > have seen them to be about the same value forever. Or a too high design > value is tricked and if you open the cell it is not corresponding. This one has degraded quite a bit so I’m thinking it’s being honest with me. I’ve been through quite a few cycles with it because I assumed the system wasnt doing any DC pass through. One interesting thing with this battery that I’ve just noticed is that the bios has an option to limit charge to a given percentage. If I limit the charge to something, say 60%, and monitor the current when it gets to 60%, it goes to perfect zero. The only way the current will go up is if I do a very heavy CPU load. For this reason, I’m not sure it’s doing straight pass through — it must be some kind of hybrid design or something I don’t understand. If I leave it at the default 100% setting for a full charge, when I get to 100% it still runs about 2.2W idle in OpenBSD (1.6W in Linux), so the way the battery or system firmware works for 100% seems to be much different than for 60%. Maybe it’s just because of the voltage difference between the two maxes. I haven’t tested 99%, for example.
Re: >10W idle power usage on framework laptop 12th gen 13inch
> I had near the same question sometime ago but on different machine, and I've > discovered a patch which I've inlinded into this email. > Hm, ok, i'll try it. Do you have any insight into whether obsdfreqd has similar power saving to this patch? It seems to set the perf similarly. I wasn't having much luck with obsdfreqd as far as wattage, however... Nate
Re: >10W idle power usage on framework laptop 12th gen 13inch
On Mon, Apr 29, 2024, at 5:06 AM, Polarian wrote: > Hello, > > Just a quick thing I wanted to point out. > > > I have no idea why my charge cycles is so low. It's at 5 now. And i > > tested that on Linux, too, so it's not just OpenBSD. > > Having low charge cycles is good, that isn't the issue. Having a charge > cycle of 5 means the battery has only been discharged and recharged 5 > times, this means it *should* be in good health. > > I meant to clarify: I have had the battery for over a year and I’m not sure why the cycles reset to 5. I am puzzled by it.
Re: >10W idle power usage on framework laptop 12th gen 13inch
> So you are running on battery, not AC. Yes, i am testing the power usage on battery > > hw.sensors.acpibat0.raw1=4 (discharge cycles) > > Probably not related, but your battery has dropped full charge > from 3.57 Ah to 3.01 in four cycles? > > > > hw.sensors.acpitz0.temp0=42.80 degC (zone temperature) > > hw.sensors.acpitz1.temp0=40.80 degC (zone temperature) > > hw.sensors.acpitz2.temp0=41.80 degC (zone temperature) > > hw.sensors.acpitz3.temp0=38.80 degC (zone temperature) > > hw.sensors.acpitz4.temp0=31.80 degC (zone temperature) > > hw.sensors.softraid0.drive0=online (sd1), OK > > ``` > > I have no idea why my charge cycles is so low. It's at 5 now. And i tested that on Linux, too, so it's not just OpenBSD. Nate
Re: >10W idle power usage on framework laptop 12th gen 13inch
I trimmed the dmesg.boot to be just the last boot On Sun, Apr 28, 2024 at 08:01:58PM +0200, Jan Stary wrote: > > > hw.sensors.acpibat0.volt0=15.40 VDC (voltage) > > > hw.sensors.acpibat0.volt1=14.29 VDC (current voltage) > > > hw.sensors.acpibat0.current0=0.69 A (rate) > > I think he got it from here (from dc): > > 14.29 0.69 * p > 9.86 > Yes, that is indeed how i got it, and it also matches the output of `upower -i /org/freedesktop/UPower/devices/battery_BAT1'. Indeed, P=VI Maybe i will try playing with the ACPI driver to see if i can turn some devices off to test it. Nate dmesg.boot Description: Binary data
Re: >10W idle power usage on framework laptop 12th gen 13inch
I forgot to mention that I have apmd running in automatic mode. I've also tried obsdfreqd but it does not seem to have much of an effect on or off. Here is my `sysctl hw.sensors' output (with obsdfreqd on) ```sysctl hw.sensors hw.sensors.cpu0.temp0=47.00 degC hw.sensors.cpu0.frequency0=6.00 Hz hw.sensors.cpu2.frequency0=7.00 Hz hw.sensors.cpu4.frequency0=55000.00 Hz hw.sensors.cpu6.frequency0=65000.00 Hz hw.sensors.cpu8.frequency0=45000.00 Hz hw.sensors.cpu9.frequency0=55000.00 Hz hw.sensors.cpu10.frequency0=65000.00 Hz hw.sensors.cpu11.frequency0=6.00 Hz hw.sensors.cpu12.frequency0=55000.00 Hz hw.sensors.cpu13.frequency0=55000.00 Hz hw.sensors.cpu14.frequency0=55000.00 Hz hw.sensors.cpu15.frequency0=55000.00 Hz hw.sensors.acpibtn0.indicator0=On (lid open) hw.sensors.acpiac0.indicator0=Off (power supply) hw.sensors.acpibat0.volt0=15.40 VDC (voltage) hw.sensors.acpibat0.volt1=14.29 VDC (current voltage) hw.sensors.acpibat0.current0=0.69 A (rate) hw.sensors.acpibat0.amphour0=3.01 Ah (last full capacity) hw.sensors.acpibat0.amphour1=0.30 Ah (warning capacity) hw.sensors.acpibat0.amphour2=0.09 Ah (low capacity) hw.sensors.acpibat0.amphour3=0.12 Ah (remaining capacity), WARNING hw.sensors.acpibat0.amphour4=3.57 Ah (design capacity) hw.sensors.acpibat0.raw0=5 (battery discharging), OK hw.sensors.acpibat0.raw1=4 (discharge cycles) hw.sensors.acpitz0.temp0=42.80 degC (zone temperature) hw.sensors.acpitz1.temp0=40.80 degC (zone temperature) hw.sensors.acpitz2.temp0=41.80 degC (zone temperature) hw.sensors.acpitz3.temp0=38.80 degC (zone temperature) hw.sensors.acpitz4.temp0=31.80 degC (zone temperature) hw.sensors.softraid0.drive0=online (sd1), OK ```
>10W idle power usage on framework laptop 12th gen 13inch
I am seeing a lot of power drawn even when nothing is going on on the system (top shows everything at zero, load average is 0.01). This is even if the backlight is dim. On an Ubuntu Linxu system, i was getting about 3.5-4W when nothing much was going on. Any ideas if it's remediable or where to start digging? dmesg.boot attached Thank you Nate dmesg.boot Description: Binary data