Tiny Core Linux

Tiny Core Extensions => TCE Bugs => Topic started by: nick65go on May 15, 2021, 09:53:33 AM

Title: flit and watcher did not show battery measure
Post by: nick65go on May 15, 2021, 09:53:33 AM
in Tc12_x86, both (fltk based programs) flit.tcz and watcher.tcz did not show battery measure.
- flit shows it (kind of) as blue background, red foreground (charged null) even with AC-charger on/off.
- "watcher -bat" issued a segmentation fault.
I suspect maybe the (kernel 5.10.3) /proc or /sys branches are wrong queried.

Title: Re: flit and watcher did not show battery measure
Post by: curaga on May 15, 2021, 12:31:50 PM
From memory, watcher expects the battery name to that arg.
Title: Re: flit and watcher did not show battery measure
Post by: Rich on May 15, 2021, 02:01:17 PM
Hi nick65go
... - "watcher -bat" issued a segmentation fault. ...
Look in:
Code: [Select]
/sys/class/power_supply/to find out what your battery is called.

If it's called  BAT0 , try starting it like this:
Code: [Select]
watcher -bat BAT0
I believe watcher also has a help option:
Code: [Select]
watcher -h
Title: Re: flit and watcher did not show battery measure
Post by: nick65go on May 15, 2021, 04:10:04 PM
re-tested and
Code: [Select]
watcher -bat BAT0 is the good code without segmentation fault, however unfortunately no battery measures shown.
same for flit.tcz

PS: a script from Rich still popup a message, when battery will deplete to less than 5%.
Title: Re: flit and watcher did not show battery measure
Post by: Rich on May 15, 2021, 05:13:43 PM
Hi nick65go
Which version are you using? You want version  1.10.1  which includes fixes for changes in  /sys/class/power_supply/ ... / .
Available from TC9 and later:
http://tinycorelinux.net/9.x/x86/tcz/watcher.tcz.info
Title: Re: flit and watcher did not show battery measure
Post by: nick65go on May 15, 2021, 06:48:54 PM
@Rich, thank you. It seams that I had an old version, app did not update it, even when I have all watcher.tcz { .dep, .md5} files.
So I manually update it now from normal tc12_x86 repository, at version. 1.10.1:
Code: [Select]
sudo umount /tmp/tcloop/watcher
sudo rm /usr/local/tce.installed/watcher
tce-load -iw watcher.tcz
watcher -bat BAT0
and it works now, sorry for the noise.

I did similar clean-up and fresh download for flit.tcz, from normal tc12_x86 repository. In apps info it says 1.3.2.1, but it downloaded 1.3.2.
which does not show proper battery charge: in flit is =zero, in watcher =87%B
Title: Re: flit and watcher did not show battery measure
Post by: nick65go on May 15, 2021, 07:44:19 PM
same problem in TC12-x86_64, flit is ver 1.3.2, and not showing battery measures.
Title: Re: flit and watcher did not show battery measure
Post by: Rich on May 15, 2021, 08:29:09 PM
Hi nick65go
...  sorry for the noise. ...
Not a problem. Good to hear it's working now.

... PS: a script from Rich still popup a message, when battery will deplete to less than 5%.
I guess you are referring to this:
http://forum.tinycorelinux.net/index.php/topic,23880.msg150398.html#msg150398
Title: Re: flit and watcher did not show battery measure
Post by: nick65go on May 16, 2021, 06:38:25 AM
Hi Rich,
I opted for the spartan version, just the popup message box when battery level decreases under 5% (the level is arbitrary selected by me).
http://forum.tinycorelinux.net/index.php/topic,23880.msg150330.html#msg150330 (http://forum.tinycorelinux.net/index.php/topic,23880.msg150330.html#msg150330)
PS: a functional flit.tcz could show more, like the clock and the sound level.
But I can live to type "date" in a shell, or use the F6/7/8 to control the mute/up/down volume. (and F6= mute has a led on/off)
I just reported that actual flit.tcz in tc12_x86 and tc-x86_64 are not fully functional.

FYI: If I put a little effort I could just "build" a script (located in ~/local/bin) to show (a snapshot of) most of the things I care (date, memory, etc).But I am lazy. And tinycore control panel has already buttons "Date" and "System-Stats/Mem" for these things.