Git Product home page Git Product logo

matebook-applet's Introduction

matebook-applet

System tray applet/control app for Huawei Matebook

Build Status codecov


WARNING

Due to a recent Codecov security problem the PGP key that was used to sign binaries and the Debian repository could have been compromised. It is strongly recommended to remove the old key from your trusted apt keyring since it can no longer really be trusted:

sudo apt-key del F25E85CB21A79726

The repository uses a new key now, you can add it by usual means.


This simple applet is designed to make some of the proprietary Huawei PC Manager's functionality available via GUI on Linux.

Applet screenshot

It can be used as a system tray applet (above) or as a windowed app (below).

Windowed screenshot

Table of Contents

Help matebook-applet get better!

Join the development! You can also support by sending BTC to 3N983ChqZyFtiep6tNu4tnNcQnDtY2QWps, or to Pay ID 435921757 on Binance.

Installation and setup

The applet requires no installation as such. However, it has dependencies, its functionality may be limited without proper setup, and you may want to add it to autorun so that it gets started automatically when you load your DE. Read on for the details.

Debian

Debian users can add this repo:

deb [signed-by=/usr/share/keyrings/matebook-applet.key] http://evgenykuznetsov.org/repo/ stable main

to their /etc/apt/sources.list and add the public key:

$ wget -qO - https://raw.githubusercontent.com/nekr0z/matebook-applet/master/matebook-applet.key | sudo tee /usr/share/keyrings/matebook-applet.key

From there, the applet is just a sudo apt install matebook-applet away.

Users report that this way also works on Debian derivatives such as Ubuntu or Linux Mint.

note to pre-2022 users

The repository used to be signed by other public keys, and this README used to recommend adding the key to the system-wide trusted keyring. This practice is no longer recommended by Debian because the key is then trusted by the system to sign any known repository, which is a security weakness. If you installed matebook-applet .deb package via this repository before June 2021, you may still have the old keys in your system-wide trusted keyring, and it's a good idea to remove them:

sudo apt-key del 466F4F38E60211B0
sudo apt-key del F25E85CB21A79726
sudo apt-key del FA32B7DDA1A3AC2C

Other Linux

If you're running a Linux with relatively new kernel version, it already includes the required driver. Make sure your system has GTK+ and libayatana-appindicator installed, download (from the releases page) or build matebook-applet, and it should work in read-only mode right away.

If your system doesn't have libayatana-appindicator, you can use a legacy build that depends on libappindicator instead.

For pre-5.5 kernels you may need to update the Huawei-WMI driver. The applet requres at least version 3.0 of the driver.

To be able to change settings as opposed to simply displaying them, you either need to run the applet as root (absolutely not recommended), or make sure all the necessary files (the hooks in /sys/devices/platform/huawei-wmi as well as /etc/default/huawei-wmi/ directory) are user-writable. A good way to set everything up is to make use of Rouven Spreckels' awesome project:

$ git clone https://github.com/qu1x/huawei-wmi.git
$ cd huawei-wmi/generic
$ sudo make install

You may need to re-login for adding your user to group to take effect.

Old Linux

On Linux kernels earlier than 5.0 the Huawei-WMI driver is not available, so the alternative method should be used.

details

You can make matebook-applet work using the -r command line option and two scripts as explained below. Any one of the scripts is enough, but you need both for full functionality. You may download them both in one archive here. Please note that these scripts are for MateBook 13 and will not work on other MateBooks (you can still get them to work by changing them to address EC registers proper for your particular model, but make sure you know exactly what you're doing, you've been warned).

Both scripts depend on ioport to work, so make sure to install it first. Debian packages are available in main repository, and there is a way to get it on Arch, too.

  • To get battery protection functionality:

    1. Download the batpro script, make it executable and copy to root executables path, i.e.:
      # mv batpro /usr/sbin/
      
    2. Allow your user to execute the script without providing sudo credentials. One way to do this would be to explicitly add sudoers permission (please be aware of possible security implications):
      # echo "your_username ALL = NOPASSWD: /usr/sbin/batpro" >> /etc/sudoers.d/batpro
      # chmod 0440 /etc/sudoers.d/batpro
      
    3. Double check that you can successfully run the script without providing additional authentication (i.e. password):
      $ sudo batpro status
      
  • To get Fn-Lock functionality:

    1. Download the fnlock script, make it executable and copy to root executables path, i.e.:

      # mv fnlock /usr/sbin/
      
    2. Allow your user to execute the script without providing sudo credentials. One way to do this would be to explicitly add sudoers permission (please be aware of possible security implications):

       # echo "your_username ALL = NOPASSWD: /usr/sbin/fnlock" >> /etc/sudoers.d/fnlock
       # chmod 0440 /etc/sudoers.d/fnlock
      
    3. Double check that you can successfully run the script without providing additional authentication (i.e. password):

       $ sudo fnlock status
      

