You are not logged in.

#1 2023-10-18 06:28:17

qwerty812
Member
Registered: 2023-07-05
Posts: 9

upowerd process causing lots of disk writes

Hi!
I recently noticed with `iotop` that the process `upowerd` causes 100+ MB disk writes each hour.
Me and another used managed to understand the issue was present only when using bluetooth HID devices (like mouses or keyboards).
Under

/var/lib/upower

I have many files, each related to discharge rate and battery percentage for each device.
For example one of my files there is `history-rate-Tastiera_di_27-90:84:0d:fb:19:7c.dat` which contains more than 4000 lines. Here are some of the last ones:

1697547621	0.000	unknown
1697547621	94.000	discharging
1697547651	0.000	unknown
1697547651	94.000	discharging
1697547681	0.000	unknown
1697547681	94.000	discharging
1697547711	0.000	unknown
1697547711	94.000	discharging
1697547741	0.000	unknown
1697547741	94.000	discharging
1697547771	0.000	unknown
1697547771	94.000	discharging
1697547801	0.000	unknown
1697547801	94.000	discharging
1697547831	0.000	unknown
1697547831	94.000	discharging
1697547861	0.000	unknown
1697547861	94.000	discharging
1697547891	0.000	unknown
1697547891	94.000	discharging
1697547922	0.000	unknown
1697547922	94.000	discharging
1697547952	0.000	unknown
1697547952	94.000	discharging
1697547982	0.000	unknown
1697547982	94.000	discharging

where "Tastiera-di-27" is a bluetooth keyboard. A similar file (this time with only 0s is there for battery discharge rate which I think the device doesn't report). Of course there are also similar files regarding laptop battery.
I found a similar issue here which regards disk writes when battery is low (and then reports the value very often).
Is this a known issue and are there any workarounds such as avoid logging battery status for some devices? Can I in alternative mount the folder as a tmpfs in RAM in order to avoid excessive writes?

Thanks!

Offline

#2 2023-10-18 10:29:18

grem75
Member
Registered: 2017-10-01
Posts: 1

Re: upowerd process causing lots of disk writes

Same thing is happening for me with Logitech Unifying stuff, even if the mouse is turned off. As long as the receiver is plugged in I'm getting repeated battery updates. Only way to stop it is unpair them or unplug the receiver.

Offline

#3 2023-10-19 23:07:49

solskog
Member
Registered: 2020-09-05
Posts: 426

Re: upowerd process causing lots of disk writes

qwerty812 wrote:

Can I in alternative mount the folder as a tmpfs in RAM in order to avoid excessive writes?

Could you try this?

# cat /etc/fstab
tmpfs /var/lib/upower tmpfs nosuid,noexec 0 0
...

Offline

#4 2023-10-20 14:30:21

qwerty812
Member
Registered: 2023-07-05
Posts: 9

Re: upowerd process causing lots of disk writes

Sure, that was what I would have done next, didn't know if it was too "brutal" or if it was a good solution
.
Are there any upower config files where we can exclude some device from "logging" or maybe some ways to reduce "verbosity"?

I'll let you know with upower in RAM as you suggested.

Thanks!

Offline

#5 2023-10-21 00:49:03

solskog
Member
Registered: 2020-09-05
Posts: 426

Re: upowerd process causing lots of disk writes

/etc/UPower/UPower.conf

Not anything more then what states in the config file.

Offline

Board footer

Powered by FluxBB