Hello, guys.

It seems that my upower port finally is useful. I've tested it in VirtualBox VM and on my notebook (Thinkpad X1 Carbon). While testing on real hardware found some issues, which were not present in VM.

I took OpenBSD upower backend and polished it until it behaved on illumos.
The code can be found here:

What are current restrictions:
- we don't try to suspend laptop, just intelligently turn it off, when battery charge is critical (critical is determined by /etc/UPower/UPower.conf);
- upower backend suggests that we have one AC and one battery. I haven't
tested it in case when battery is absent (as my is not so easy to remove), but suppose this case is broken. - mate-power-manager can't manage display brightness - it's implementation is Linux-specific and there's little gain in illumos port of this functionality as our acpi_drv driver supports display brightness management only for some Toshiba notebooks.

High-level configuration can also be performed by mate-power-manager ( https://github.com/OpenIndiana/oi-userland/pull/3870 ).

So, what can we do? React on "lid close", "battery has critical charge"
events (by powering down system) and monitor current battery state (charge level, status (on-battery/on AC power).

Test OI images with upower/mate-power-manager pre-installed are available here: http://buildzone.oi-build.r61.net/isos-upower/

If you want to report issue, please, use the following algorithm:
a) disable upower service,
b) kill mate-power-manager,
c) start upower with /usr/lib/upower -v
d) start mate-power-manager
e) log their messages (and/or core dumps).

P.S.: Yes, I know that code could be better... Don't hesitate to create PRs or report evident issues :)
Best regards,
Alexander Pyhalov,
system administrator of Southern Federal University IT department

oi-dev mailing list

Reply via email to