Nixpkgs: High CPU utilization in Blueman 2.1.1 and no tray-icon

Created on 20 Oct 2019  路  9Comments  路  Source: NixOS/nixpkgs

Describe the bug
Since upgrading to NixOS 19.09, I started to notice a higher CPU utilization than normal in my notebooks running it (this was clear by the fast battery consumption and my fans running more frequently than normal). Also, Bluetooth tray-icon disappeared (I use i3wm as my desktop manager).

Today I took sometime to investigate this issue and traced it to Blueman 2.1.1. I decided to downgrade Blueman 2.0.8 and my tray-icon came back and CPU usage is down.

To Reproduce
This bug probably needs Bluetooth hardware to reproduce.
Steps to reproduce the behavior:

  1. Add hardware.bluetooth.enable = true and environment.systemPackages = [ pkgs.blueman ]; to your /etc/nixos/configuration.nix
  2. At least in i3wm, the Bluetooth tray-icon does not appear anymore
  3. Look at the CPU utilization of Blueman process (using something like ps aux | grep '[b]lueman'). You will see spikes of more than 20% CPU utilization, that is clearly abnormal

Expected behavior
The Bluetooth icon should appear and CPU utilization should be low.

Additional context
Using the old Blueman recipe from NixOS 19.03 makes everything work as it should again: https://github.com/NixOS/nixpkgs/blob/nixos-19.03/pkgs/tools/bluetooth/blueman/default.nix

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.3.6, NixOS, 19.09.840.8bf142e001b (Loris)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3
  • channels(root): "nixos-19.09.840.8bf142e001b"
  • channels(thiagoko): ""
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos
bug nixos

All 9 comments

@thiagokokada Can you use services.blueman.enable?

I'm asking this because, the module adds configuration for the systemd services, which I suspect were added in newer releases.

So your system won't have the services blueman-applet.service or blueman-mechanism.service running. Which could likely be why the applet is gone for you.

@worldofpeace Thanks. This doesn't seem to be documented in release notes, would have added if I saw this there.

My icon is back and CPU usage seems ok for now. Still checking the later, though.

@thiagokokada :rofl: As I read this issue I started writing and committing 9200a7fd1ff6787cf4a10acc94e03632769f25d6

I have also seen a lot of errors in console when the module wasn't enabled. Should we open an upstream issue?

@jtojnar I believe that's just because without the module the needed systemd services aren't running.
Do you think an issue should be opened for it to straight fail if the services aren't running?

Yeah. It is a broken installation but IMHO, well written software should handle everything up to hardware failure gracefully. There might be also other reasons why the service might not be available, being accidentally disabled comes to mind.

Yeah. It is a broken installation but IMHO, well written software should handle everything up to hardware failure gracefully. There might be also other reasons why the service might not be available, being accidentally disabled comes to mind.

Exactly, it should be failing gracefully instead of eating up your cpu like here. Currently doesn't communicate essential services are not running.

I will close this issue since it is solved for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

copumpkin picture copumpkin  路  3Comments

ghost picture ghost  路  3Comments

grahamc picture grahamc  路  3Comments

langston-barrett picture langston-barrett  路  3Comments

sid-kap picture sid-kap  路  3Comments