libera/#maemo-leste/ Monday, 2024-04-01

uvosfreemangordon: Wizzup: so sicelo correctly raises some issues whith the battery management in leste, it is not ideal that mce and the battery applet duplicate so mutch code and the code is quite defficant in various non-standart setups18:37
uvosmostly i think the way to solve this is to improve the code in the applet, and compleatly remove all the battery handling code in mce18:39
uvosmce currently dose two things with the battery state: it enables and disables various patterns and, in a module i added, dose low voltage shutdown.18:40
uvosthe upower module in mce provides other internal interfaces on mces datapipes, but none of these go anywhere18:40
WizzupI think the dbus interface is also used by other programs is it not18:41
uvosno18:41
uvosit provides no external dbus interface whatsever18:41
uvosonly internal interfaces are provided18:41
uvosthe handling of the enableing and disabeling is imo a ui thing, mce also dosent look at the modests email store to enable the email pattern18:41
uvosetc18:41
uvosso this imo should go into status menu item18:42
uvosthe  low voltage shutdown is a bit more tricky18:42
uvosits there to avoid the unbootable mapphone problem18:43
uvosits there to avoid the unbootable mapphone problem18:43
uvosbut really mce is the wrong place to do this, for one mce cant even prevent this state in all cases, since it cant monitor the voltage during boot or shutdown18:43
sicelothe battery stuff was all in mce, at least under Fremantle. however, i'm not necessarily insisting on sticking to the past18:44
uvosno18:44
uvosit was in battd or so18:44
uvosthe old mce battd module did the exact same things the upower module dose18:44
uvosie almost nothing18:44
sicelothere's no such thing in fremantle, unless i have completely forgotten it :-)18:44
WizzupI think it makes more sense to make the decisions in mce than in the status applets18:44
uvosfor the notification light?18:45
uvosimo this is ui no?18:45
sicelowe used to need to kill mce to do stuff like, for example, hotswapping the battery, or doing i2c stuff directly on the fuel gauge18:45
uvosregardless modern mce and the battd module we replaced dose almost nothing18:45
siceloeven SFOS' mce is still doing battery stuff, most of it18:45
uvosno18:46
sicelo?18:46
uvoswe pulled the sfos upower module18:46
uvosthats the modern mce upower moudle18:46
uvosits the same18:46
uvosok maybe they have some other module that also deals with the battery18:46
uvosany how18:46
uvosright now leste mce dose nothing with the battery except the notification light and my hack18:46
sicelostatus menu item seems a weird place to do shutdowns and LED management18:47
uvosshutdowns i agree18:47
siceloanyway i'm open to anything :-)18:47
uvosthe led i dissagree18:47
uvosthe led is just a extension of the gui really18:47
uvosso it should be left to the gui18:48
uvosofc mce deals with the hal to make the led blink18:48
uvosall other patterns besides the device-on and shutdown patterns are also handelded by various gui programs18:48
uvoshttps://github.com/maemo-leste/mce/blob/bb33009c12236580074472c1b7f9967707467403/modules/battery.c18:50
uvoshere is the old mce battery module btw18:50
uvosyou will note it also dosent do anything besides the notification light18:50
uvosall the reall stuff is handled in "BME" which is where mce is getting its info from here18:51
siceloah right, I'm confusing bme with mce now :-D18:53
siceloupower is our 'bme' now18:54
uvosyes - point is that the mce upower code is mostly pointless18:55
sicelofor the mapphone shutdown problem, ideally we need upower to be more configurable than it is. unfortunately changing upower is not really (i mean upstream), so doing these things there means you'll forever carry a fork18:57
sicelofor N900, which has same problem if not calibrated, i came up with a kernel hack, and I've been toying with the idea of bringing it over to Leste19:01
sicelohttps://gitlab.com/postmarketOS/pmaports/-/commit/4b54fc7f83f9e08e2a80bbeb6a97f871748bf7c619:01
uvosmapphones have a low voltage shutdown in kernel19:01
uvosits just too low19:01
siceloyes, i have seen it19:01
uvosmakeing configurable via sysfs would not be so hard19:01
uvosno idea how popular that would be upstream tho19:02
siceloyes, was about to suggest that, as a cmdline option19:02
siceloi think carrying such a patch is easier/better than forks of userspace stuff. for some reason, it seems userspace is less forgiving19:03
uvosany idea how phosh/plamo handle low voltage shutdown?19:03
sicelothey don't19:04
siceloupower takes care of that directly19:04
uvosok so they have the same issues19:04
sicelowhat issues?19:05
uvosdevices with unrealiable battery reporting hw/ devices with special needs for whatever reason haveing problems with unconfigurable upower19:06
sicelothe interesting thing is ... most devices are well-behaved as far as upower is concerned19:06
siceloi think the newer fuel gauges are smarter ... e.g. they can do their own capacity estimation19:07
siceloso for those distros, using upower is absolutely seamless, same as on a regular laptop19:07
uvoshmm ok19:08
uvoscant say that upower works very well on my laptop19:08
uvosbut i digress19:08
siceloso you're saying status_battery should monitor battery. when reaching low state, status_battery requests mce to show appropriate led pattern?19:09
sicelomakes sense to me19:10
uvosyes19:10
uvosand low voltage shutdown needs to go somewhere19:10
uvosnot sure where19:10
siceloupower :-)19:10
siceloanyway, at first it was sounding like you meant the status item should handle the LED itself. maybe Wizzup and fmg can agree with the updated understanding19:11
* Wizzup upgrades maedevu to be a unprivd container19:13
sicelofor the low voltage issue, I'd definitely vote for a kernel patch (hack?) to set the low voltage threshold on mapphones, and we'd import my pmos patch for n900. then we can use regular upstream upower and everything immediately works normally19:15
siceloand mce is relieved of that duty :-)19:15
siceloWizzup: so19:16
sicelodowntime (maedevu)?19:17
sicelobtw guys ... the kernel build for linux-omap 6.1.80 keeps failing19:19
sicelouvos: and please do a changelog for mce so we can get the latest code built19:21
uvossicelo: i have19:23
uvosyeah kernel failing19:24
uvoshave to look19:24
sicelooh just seen that you have. thanks!19:24
Wizzupsicelo: just a few mins @ downtime19:27
uvoslooks like omap4-droid3-xt862.dts is broken19:30
uvosWizzup: dident you have rebased droid3 somewhere?19:30
uvosdevice tree that is19:30
Wizzupuvos: yes19:43
WizzupI think I linked you to it19:43
Wizzupmaybe check maemo-6.6-buildeb or tag maemo-kernel-6.6.219:45
sicelouvos: out of curiosity, what issues does upower cause on your laptop21:17
uvossicelo: after suspend upower fails to continue updateing battery state of charge untill reboot, causing the device to eventually hard shutdown when the battery bms cuts out, acpi -bi still works fine at all times21:34
uvosits probubly not upowers fault, but some bug in the device firmware or less likely kernel acpi code21:35
siceloyes sounds like not directly upower's fault21:42
siceloit'd be interesting to change upower's logind request for shutdown and make it invoke dsme instead :-P21:43
siceloor who does shutdown in maemo btw?21:44
uvosdepends21:44
uvoscan be mce21:44
uvosusually mce i would say21:44
sicelothe actual shutdown? isn't it dsme ... i think that's one of the last things to die21:44
sicelohaven't really looked at the code though21:45
sicelommm, lel ... that's bot for logging?21:45
uvosyes21:46
uvosthats bad21:46
uvosWizzup: ^^^21:46
WizzupI did this21:46
sicelomaybe it's the maedevu stuff21:47
siceloah, yes21:47
uvossicelo: so iirc usually systemui calls mce who calls dsme who ultimatly calls the ini systems shutdown who calls reboot() syscall21:47
uvossicelo: evetually migrateing everything to use logind would be better21:48
uvossince right now we have the issue that various shutdowns result in different behavior, some skip the emergency call check etc21:48
uvoswith logind if and when we do switch to systemd we can have things like emergency call hold a systemd shutdown inhibit21:49
Wizzuplel: welcome back21:49
uvoswhich will prevent shutdown by all means incl "shutdown" in xterm21:49

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!