Compiling matebook-applet

You can always download precompiled amd64 binary from the releases page, but it's also perfectly OK to compile matebook-applet yourself. Provided that you have the dependencies (GTK+ and libayatana-appindicator) installed (on Debian you can sudo apt install libgtk-3-dev libayatana-appindicator3-dev), all you need to do is:

$ git clone https://github.com/nekr0z/matebook-applet.git
$ cd matebook-applet
$ go build

To build against libappindicator instead, append the last command with -tags=legacy_appindicator.

Usage

The user interface is intentionally as simple as they get. You get an icon in system tray that you can click and get a menu. The menu consists of current status, options to change it, and an option to quit the applet. Please be aware that the applet does not probe for current status on its own (this is intentional), so if you change your battery protection settings by other means it will not reflect the change. Clicking on the status line (top of the menu) updates it.

The entry that shows current Fn-Lock status is clickable, too, that toggles Fn-Lock (from ON to OFF or vice versa). Again, no probing here, so if you change Fn-Lock status by other means it will not reflect the change until clicked, but then it will toggle Fn-Lock again.

Command line option -w launches the applet in windowed (app) mode, i.e.:

$ matebook-applet -w

Other command line options can be found on the included manpage:

$ man -l matebook-applet.1
  or, if you installed applet from repository or .deb package,
$ man matebook-applet

Gnome

As of Gnome 3.26 the "legacy tray" is removed. Launching the applet in windowed (app) mode still works. An extension is needed for the system tray icon to show up, for example AppIndicator.

Also, there is a separate native extension by another developer: Huawei WMI Controls, which provides an interface similar to matebook-applet.

Development

Pull requests are always welcome!

Contributing translations

In case you don't want to install any Go tools, the notion of having to use git scares you, and you don't feel like figuring out what a pull request is and how to make one, but you still feel like contributing a translation, just drop me an email, we'll figure something out. ;-)

The intended way to go about contributing translations to the project is using go-i18n tool. Make sure you have it installed and available, clone the repository, and:

$ cd assets/translations
$ ls
$ touch active.xx.toml

(where xx is your language)

$ goi18n merge active.*.toml

This will generate translate.xx.toml with all the lines that need to be translated to the language xx. Go ahead and translate it. Please make sure you delete all the messages you don't feel like translating before the next step, so that English messages don't creep in disguised as messages in your language.

$ goi18n merge active.*.toml translate.*.toml

Now all you've translated is in active.xx.toml and you can make a pull request.

Credits

This software includes the following software or parts thereof:

Translations:

Packages are built using fpm and changelog.

Big THANK YOU to Ayman Bagabas for all his work and support. Without him, there would be no matebook-applet.

Kudos to Rouven Spreckels for sorting out udev and systemd.

matebook-applet's People

Contributors

adcalleja avatar dependabot[bot] avatar egormanga avatar grigorenkopv avatar nekr0z avatar simonsolberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

matebook-applet's Issues

Wayland

Не работает с wayland.
✘ neon@neon-book  ~  sudo matebook-applet
[sudo] пароль для neon:
No protocol specified
Unable to init server: Не удалось подключиться к: В соединении отказано

(matebook-applet:3215): Gtk-WARNING **: 16:35:41.616: cannot open display: :0

Unable to locate package matebook-applet

после занесения в список источников:
deb [signed-by=/usr/share/keyrings/matebook-applet.key] http://evgenykuznetsov.org/repo/ stable main
а так же добавления ключа:
wget -qO - https://raw.githubusercontent.com/nekr0z/matebook-applet/master/matebook-applet.key | sudo tee /usr/share/keyrings/matebook-applet.key
Выполняю команду sudo apt install matebook-applet и получаю данное сообщение.
Ubuntu lts 20.04, Kernel: 5.13.0-51-generic (x86_64)

