[hirsute/impish] Can't turn bluetooth on again after turning it off

Bug #1926062 reported by Jatin Kumar
126
This bug affects 19 people
Affects Status Importance Assigned to Milestone
Bluez Utilities
Fix Released
Unknown
GNOME Bluetooth
Fix Released
Unknown
OEM Priority Project
Fix Released
Critical
Andy Chi
bluez (Ubuntu)
Fix Released
High
Daniel van Vugt
Focal
Fix Released
High
Andy Chi
Hirsute
Fix Released
High
Andy Chi
Impish
Fix Released
High
Daniel van Vugt
gnome-settings-daemon (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Andy Chi
Hirsute
Fix Released
Undecided
Andy Chi
Impish
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

On/off of Bluetooth in gnome-control-center will not work properly in kernels 5.11 (approximately) onward. Devices are not refreshed in the list anymore.

[Test Plan]

1. Open gnome-control-center and select Bluetooth
2. Turn off Bluetooth via UI
3. Turn on Bluetooth via UI

Expect: Device list appears, so Bluetooth really is on.

[Where problems could occur]

Since the fix involves the 'rfkill' logic it has the potential to affect any Bluetooth or Wifi on/off setting.

[Other info]

Upstream bug in gnome-bluetooth:
https://gitlab.gnome.org/GNOME/gnome-bluetooth/-/issues/38

Discussion in linux-bluetooth:
https://marc.info/?t=162004758900003&r=1&w=2

[Original bug report]

When ever i Turn on my system or restart bluetooth is open any it connects to any device. But when i turn off bluetooth and try to turn it on again. it neither turns on nor scans/connects to any device. This is happening since I updated my system to ubuntu 21.04 LTS

  Bluetooth: hci0: HCI reset during shutdown failed

ProblemType: Bug
DistroRelease: Ubuntu 21.04
Package: bluetooth (not installed)
ProcVersionSignature: Ubuntu 5.11.0-16.17-generic 5.11.12
Uname: Linux 5.11.0-16-generic x86_64
ApportVersion: 2.20.11-0ubuntu65
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Sun Apr 25 15:09:23 2021
InstallationDate: Installed on 2020-12-15 (130 days ago)
InstallationMedia: Ubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
InterestingModules: rfcomm bnep btusb bluetooth
MachineType: LENOVO 80TR
ProcEnviron:
 LANGUAGE=en_IN:en
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_IN
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.11.0-16-generic root=UUID=7c507bd4-c66c-4233-a64e-804f6df5412b ro quiet splash vt.handoff=7
SourcePackage: bluez
UpgradeStatus: Upgraded to hirsute on 2021-04-22 (2 days ago)
dmi.bios.date: 07/31/2017
dmi.bios.release: 1.29
dmi.bios.vendor: LENOVO
dmi.bios.version: 3UCN29WW
dmi.board.asset.tag: No Asset Tag
dmi.board.name: Nano 5B1
dmi.board.vendor: LENOVO
dmi.board.version: No DPK
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Lenovo ideapad 110-15AST
dmi.ec.firmware.release: 1.29
dmi.modalias: dmi:bvnLENOVO:bvr3UCN29WW:bd07/31/2017:br1.29:efr1.29:svnLENOVO:pn80TR:pvrLenovoideapad110-15AST:rvnLENOVO:rnNano5B1:rvrNoDPK:cvnLENOVO:ct10:cvrLenovoideapad110-15AST:
dmi.product.family: IDEAPAD
dmi.product.name: 80TR
dmi.product.sku: LENOVO_MT_80TR_BU_idea_FM_Lenovo ideapad 110-15AST
dmi.product.version: Lenovo ideapad 110-15AST
dmi.sys.vendor: LENOVO
hciconfig:
 hci0: Type: Primary Bus: USB
  BD Address: C8:3D:D4:84:E0:06 ACL MTU: 820:8 SCO MTU: 255:16
  DOWN
  RX bytes:744804 acl:76 sco:0 events:105989 errors:0
  TX bytes:51871528 acl:113157 sco:0 commands:192 errors:0

Revision history for this message
Jatin Kumar (fraznistpunk) wrote :
information type: Public → Public Security
information type: Public Security → Public
affects: bluez (Ubuntu) → linux (Ubuntu)
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
summary: - I am unable to open/close/connect/scan bluetooth
+ [ideapad_bluetooth] I am unable to open/close/connect/scan bluetooth
summary: - [ideapad_bluetooth] I am unable to open/close/connect/scan bluetooth
+ [RTL8821A][ideapad_bluetooth] I am unable to open/close/connect/scan
+ bluetooth
summary: - [RTL8821A][ideapad_bluetooth] I am unable to open/close/connect/scan
- bluetooth
+ [hirsute] Can't turn bluetooth on again after turning it off
Changed in bluez (Ubuntu):
status: New → Confirmed
Revision history for this message
Aman Kumar (prof-of-stupidity) wrote : Re: [hirsute] Can't turn bluetooth on again after turning it off

I was facing the same problem. My toggle was not at all working, neither from the top bar dropdown menu nor from the settings window. Switching on the toggle did not have any effect. I had also reported this bug. Someone in the comments had suggested a workaround to type this command in the terminal:

systemctl restart Bluetooth

This command kind of hard restarts the Bluetooth service and works for me for the time being until the bug is fixed. It might also help someone else.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I'm preparing BlueZ 5.58 for Ubuntu 21.10 and the same bug just started happening there too.

Changed in gnome-control-center (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This might just be a GUI bug in gnome-control-center. Someone will need to tinker with bluetoothctl to investigate further.

summary: - [hirsute] Can't turn bluetooth on again after turning it off
+ [hirsute/impish] Can't turn bluetooth on again after turning it off
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1926062

tags: added: iso-testing
Revision history for this message
Noctis Bennington (noctis13) wrote :

I have the same bug here. You can activate or turn it off but the bluetooth is always "off", for me happens sometimes when I reboot.

You-Sheng Yang (vicamo)
summary: - [hirsute/impish] Can't turn bluetooth on again after turning it off
+ [hirsute/impish] Realtek RTL8821AE 802.11ac PCIe [10ec:8821] Subsystem
+ [17aa:a814]: Can't turn bluetooth on again after turning it off
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This is not hardware-specific.

summary: - [hirsute/impish] Realtek RTL8821AE 802.11ac PCIe [10ec:8821] Subsystem
- [17aa:a814]: Can't turn bluetooth on again after turning it off
+ [hirsute/impish] Can't turn bluetooth on again after turning it off
Revision history for this message
Luis Oliveira (mehrlicht) wrote :

I upgraded yesterday from 20.10 to 21.04.

In 20.10 I had trouble pairing with my current headphones (Havit 162) - I had to repair through the terminal.
Now, in 21.04, the repairing works in the GUI.

However, today I turned off the bluetooth in the GUI and when I tried to turn it on again the toggle did not work.

I had to input in the terminal
```systemctl restart bluetooth```

Revision history for this message
Sebastien Bacher (seb128) wrote :

Ok, so the issue there was triggered by kernel changes, you can read the details in the commit message of the GNOME fix
https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/commit/d2200632

The fix is in gnome-settings-daemon 3.38.2 in impish, bluez also requires a similar fix which is being SRUed now as bug #1933221.

Daniel since you are working on updating bluez to 5.59 in impish could you check if that commit is included and if it's not then cherrypick the change?

Changed in linux (Ubuntu):
status: Confirmed → Invalid
Changed in gnome-control-center (Ubuntu):
status: Confirmed → Invalid
Changed in bluez (Ubuntu):
importance: Undecided → High
status: Confirmed → Fix Committed
affects: gnome-control-center (Ubuntu) → gnome-settings-daemon (Ubuntu)
Changed in gnome-settings-daemon (Ubuntu):
status: Invalid → Fix Released
tags: added: fixed-in-gsd-3.38.2 fixed-in-gsd-40.0.1
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The bluez fix has not been upstreamed yet. Is that pending?

Changed in bluez (Ubuntu):
assignee: nobody → Andy Chi (andch)
status: Fix Committed → In Progress
description: updated
tags: added: regression-release
Revision history for this message
Andy Chi (andch) wrote :

Hi @Daniel,
Yes, it has not been upstreamed yet. Linux-bluetooth does not reply the thread, maybe I'll have a try to send mail to them.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks Andy. I've added the fix to the 5.59 release (bug 1933078) and it works great.

no longer affects: linux (Ubuntu)
no longer affects: gnome-settings-daemon (Ubuntu Focal)
no longer affects: gnome-settings-daemon (Ubuntu Hirsute)
Changed in bluez (Ubuntu Focal):
status: New → In Progress
Changed in bluez (Ubuntu Hirsute):
status: New → In Progress
Changed in bluez (Ubuntu Focal):
importance: Undecided → High
Changed in bluez (Ubuntu Hirsute):
importance: Undecided → High
Changed in bluez (Ubuntu Focal):
assignee: nobody → Andy Chi (andch)
Changed in bluez (Ubuntu Hirsute):
assignee: nobody → Andy Chi (andch)
Changed in bluez (Ubuntu Impish):
assignee: Andy Chi (andch) → Daniel van Vugt (vanvugt)
description: updated
Changed in bluez (Ubuntu Impish):
status: In Progress → Fix Committed
Changed in oem-priority:
assignee: nobody → Andy Chi (andch)
Andy Chi (andch)
Changed in oem-priority:
importance: Undecided → Critical
Revision history for this message
Andy Chi (andch) wrote :

Hi @Daniel,
I created a public bug in github/bluez, mp is sent by maintainer.
https://github.com/bluez/bluez/issues/162

Revision history for this message
Robie Basak (racb) wrote :

The fix for this seems missing in Impish. What does "Fix Committed" mean here? What are your plans to fix this in Impish?

Revision history for this message
Robie Basak (racb) wrote :

Also, the current upload references bug 1933221 which is a dupe. I'm not sure how SRU tooling will handle this. Unless you can confirm that it will work, please could you reference the master bug in your upload instead?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Robie, "Fix Committed" means the fix is committed here:

  https://git.launchpad.net/~bluetooth/bluez/commit/?id=04298c5e46

It's part of the 5.59 release for Impish that is awaiting sponsorship (bug 1933078).

Declaring "Fix Committed" when a fix exists in an upstream tributary before anything has reached proposed is a procedure requested by seb128 and we now follow on the desktop team.

tags: added: fixed-in-bluez-5.60 fixed-upstream
Revision history for this message
Andy Chi (andch) wrote (last edit ):
Andy Chi (andch)
tags: added: oem-priority originate-from-1931048 somerville
Revision history for this message
Robie Basak (racb) wrote :

> Declaring "Fix Committed" when a fix exists in an upstream tributary before anything has reached proposed is a procedure requested by seb128 and we now follow on the desktop team.

I'm not sure what you mean by "upstream tributary", but if the fix exists in the main Ubuntu packaging branch used by the desktop team (ie. Vcs-Git in debian/control points to it) then that makes sense, as it was in this case. If you mean it's just fixed upstream somewhere, then that doesn't make sense - Launchpad's bug tracker expects to have a separate task to track upstream status if you want that.

However, from an SRU perspective, I would expect an upload to the development release *before* an SRU is uploaded. Sometimes we make concessions (eg. during a development release freeze), but I don't think a sponsorship delay qualifies. The sponsor should be able to sponsor to the development release first, so there's no reason not to do it.

I see it's there now, but please could you adjust your processes to make sure that in the normal case, this happens? This would save me reviewing the SRU twice.

Changed in bluez:
status: Unknown → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bluez - 5.59-0ubuntu1

---------------
bluez (5.59-0ubuntu1) impish; urgency=medium

  * New upstream release 5.59 (LP: #1933078):
    - Fix issue with string to UUID-32 conversion.
    - Fix issue with connect request if SDP search failed.
    - Fix issue with accepting invalid AVDTP capabilities.
    - Fix issue with unregister handling of AVRCP player.
  * Add new build-dep 'python3-docutils' required for rst2man.
  * Add new package 'bluez-meshd' and --enable-mesh (LP: #1929833).
    - Requires new build-dep 'libjson-c-dev'.
  * Cleanups from upstream debian:
    - Remove empty packages 'libbluetooth3-dbg' and 'bluez-dbg'.
    - Lots of benign formatting changes in debian/control to shrink the diff.
  * Add binaries 'b1ee', 'btvirt', 'hfp' to 'bluez-tests' (LP: #1932022).
  * Add binary 'avinfo' to 'bluez' (LP: #1907886).
  * Add patch Fix-reading-from-rfkill-socket.patch to resolve Bluetooth
    on/off toggle issues with newer kernel versions (LP: #1926062).

 -- Daniel van Vugt <email address hidden> Mon, 21 Jun 2021 17:02:38 +0800

Changed in bluez (Ubuntu Impish):
status: Fix Committed → Fix Released
Changed in bluez (Ubuntu Focal):
status: In Progress → Fix Committed
Changed in bluez (Ubuntu Hirsute):
status: In Progress → Fix Committed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This bug was fixed in the package bluez - 5.53-0ubuntu3.3

---------------
bluez (5.53-0ubuntu3.3) focal; urgency=medium

  * debian/patches/0001-fix-reading-from-rfkill-socket.patch:
    - fix reading from rfkill socket (lp: #1933221)

 -- Andy Chi <email address hidden> Tue, 22 Jun 2021 14:27:12 +0800

Changed in bluez (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This bug was fixed in the package bluez - 5.56-0ubuntu4.2

---------------
bluez (5.56-0ubuntu4.2) hirsute; urgency=medium

  * debian/patches/0001-fix-reading-from-rfkill-socket.patch:
    - fix reading from rfkill socket (lp: #1933221)

 -- Andy Chi <email address hidden> Tue, 22 Jun 2021 08:07:12 +0000

Changed in bluez (Ubuntu Hirsute):
status: Fix Committed → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

^^^
Note bug 1933221 is really a duplicate of this one. That's why it's fix released.

Andy Chi (andch)
tags: added: originate-from-1936277
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Seems there's a bug in Launchpad preventing me from creating the missing focal and hirsute tasks. Let's see if deleting them all and recreating them helps...

no longer affects: bluez (Ubuntu Hirsute)
no longer affects: bluez (Ubuntu Focal)
Changed in bluez (Ubuntu Focal):
status: New → Fix Released
Changed in bluez (Ubuntu Hirsute):
status: New → Fix Released
Changed in bluez (Ubuntu Focal):
assignee: nobody → Andy Chi (andch)
importance: Undecided → High
Changed in bluez (Ubuntu Hirsute):
assignee: nobody → Andy Chi (andch)
importance: Undecided → High
Changed in gnome-settings-daemon (Ubuntu Focal):
assignee: nobody → Andy Chi (andch)
status: New → In Progress
Changed in gnome-settings-daemon (Ubuntu Hirsute):
assignee: nobody → Andy Chi (andch)
status: New → In Progress
Revision history for this message
Andy Chi (andch) wrote :

Upload gnome-settings-daemon debdiff of focal.

Revision history for this message
Andy Chi (andch) wrote :

Upload gnome-settings-daemon debdiff of hirsute.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Do we need a new test case? The existing one was already verified as working on focal and hirsute according to bug 1933221.

Revision history for this message
Andy Chi (andch) wrote :

[Impact]

Bluetooth cannot turn on after disabling AirPlane mode

[Test Plan]

1. Open gnome-control-center and select Wi-Fi
2. Turn off Wi-Fi via UI
3. Select Bluetooth column
4. Turn off Bluetooth via UI
5. Turn Off AirPlane Mode in Bluetooth menu

[Where problems could occur]

Since the fix involves the 'rfkill' logic it has the potential to affect any Bluetooth or Wifi on/off setting.

Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Jatin, or anyone else affected,

Accepted gnome-settings-daemon into hirsute-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-settings-daemon/3.38.1-3ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-hirsute to verification-done-hirsute. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-hirsute. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in gnome-settings-daemon (Ubuntu Hirsute):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-hirsute
Changed in gnome-settings-daemon (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Robie Basak (racb) wrote :

Hello Jatin, or anyone else affected,

Accepted gnome-settings-daemon into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-settings-daemon/3.36.1-0ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (gnome-settings-daemon/3.38.1-3ubuntu3.1)

All autopkgtests for the newly accepted gnome-settings-daemon (3.38.1-3ubuntu3.1) for hirsute have finished running.
The following regressions have been reported in tests triggered by the package:

indicator-session/17.3.20+21.04.20210327-0ubuntu1 (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/hirsute/update_excuses.html#gnome-settings-daemon

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Andrei Sergeev (aelsergeev) wrote (last edit ):

Fixed for me, I have suspended laptop and after that I still could turn on bluetooth, before that it didn't work
Ubuntu 21.04
 3.38.1-3ubuntu3.1

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

^^^

tags: added: verification-done-hirsute
removed: verification-needed-hirsute
Revision history for this message
Andy Chi (andch) wrote :

Test on HP desktop with following steps

1. Open gnome-control-center and select Wi-Fi
2. Turn off Wi-Fi via UI
3. Select Bluetooth column
4. Turn off Bluetooth via UI
5. Turn Off AirPlane Mode in Bluetooth menu

Bluetooth works fine.

[OS]
Focal

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-settings-daemon - 3.38.1-3ubuntu3.1

---------------
gnome-settings-daemon (3.38.1-3ubuntu3.1) hirsute; urgency=medium

  * d/p/git-rfkill-set-the-g_io_channel-to-unbuffered-mode.patch:
    - Set the g_io_channel to unbuffered mode to fix airplane mode with
      newer kernel versions (lp: #1926062)
  * d/p/git-media-keys-Addd-one-second-delay-between-each-rfkill-.patch
    - Add one second dely between each rfkill event (lp: #1936303)

 -- Andy Chi <email address hidden> Thu, 15 Jul 2021 09:57:58 +0200

Changed in gnome-settings-daemon (Ubuntu Hirsute):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for gnome-settings-daemon has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-settings-daemon - 3.36.1-0ubuntu1.1

---------------
gnome-settings-daemon (3.36.1-0ubuntu1.1) focal; urgency=medium

  * d/p/git-rfkill-set-the-g_io_channel-to-unbuffered-mode.patch:
    - Set the g_io_channel to unbuffered mode to fix airplane mode with
      newer kernel versions (lp: #1926062)
  * d/p/git-media-keys-Addd-one-second-delay-between-each-rfkill-.patch
    - Add one second dely between each rfkill event (lp: #1936303)

 -- Andy Chi <email address hidden> Thu, 08 Jul 2021 17:35:19 +0800

Changed in gnome-settings-daemon (Ubuntu Focal):
status: Fix Committed → Fix Released
Andy Chi (andch)
Changed in oem-priority:
status: New → Fix Released
Changed in gnome-bluetooth:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.