Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Power Applet not showing label text on laptop with more than one battery (suggested fix included) #4979

Open
razziel89 opened this Issue Jan 1, 2016 · 9 comments

Comments

Projects
None yet
4 participants
@razziel89
Copy link

razziel89 commented Jan 1, 2016

On Linux Mint 17.3 running Cinnamon 2.8.6, I noticed that the power applet does not show any label text on my Lenovo T440s, which has two batteries. The only thing I get is some tooltip that's just a summary of the current state. Moreover, explicitly configuring the applet to show "percentage and time remaining" also did not show any label text. In earlier versions of Cinnamon (or rather the applet), the applet at least showed the state of one of the batteries.

I edited the JavaScript file and attached the result, which works for me. I would like to suggest to include the changes I made to that file in the next release. A short summary of the changes I made:

  • always show information about all devices separated by " | " in the label and the tooltip
  • fix a bug that caused some devices to be reported multiple times by the system (i.e. this._devices contained some devices more than once, devices are screened by their device_id)
  • show time information only for the device that is currently in use (determined by comparing the time-to-full or time-to-empty reported by the system to the value at the last update of the label text)

It might need some further work to be a viable replacement for everybody since two numbers are hard-coded to work for my device. I would like to help with that but I am unsure about what to do exactly since some config-options might have to be added to the GUI. I attached a screenshot of the result.

power_applet.txt
powerappletfix

@razziel89 razziel89 changed the title Power Applet not showing label text on laptop with more than one battery Power Applet not showing label text on laptop with more than one battery (suggested fix included) Jan 1, 2016

@luyikei

This comment has been minimized.

Copy link
Contributor

luyikei commented Jan 5, 2016

Thank you for your suggestion. Did you create a pull request? If you did not, you should try to create one because developers can easily examine your suggestion or code. Making a pull request can be boring, but it is worth doing!

@razziel89

This comment has been minimized.

Copy link
Author

razziel89 commented Jan 12, 2016

I was kind of hoping to get in touch with the devs first to see whether any more changes should be made to the applet (I think there should be and I would not mind incorporating them, if possible) before its actually transferred anywhere. And since I have never created a pull request on Github, I was not sure whether I should create one for an applet that's not yet fully done. What is your advice? Thanks in advance!

@luyikei

This comment has been minimized.

Copy link
Contributor

luyikei commented Jan 12, 2016

Now I understand your point. Why don't you join IRC: #linuxmint-dev on irc.spotchat.org to discuss your fix with the dev team?

@razziel89

This comment has been minimized.

Copy link
Author

razziel89 commented Jan 12, 2016

Right, will do when I find the time (sometime at the end of this week maybe). That's the same channel where people pointed me to the project's github page. Thanks again.

@luyikei

This comment has been minimized.

Copy link
Contributor

luyikei commented Jan 12, 2016

Also, you should change the title into more feature-request-like one to let the developers know that you are ready to make a pull request. By doing so, it would be more likely that the developers will notice the need to discuss this suggestion.

@lucascosti

This comment has been minimized.

Copy link

lucascosti commented Aug 30, 2016

On Linux Mint 17.3 running Cinnamon 2.8.6, I noticed that the power applet does not show any label text on my Lenovo T440s, which has two batteries. The only thing I get is some tooltip that's just a summary of the current state. Moreover, explicitly configuring the applet to show "percentage and time remaining" also did not show any label text. In earlier versions of Cinnamon (or rather the applet), the applet at least showed the state of one of the batteries.

+1 to this. I have a T440s on Fedora 23 with Cinnamon 3.0.7.

Previous versions used to be useful with the label when one of the batteries was discharging, but now it doesn't show any label at all.

Added some screenshots, the applet is set to "show percentage and time remaining":

1st Battery Charging:

1-charging

1st battery discharging:

1-discharging
1-discharging2

2nd Battery discharging:

2-discharging

2nd battery charging (note that the lower battery is being charged first, so the time shown in the applet is not accurate):

2-charging

@razziel89

This comment has been minimized.

Copy link
Author

razziel89 commented Sep 9, 2016

HI. I finally managed to get back to this. Could anyone please give me a very brief tutorial about how to create a pull request in this case? As I said the version is not perfectly final, yet, but since it works for my laptop it's probably worth a show. Thank you very much.

@lucascosti

This comment has been minimized.

Copy link

lucascosti commented Sep 11, 2016

@razziel89

Have a look at: https://help.github.com/articles/creating-a-pull-request/

But to summarize the workflow from the scratch:

  1. Fork the Cinnamon project on GitHub.
  2. In your fork, create a branch for the change.
  3. Make the changes in your branch, and commit the changes.
  4. Submit a pull request from your branch as in the link above.

Google should help you do each of the above steps. Thanks for the work in trying to get this fixed :).

@neonpixii

This comment has been minimized.

Copy link

neonpixii commented Nov 29, 2018

This is still a problem for me; and it makes using cinnamon very annoying because i can't see where my battery is really at. any word of a fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.