[linux 5.5] Driver interface is readable but not writeable.

As of linux 5.5, Huawei-WMI driver v3.3 is included by default (as such, I removed the separate package I had for it). However, when I run matebook-applet I get the following output:

$ matebook-applet
WARNING: 2020/01/23 14:50:56 driver.go:166: Driver interface is readable but not writeable.
ERROR: 2020/01/23 14:50:56 driver.go:324: failed to set thresholds
ERROR: 2020/01/23 14:50:56 driver.go:268: Failed to set min threshold
WARNING: 2020/01/23 14:50:56 driver.go:421: BP thresholds don't make sense: min 0%, max 0%
ERROR: 2020/01/23 14:50:56 driver.go:268: Failed to set min threshold

(matebook-applet:13789): Gdk-CRITICAL **: 14:50:56.382: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed
WARNING: 2020/01/23 14:51:03 driver.go:421: BP thresholds don't make sense: min 0%, max 0%

Running as root doesn't show these errors, but as you describe in #10, is a bad idea:

sudo matebook-applet

(matebook-applet:14000): libappindicator-WARNING **: 14:57:21.006: Unable to get the sessionbus: Error spawning command line “dbus-launch --autolaunch=095041c0c9cc4929b7a602f7852d5a45 --binary-syntax --close-stderr”: Child process exited with code 1

From #10, I can sort of gather that I need to add myself to a group (which makes sense), but for some reason you both decided to discuss the issue in Russian. Any fix? Do you think I configured something wrong?

