Disable message on unplugging the charger

Is it possible, to permanently disable the annoying message “Ziehen Sie das Ladegerät aus der Steckdose, um Energie zu sparen” (German language system), engl. “Unplug the charger to save energy”, that appears every time unplugging the charging cable from the phone?

I found no possibility for this in the available settings of the telephone.

Is this possible by some “system hack” as root?

Thanks and greetings!

5 Likes

Never tried it, but I found /usr/share/lipstick/notificationcategories/x-nemo.battery.removecharger.conf…

Maybe could remove that file and see what happens…

Or, I notice one of the lines is “timeout: 6000”, which is probably meaning it will show for 6 seconds, or something, so you could try changing that to “timeout: 1” or something, and it would flash so fast that you wouldn’t see it…

6 Likes

In this file there is an entry

expireTimeout=60000

I changed the value to 5000, saved, and then reboot the phone.
Result: no change of the time of this message, the same as before.

A further question is, where (in which file) are the message texts stored? I would like to modify them.

1 Like

I would not be surprised if the message is something that is required to be displayed by some EU legislation.

1 Like

Yes, as I know, this is a EU regulation.
But in a Linux based open source phone, it should be possible to access the config files and change the appearing text and the time of appearence.
So I hope to find this config files with the help from the community or if I find them for myself, I will communicate here.

Agree, it’s very annoying.

1 Like

I did a grep over most of /usr and the only real hit came up is in /usr/lib/liblipstick-qt5.so.0.

So unless someone comes up with a clever LD_PRELOAD hack I doubt hacking it away will be possible.

That being said, setting the Urgency to 0 instead of 2 in the notification category file should at least create a chance of it not popping up.

1 Like

If we’re talking about it…
Low battery notification is annoying as hell, too, because it hides the current battery level.
So when I look at it, I have to wait 3 seconds or so before I can finally see the battery level and decide if it can wait.
Why don’t leave the battery level showing when displaying this notification?

I was thinking the same… Seems like libusb-moded-qt5.so.1.9.0 might be involved …

Looking at this screenshot, with my “knowledge” in programming, I will surely have no success trying to edit it…
I hope that maybe one of the developers will reveal to the community, in which file these messages are stored! I guess, it is a file related to the installed language version containing text data and not a common file containing some program code.
In the german version, there appears a long text: “Zieh das Ladegerät aus der Steckdose heraus, um Energie zu sparen”. (English: “Pull out the charger from the wall outlet, to save energy”).

I’m just wondering what’s so important about it. It seems like a nice finger exercise to me, but I don’t see the benefit. When I unplug the charger, the device is fully charged. I know it. The message doesn’t bother me. When the low battery message appears, it is time to charge the battery? If there is no charger nearby, I turn off the phone. It doesn’t have to be down to 1% discharged.

1 Like

Its a sign of nannyfication. I do not want to be permanently exhorted what I have to do or not to do. Its really very annoying to me.

Oh sorry. That is not my intention. I am curious, nothing more.

You can tap on it (as well as any other system notification) to hide it so you don’t necessarily have to wait 3 seconds, but I agree it’s annoying either way.

1 Like

Now I tried and searched a lot with the grep command, also recursive, for the word “Steckdose”, to find out in what file this message is stored. Unfortunately, I found nothing.

But the grep command can only find ascii strings. Maybe this message is coded in some unicode style, so therefore it could not be found by ascii search?

The strings may be in a binary language resource file and accessed by code or name. Search in binaries too.

1 Like

usr/share/translations

Look at all files " * -de.dm"

1 Like

I changed the value to 1, and it comes and goes much quicker…

1 Like

Correct, as @4carlos said.
Check

cat /usr/share/translations/*de.qm | grep -Hno S.t.e.c.k.d.o.s.e

Now it is up to you to find the correct file and tamper with it :slight_smile:
(but I’d go with @Levone1)

2 Likes

Success!!

In the file
/usr/share/translations/lipstick-de.qm is the message text hidden between 00 h bytes.
I copied the file to my laptop and edited it with a hex-editor. Very inportant is to use overwrite mode and not insert mode, delete nothing and add nothing, only change the existing letters into the new ones. Start with the new message at the first letter position of the existing message, 31B h. Between the letters is always a 00 h Fill the rest of the letters with 20 h but do not delete anything else!

If the size of the file changes, the system will not accept it and english text appears.

After my first attempt I was happy that I have made a safety copy of the original file!

I typed in my name (to give a little bit more individuality and as a proof of ownership…)
and " - Ladegerät ausgesteckt". ä is E4 h, Komma is 2C h, - is 2D h.

Thanks very much! :slight_smile:

2 Likes