(btw, I am runing 5.5rc-7, due to a very annoying i915 bug. It's probably out officially in a few days, anyway.)

KDE Plasma system tray applet

How to add widget loading to the system tray on Artix linux with kde plasma desktop and openrc initialization system ?

XF86Tools key not working suddenly

Hi for some reason ive just notice today, i couldnt do anything with the huawei logo key
but when i use the f10 buton and toggle fn.. it acts as f10...
Do you think they change the key from XF86Tools to something else?
please let me know thanks

Cannot run last applet on Archlinux

Hello, I have Matebook 14 2021 AMD Ryzen 5 version. I have battery issues on Archlinux KDE (kernel 5.14 and lts-5.10) so I want to try matebook-applet to solve my problems (system sometimes =KDE applet and console command upower -e= shows me battery is charging even if laptop is on battery only, baterry settings don't work, it behave like in AC power). Maybe that applet will help I think but I cannot start last version because dependency libayatana-appindicator. I install libappindicator but it still asks for libayatana-appindicator I try to build from AUR but have build error. I install matebook-applet from AUR but this version is old 2.5.0-1.
Regards,
Przemek

How is the battery protection different from generic limits?

Sorry if this is a naiive question, but I still don't quite understand after reading the documentation

How is the "battery protection" huawei specific? Under KDE (Kubuntu) I can go to the battery/power setting and put in any value for the maximum charge percentage. Is that functionally different from what this applet achieves? From reading the "Huawei WMI" repo README it sounds like there is something additional going on on the hardware level - but I guess I don't really get what haha

Thank you for releasing this and sorry for the ignorant question :)

This application for Windows

Hello! Does this applet use some special drivers from Huawei or just standard Linux libraries and drivers to limit battery charge? If the first one then maybe it is possible to create the same lightweight application for Windows to avoid using big voracious PC Manager.

Fedora

Hello, Could you please help me? Im trying to compile on Fedora 32 and I got this error:

$ go run build.go
Building version 2.4.8.7+g75d7100
Building as of 2020-05-19 08:34:54 +0200 CEST
go build: when using gccgo toolchain, please pass linker flags using -gccgoflags, not -ldflags
# github.com/nekr0z/matebook-applet
/usr/bin/ld: $WORK/b001/_pkg1_.a(_cgo_defun.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: $WORK/b001/_pkg2_.a(_cgo_defun.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
collect2: error: ld returned 1 exit status
2020/06/25 11:03:26 failed to build binary
exit status 1

Cant find how to fix this problem.

Support MacOS

People are running MacOS on Matebooks, and it looks like matebook-applet would be welcome there.

It should be relatively easy to add MacOS-specific endpoints and have them probed when running the applet on MacOS. All our dependencies support MacOS, so there shouldn't be a problem.

Two things prevent me from implementing this straight away:

  1. Their current way of doing things doesn't allow to set arbitrary thresholds. Setting arbitrary thresholds is more versatile and is our preferred way of interacting with endpoints. It can be worked around, but I'd prefer not to if there's a way.
  2. It's unclear how to get the currently set values on MacOS.

lacks manpage

matebook-applet lacks a manpage, which would be welcome for packaging.

Error setting thresholds on Matebook 14 2020 AMD

Hello, I am on Matebook 14 2020 AMD.I cant seem to get matebook-applet to work. It worked fine on my D14. I tried running as root and fixing the perms.

Logs:

INFO: 2020/11/19 12:30:51 main.go:61: matebook-applet version 2.4.8
TRACE: 2020/11/19 12:30:51 driver.go:135: Fn-lock is OFF
TRACE: 2020/11/19 12:30:51 driver.go:197: Checking if the fnlock endpoint is writable...
TRACE: 2020/11/19 12:30:51 driver.go:135: Fn-lock is OFF
TRACE: 2020/11/19 12:30:51 driver.go:161: successful write to driver interface
INFO: 2020/11/19 12:30:51 main.go:104: Found writable fnlock endpoint, will use it
TRACE: 2020/11/19 12:30:51 driver.go:241: got values from interface: [0 0]
TRACE: 2020/11/19 12:30:51 driver.go:262: interpreted values: min 0%, max 0%
TRACE: 2020/11/19 12:30:51 driver.go:192: Checking if the threshold endpoint is writable...
TRACE: 2020/11/19 12:30:51 driver.go:241: got values from interface: [0 0]
TRACE: 2020/11/19 12:30:51 driver.go:262: interpreted values: min 0%, max 0%
ERROR: 2020/11/19 12:30:51 driver.go:324: failed to set thresholds
TRACE: 2020/11/19 12:30:51 driver.go:229: Couldn't access "/sys/devices/platform/huawei-wmi/charge_thresholds".
TRACE: 2020/11/19 12:30:51 driver.go:262: interpreted values: min 0%, max 0%
TRACE: 2020/11/19 12:30:51 driver.go:192: Checking if the threshold endpoint is writable...
TRACE: 2020/11/19 12:30:51 driver.go:262: interpreted values: min 0%, max 0%
ERROR: 2020/11/19 12:30:51 driver.go:268: Failed to set min threshold
TRACE: 2020/11/19 12:30:51 driver.go:292: Couldn't access "/sys/class/power_supply/BAT1/charge_control_start_threshold".
TRACE: 2020/11/19 12:30:51 driver.go:292: Couldn't access "/sys/class/power_supply/BAT2/charge_control_start_threshold".
TRACE: 2020/11/19 12:30:51 driver.go:292: Couldn't access "/sys/class/power_supply/BAT3/charge_control_start_threshold".
TRACE: 2020/11/19 12:30:51 driver.go:292: Couldn't access "/sys/class/power_supply/BAT4/charge_control_start_threshold".
TRACE: 2020/11/19 12:30:51 driver.go:292: Couldn't access "/sys/class/power_supply/BAT5/charge_control_start_threshold".
TRACE: 2020/11/19 12:30:51 driver.go:292: Couldn't access "/sys/class/power_supply/BAT6/charge_control_start_threshold".
TRACE: 2020/11/19 12:30:51 driver.go:292: Couldn't access "/sys/class/power_supply/BAT7/charge_control_start_threshold".
TRACE: 2020/11/19 12:30:51 driver.go:292: Couldn't access "/sys/class/power_supply/BAT8/charge_control_start_threshold".
TRACE: 2020/11/19 12:30:51 driver.go:292: Couldn't access "/sys/class/power_supply/BAT9/charge_control_start_threshold".
TRACE: 2020/11/19 12:30:51 main.go:71: looking for endpoint to save thresholds to...
TRACE: 2020/11/19 12:30:51 driver.go:241: got values from interface: [0 0]
TRACE: 2020/11/19 12:30:51 driver.go:262: interpreted values: min 0%, max 0%
INFO: 2020/11/19 12:30:51 main.go:75: Persistence thresholds values endpoint found.
TRACE: 2020/11/19 12:30:51 applet.go:35: Setting up menu...
INFO: 2020/11/19 12:30:51 applet.go:143: Couldn't get custom icon, falling back to default
TRACE: 2020/11/19 12:30:51 driver.go:262: interpreted values: min 0%, max 0%
WARNING: 2020/11/19 12:30:51 driver.go:421: BP thresholds don't make sense: min 0%, max 0%
TRACE: 2020/11/19 12:30:51 driver.go:192: Checking if the threshold endpoint is writable...
TRACE: 2020/11/19 12:30:51 driver.go:262: interpreted values: min 0%, max 0%
ERROR: 2020/11/19 12:30:51 driver.go:268: Failed to set min threshold
TRACE: 2020/11/19 12:30:51 applet.go:60: no way to change BP settings, not showing the corresponding GUI
TRACE: 2020/11/19 12:30:51 driver.go:135: Fn-lock is OFF
TRACE: 2020/11/19 12:30:51 applet.go:69: Menu is now ready
TRACE: 2020/11/19 12:30:51 applet.go:103: Setting up GUI thread...

Files on /sys/devices/platform/huawei-wmi
charge_control_thresholds driver driver_override fn_lock_state input leds modalias power subsystem uevent

Error setting thresholds on Matebook 16

Hi,
I'm under Arch Linux actually and either compiling or using AUR one i have the same issue:
The upper limit is met, but not the lower one. Example it charges up to 70% however if at 50% I plug in it still charges until 70%.

Here is the log:

INFO: 2022/11/28 10:23:16 main.go:63: matebook-applet version custom-build
TRACE: 2022/11/28 10:23:16 driver.go:135: Fn-lock is OFF
TRACE: 2022/11/28 10:23:16 driver.go:197: Checking if the fnlock endpoint is writable...
TRACE: 2022/11/28 10:23:16 driver.go:135: Fn-lock is OFF
TRACE: 2022/11/28 10:23:16 driver.go:161: successful write to driver interface
INFO: 2022/11/28 10:23:16 main.go:106: Found writable fnlock endpoint, will use it
TRACE: 2022/11/28 10:23:16 driver.go:241: got values from interface: [40 70]
TRACE: 2022/11/28 10:23:16 driver.go:262: interpreted values: min 40%, max 70%
TRACE: 2022/11/28 10:23:16 driver.go:192: Checking if the threshold endpoint is writable...
TRACE: 2022/11/28 10:23:16 driver.go:241: got values from interface: [40 70]
TRACE: 2022/11/28 10:23:16 driver.go:262: interpreted values: min 40%, max 70%
TRACE: 2022/11/28 10:23:16 driver.go:326: successful write to driver interface
INFO: 2022/11/28 10:23:16 main.go:121: Found writable battery thresholds endpoint, will use it
TRACE: 2022/11/28 10:23:16 main.go:73: looking for endpoint to save thresholds to...
TRACE: 2022/11/28 10:23:16 driver.go:241: got values from interface: [40 70]
TRACE: 2022/11/28 10:23:16 driver.go:262: interpreted values: min 40%, max 70%
INFO: 2022/11/28 10:23:16 main.go:77: Persistence thresholds values endpoint found.
TRACE: 2022/11/28 10:23:16 applet.go:38: Setting up menu...
INFO: 2022/11/28 10:23:16 applet.go:146: Couldn't get custom icon, falling back to default
TRACE: 2022/11/28 10:23:16 driver.go:241: got values from interface: [40 70]
TRACE: 2022/11/28 10:23:16 driver.go:262: interpreted values: min 40%, max 70%
TRACE: 2022/11/28 10:23:16 driver.go:192: Checking if the threshold endpoint is writable...
TRACE: 2022/11/28 10:23:16 driver.go:241: got values from interface: [40 70]
TRACE: 2022/11/28 10:23:16 driver.go:262: interpreted values: min 40%, max 70%
TRACE: 2022/11/28 10:23:16 driver.go:326: successful write to driver interface
TRACE: 2022/11/28 10:23:16 driver.go:135: Fn-lock is OFF
TRACE: 2022/11/28 10:23:16 applet.go:72: Menu is now ready
TRACE: 2022/11/28 10:23:16 applet.go:106: Setting up GUI thread...

Here some additional info:

cat /sys/devices/platform/huawei-wmi/charge_control_thresholds
→ 40 70

Missing Setting-icon.png

It's complaining about a missing icon. I'm on version 1.2.2

INFO: 2019/04/26 21:29:58 main.go:83: matebook-applet version custom-build
TRACE: 2019/04/26 21:29:58 main.go:194: Checking to see if Huawei-WMI driver interface is accessible
INFO: 2019/04/26 21:29:58 main.go:201: driver interface is readable
INFO: 2019/04/26 21:29:58 main.go:208: successful write to driver interface
INFO: 2019/04/26 21:29:58 main.go:86: will use driver interface
TRACE: 2019/04/26 21:29:58 main.go:102: Setting up menu...
ERROR: 2019/04/26 21:29:58 main.go:451: open /Settings-icon.png: file does not exist
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6400d4]

goroutine 19 [running]:
main.getIcon(0x6d7457, 0x12, 0x0, 0x0, 0x0)
	/home/ayman/.build/matebook-applet/main.go:453 +0xe4
main.onReady()
	/home/ayman/.build/matebook-applet/main.go:103 +0xa0
github.com/getlantern/systray.Run.func2(0xc0000dc0c0, 0x6ea418)
	/home/ayman/go/pkg/mod/github.com/getlantern/[email protected]/systray.go:67 +0x3e
created by github.com/getlantern/systray.Run
	/home/ayman/go/pkg/mod/github.com/getlantern/[email protected]/systray.go:65 +0xf0

Driver interface is readable but not writeable.

Hi, I tried using a matebook applet, but I get this error.

WARNING: 2020/07/05 17:42:31 driver.go:166: Driver interface is readable but not writeable. ERROR: 2020/07/05 17:42:31 driver.go:324: failed to set thresholds ERROR: 2020/07/05 17:42:31 driver.go:268: Failed to set min threshold ERROR: 2020/07/05 17:42:31 driver.go:268: Failed to set min threshold WARNING: 2020/07/05 17:42:31 driver.go:166: Driver interface is readable but not writeable.

My laptop is 2020 Huawei Matebook 13 AMD Ryzen 5.
Can you help me? What should I do?

applet not able to change battery settings on matebook-2020 (intel i7)

The applet is not able to change bettery settings and does not show the menu :

TRACE: 2020/12/12 01:26:29 driver.go:262: interpreted values: min 40%, max 70%
ERROR: 2020/12/12 01:26:29 driver.go:268: Failed to set min threshold
TRACE: 2020/12/12 01:26:29 applet.go:60: no way to change BP settings, not showing the corresponding GUI

Screenshot from 2020-12-12 01-28-18

Migrate to the Ayatana (App)Indicator(s) for newer Debian versions

While trying to install matebook-applet into Debian Bullsye (11, testing) have problem with package dependency

$ sudo apt install matebook-applet

...

The following packages have unmet dependencies:
 matebook-applet : Depends: libappindicator3-1 but it is not installable
E: Unable to correct problems, you have held broken packages.

Found this bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895037
So, as I can understand there will no support for libappindicator3-1 in the newer Debian (Debian derivatives?)

Additional info:

$ uname -a
Linux laptop 5.10.0-3-amd64 #1 SMP Debian 5.10.13-1 (2021-02-06) x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux bullseye/sid
Release:	testing
Codename:	bullseye

udev rule works only sometimes

Sometimes after rebooting the udev rule doesn't change ownership/permission of charge_thresholds/fn_lock_state. I haven't found log files, but I assume it is a race condition because mostly it works. Maybe when the huawei-wmi folder is created in sysfs, it triggers the rule before the files charge_thresholds/fn_lock_state have been created.

Not shipping udev rules with the applet

The applet requires /sys/devices/platform/huawei-wmi/ hooks to be user-writeable to be fully functional. This can be achieved by udev rules, and those need to be shipped (along with installation instruction).

Функционал по ограничению порогов заряда/разряда батареи не работает

Установил апплет, через matebooc-applet -w вызвал оболочку и выбрал режим HOME. никакой реакции. Выставил пороги в Custom - аналогично полный игнор со стороны ноутбука. подскажите пожалуйста, в чем может быть загвоздка? А вот режим Fn-Lock отрабатывает на УРА

When are charge thresholds reset?

I'm on a MateBook D 14" AMD and I've noticed that the charge thresholds are reset to OFF (0 100) after some reboots or maybe a longer power off period, not sure. Is it known when exactly this happens? Does this also happen to other models?

What if the applet would additionally write the actual charge thresholds to a file each time the user changes them? This file could be read by a udev rule to initialize the sysfs attribute on boot. Alternatively a file could be stored at /etc/default/huawei-wmi and is edited manually. (A simple ATTR{charge_thresholds}="40 70" is good enough for me.)

BP thresholds don't make sense: min 0%, max 0%

Hey there, I'm running this on a brand new MateBook 13 2020, and I'm consistently getting this error: BP thresholds don't make sense: min 0%, max 0%

Here's the full output of `matebook-applet -vv`
INFO: 2020/12/18 02:41:52 main.go:61: matebook-applet version 2.4.8
TRACE: 2020/12/18 02:41:52 driver.go:135: Fn-lock is OFF
TRACE: 2020/12/18 02:41:52 driver.go:197: Checking if the fnlock endpoint is writable...
TRACE: 2020/12/18 02:41:52 driver.go:135: Fn-lock is OFF
TRACE: 2020/12/18 02:41:52 driver.go:161: successful write to driver interface
INFO: 2020/12/18 02:41:52 main.go:104: Found writable fnlock endpoint, will use it
TRACE: 2020/12/18 02:41:52 driver.go:241: got values from interface: [0 0]
TRACE: 2020/12/18 02:41:52 driver.go:262: interpreted values: min 0%, max 0%
TRACE: 2020/12/18 02:41:52 driver.go:192: Checking if the threshold endpoint is writable...
TRACE: 2020/12/18 02:41:52 driver.go:241: got values from interface: [0 0]
TRACE: 2020/12/18 02:41:52 driver.go:262: interpreted values: min 0%, max 0%
TRACE: 2020/12/18 02:41:52 driver.go:326: successful write to driver interface
INFO: 2020/12/18 02:41:52 main.go:119: Found writable battery thresholds endpoint, will use it
TRACE: 2020/12/18 02:41:52 main.go:71: looking for endpoint to save thresholds to...
TRACE: 2020/12/18 02:41:52 driver.go:241: got values from interface: [0 0]
TRACE: 2020/12/18 02:41:52 driver.go:262: interpreted values: min 0%, max 0%
INFO: 2020/12/18 02:41:52 main.go:75: Persistence thresholds values endpoint found.
TRACE: 2020/12/18 02:41:52 applet.go:35: Setting up menu...
INFO: 2020/12/18 02:41:52 applet.go:143: Couldn't get custom icon, falling back to default
TRACE: 2020/12/18 02:41:52 driver.go:241: got values from interface: [0 0]
TRACE: 2020/12/18 02:41:52 driver.go:262: interpreted values: min 0%, max 0%
WARNING: 2020/12/18 02:41:52 driver.go:421: BP thresholds don't make sense: min 0%, max 0%
TRACE: 2020/12/18 02:41:52 driver.go:192: Checking if the threshold endpoint is writable...
TRACE: 2020/12/18 02:41:52 driver.go:241: got values from interface: [0 0]
TRACE: 2020/12/18 02:41:52 driver.go:262: interpreted values: min 0%, max 0%
TRACE: 2020/12/18 02:41:52 driver.go:326: successful write to driver interface
TRACE: 2020/12/18 02:41:52 driver.go:135: Fn-lock is OFF
TRACE: 2020/12/18 02:41:52 applet.go:69: Menu is now ready
TRACE: 2020/12/18 02:41:52 applet.go:103: Setting up GUI thread...

I couldn't find any solution to this in the existing issues, any help would be appreciated!

Windows look awful

The windows that applet opens (the one that opens when "CUSTOM" is clicked, as well as the main window of windowed mode) don't look good. Controls are poorly aligned and look almost as if they were put in the window with no aesthetics but pure functionality in mind (which happens to actually be true).

This can and should be fixed, but requires at least a sketch of what a better arrangement of controls should look like. I'm not fit for that (hey, I did what I did the way I did it for the reason: I'm totally not a visual person).

Window option

I'd love to see an option to disable the applet and use a simple window to control battery and fn-lock.

Icon distorted in Mate

The tray icon is huge on Ubuntu Mate 18. Different themes do not change this issue. Is there a way to force scaling?

Screenshot at 2019-09-24 14-37-49

Edit: The black/grey thing is the icon. easy to find but takes up a bit much space

Applet Icon

The applet icon appears to not work properly initially on Ubuntu-Mate. After some time the icon seems to fix itself, so it's not the end of the earth - but seems to be a minor bug.

Screenshot at 2020-12-02 13-32-58

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.