After the update from sys-kernel/gentoo-sources-6.6.52 to sys-kernel/gentoo-sources-6.6.58-r1 my desktop cannot initiate a Bluetooth connection anymore. I use net-wireless/blueman-2.4.3 and net-wireless/bluez-5.78 and this has been working fine so far. If I open the blueman-applet and double click on one my items on the list (for example my mobile phone or my Nintendo Switch), then my system was able to connect the these devices and pulseaudio would also add the "Loopback from <device>" audio sink. But now after the update to sys-kernel/gentoo-sources-6.6.58-r1, when I do a double click, it tries to connect, it shows that it somehow connected (I can see on the bottom right corner that bytes are up- und downloaded). On my phone I can briefly see that the device is connected for a couple of seconds, but the "Loopback from <device>" audio sink is not added and eventually I get the error message "Connection Failed: br-connection-refused.". My mobile phone also displays my desktop as disconnected. dmesg does not show anything when I try to connect and all I see in /var/log/messages is blueman-applet 22.33.02 INFO RecentConns:113 notify : <Device.Device object at 0x7f45302efd80 (blueman+bluez+Device+Device at 0x560012a81250)> 00000000-0000-0000-0000-000000000000 However, if I start the connection from my mobile phone (or the Nintendo switch), then blueman-applet shows me "connected notification" and the "Loopback from <device>" audio sink is added and I can use the Bluetooth connection. dmesg still doesn't show anything, but /var/log/messages now contains the pulseaudio logs that shows that the Loopback was added: Nov 4 22:48:56 gallifrey pulseaudio[5453]: [pulseaudio] backend-native.c: doing listen Nov 4 22:48:57 gallifrey pulseaudio[5453]: [pulseaudio] module-card-restore.c: Restoring port latency offsets for card bluez_card.EC_ED_73_8D_A4_37. Nov 4 22:48:57 gallifrey pulseaudio[5453]: [pulseaudio] card.c: bluez_card.EC_ED_73_8D_A4_37: active_profile: a2dp_source Nov 4 22:48:57 gallifrey pulseaudio[5453]: [pulseaudio] card.c: Created 6 "bluez_card.EC_ED_73_8D_A4_37" Nov 4 22:48:57 gallifrey pulseaudio[5453]: [pulseaudio] bluez5-util.c: Failed optional acquire of unavailable transport /org/bluez/hci0/dev_EC_ED_73_8D_A4_37/fd0 Nov 4 22:48:57 gallifrey pulseaudio[5453]: [pulseaudio] a2dp-codec-sbc.c: SBC parameters: allocation=Loudness, subbands=8, blocks=16, mode=JointStereo bitpool=2 codesize=512 frame_length=17 Nov 4 22:48:57 gallifrey pulseaudio[5453]: [pulseaudio] source.c: Created source 7 "bluez_source.EC_ED_73_8D_A4_37.a2dp_source" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right Nov 4 22:48:57 gallifrey pulseaudio[5453]: [pulseaudio] source.c: bluetooth.protocol = "a2dp_source" Nov 4 22:48:57 gallifrey pulseaudio[5453]: [pulseaudio] source.c: bluetooth.codec = "sbc" Nov 4 22:48:57 gallifrey pulseaudio[5453]: [pulseaudio] source.c: device.description = "shaoMotoG73" .... If I boot into my system with sys-kernel/gentoo-sources-6.6.52 then there is no problem, my desktop can initiate the Bluetooth connection. Because I also made an profile update from 17.1 and gcc was rebuilt with new USE Flags, I also built sys-kernel/gentoo-sources-6.6.52 again with the post-profile-upgrade gcc but that kernel also doesn't have the problem. So I'm fairly sure that the problem is not GCC or the profile upgrade but sys-kernel/gentoo-sources-6.6.58-r1 itself. I use a USB-A dongle (Logilink BT0058) und just to see what the kernel says, I remove the dongle and added it back, dmesg shows this: [ 1025.751495] Bluetooth: hci0: RTL: examining hci_ver=0a hci_rev=000b lmp_ver=0a lmp_subver=8761 [ 1025.752473] Bluetooth: hci0: RTL: rom_version status=0 version=1 [ 1025.752493] Bluetooth: hci0: RTL: loading rtl_bt/rtl8761bu_fw.bin [ 1025.752532] Loading firmware: rtl_bt/rtl8761bu_fw.bin [ 1025.753473] Bluetooth: hci0: RTL: loading rtl_bt/rtl8761bu_config.bin [ 1025.753511] Loading firmware: rtl_bt/rtl8761bu_config.bin [ 1025.754040] Bluetooth: hci0: RTL: cfg_sz 6, total sz 30210 [ 1025.904580] Bluetooth: hci0: RTL: fw version 0xdfc6d922 [ 1025.986889] Bluetooth: MGMT ver 1.22 To my surprise, making a double click on the blueman-applet on my mobile phone now worked as expected. However this seems to be only luck, because if I disconnect and try to connect again, then problem appears again. I removed and inserted the dongle a couple of times and sometimes it works again, and sometimes it doesn't. So this not consistent. With sys-kernel/gentoo-sources-6.6.52 I don't have this problem. I wonder whether the firmware file rtl_bt/rtl8761bu_config.bin is not really compatible with this kernel. I'm running the latest stable firmware sys-kernel/linux-firmware-20241017-r3. Reproducible: Always Steps to Reproduce: 1. Boot with sys-kernel/gentoo-sources-6.6.58-r1 2. Open blueman-applet and double on a trusted device on the list Actual Results: It connects for a while, the "Loopback from <device>" audio sink is not added and eventually the devices is disconnected again. Expected Results: The device is connected and the "Loopback from <device>" audio sink is added emerge --info Portage 3.0.66.1 (python 3.12.7-final-0, default/linux/amd64/23.0/split-usr/desktop, gcc-13, glibc-2.40-r5, 6.6.58-gentoo-r1 x86_64) ================================================================= System uname: Linux-6.6.58-gentoo-r1-x86_64-Intel-R-_Core-TM-_i7-10700K_CPU_@_3.80GHz-with-glibc2.40 KiB Mem: 57258536 total, 44122484 free KiB Swap: 67108860 total, 67108860 free Timestamp of repository gentoo: Sun, 03 Nov 2024 15:30:00 +0000 Head commit of repository gentoo: 7f5688f3d2427b1d23f0e62c815cc528d08bfe9d sh bash 5.2_p37 ld GNU ld (Gentoo 2.42 p6) 2.42.0 app-misc/pax-utils: 1.3.7::gentoo app-shells/bash: 5.2_p37::gentoo dev-build/autoconf: 2.13-r8::gentoo, 2.72-r1::gentoo dev-build/automake: 1.16.5-r2::gentoo dev-build/cmake: 3.30.5::gentoo dev-build/libtool: 2.4.7-r4::gentoo dev-build/make: 4.4.1-r1::gentoo dev-build/meson: 1.5.2::gentoo dev-java/java-config: 2.3.4::gentoo dev-lang/perl: 5.40.0::gentoo dev-lang/python: 2.7.18_p16-r2::gentoo, 3.11.10_p1::gentoo, 3.12.7_p1::gentoo, 3.13.0::gentoo dev-lang/rust: 1.81.0::gentoo sys-apps/baselayout: 2.15::gentoo sys-apps/openrc: 0.54.2::gentoo sys-apps/sandbox: 2.29::local sys-devel/binutils: 2.42-r2::gentoo sys-devel/binutils-config: 5.5.2::gentoo sys-devel/clang: 18.1.8::gentoo sys-devel/gcc: 12.4.1_p20241031::gentoo, 13.3.1_p20241025::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/llvm: 18.1.8-r1::gentoo sys-kernel/linux-headers: 6.6-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.40-r5::gentoo sys-libs/libselinux: 3.7-r1::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 volatile: True sync-rsync-verify-max-age: 3 sync-rsync-verify-metamanifest: yes sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 local location: /usr/local/portage masters: gentoo volatile: True ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox keepwork merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs" LEX="flex" LINGUAS="en en_GB ja" MAKEOPTS="-j17" PKGDIR="/export/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/bash" USE="X a52 aac acl acpi alsa amd64 bash-completion bluetooth branding bzip2 cairo cdda cdr cet cjk crypt cups dbus directfb dri dts dvd dvdr elogind encode exif flac gdbm gif gpm gtk gui iconv icu ipv6 jpeg kf6compat lcms libnotify libtirpc lvm mad mmx mng mp3 mp4 mpeg multilib ncurses nls ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qml qt3support qt5 qt6 readline sdl seccomp sound spell split-usr sqlite ssl startup-notification svg test-rust theora tiff truetype udev udisks unicode upower usb vim-pager vim-syntax vorbis vulkan wayland win32codecs wxwidgets x264 xattr xcb xft xml xv xvid zlib" ABI_X86="64 32" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en en_GB ja" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PERL_FEATURES="ithreads" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_12 python3_11" RUBY_TARGETS="ruby32" VIDEO_CARDS="nouveau vesa fbdev intel i915 i965 iris" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Created attachment 907984 [details] 6.6.52 config file 6.6.52 config file
Created attachment 907985 [details] 6.6.58-r1 config file 6.6.58-r1 config file
Can you do a git bisect between the last working kernel and the first non-working one?
(In reply to Mike Pagano from comment #3) > Can you do a git bisect between the last working kernel and the first > non-working one? sure, but where can I find a git tree with all the commits between sys-kernel/gentoo-sources-6.6.52 and sys-kernel/gentoo-sources-6.6.58-r1? I mean, on https://github.com/torvalds/linux there tags for the v6.6 and the their release candidates, but I don't know where the commits for the minor versions are stored.
(In reply to Pablo Yanez Trujillo from comment #4) > (In reply to Mike Pagano from comment #3) > > Can you do a git bisect between the last working kernel and the first > > non-working one? > > sure, but where can I find a git tree with all the commits between > sys-kernel/gentoo-sources-6.6.52 and sys-kernel/gentoo-sources-6.6.58-r1? > > I mean, on https://github.com/torvalds/linux there tags for the v6.6 and the > their release candidates, but I don't know where the commits for the minor > versions are stored. This should help: https://wiki.gentoo.org/wiki/Kernel_git-bisect
(In reply to Mike Pagano from comment #5) > > This should help: > https://wiki.gentoo.org/wiki/Kernel_git-bisect Hi Mike, I know how to do a git-bisect (I've used that a lot at my work place). I just didn't realize where the branches/tags for the versions are found. My bad, I just looked at Linus' tree in github and did not realize the "more" button on the page where the tags are listed. That's why I assumed, those tags were not there... However, the link you've posted has something I don't quite get: > There are two branches: > linux-stable.git = sys-kernel/gentoo-sources or sys-kernel/vanilla-sources > linux.git = sys-kernel/git-sources Does that mean that I should do a clone from here? git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git And what about the gentoo specific patches, I mean those that come from here https://dev.gentoo.org/~mpagano/genpatches. Are those also in linux-stable.git? Shouldn't i apply those as well before I start to do the bisect?
First test vanilla. If that fails than do a git-bisect using linux-stable
You can also test the latest 6.6.X (59 as of this writing) to see if it's fixed already.
(In reply to Mike Pagano from comment #8) > You can also test the latest 6.6.X (59 as of this writing) to see if it's > fixed already. Ok, I'll do that
I have a question about EXTRAVERSION in Makefile I'm building right now the vanilla kernel 6.6.58. I edited the Makefile and set EXTRAVERSION = -vanilla Then I copied the config in .config and executed make oldconfig && make -j17 However, make modules_install stores the modules in /lib/modules/6.6.58-vanilla+ The file include/config/kernel.release contains 6.6.58-vanilla+ but if I do "make kernelversion", I get 6.6.58-vanilla. So where does the "+" comes from? Why doesn't that happen on the gentoo-sources kernel?
Yesterday I tested 6.6.59 via gentoo-sources. The problem is still there, although here I can sometimes connect to my mobile phone. The connection to the Nintendo Switch does not work. The other way round it works. I also tested the vanilla (git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git) version for 6.6.52 and 6.6.58. With 6.6.52 it works every time. With 6.6.58 it doesn't work. At least we can rule out Gentoo's genpatches. I will do git bisect now, but it's going to take a while. I can only test them in the evenings.
Confirm the problem at least with sys-kernel/gentoo-sources 6.6.58-r1, 6.11.4-6.11.7 and Marshall Stanmore III speaker. With other devices (Logitech G603 mouse, JBL speaker, Samsung S24U) Bluetooth pairing is OK. I installed the 6.10.10 kernel - everything works correctly with this kernel.
I've finished the git bisect of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git The commit that has been found to introduce the problem is b90907696c30172b809aa3dd2f0caffae761e4c6 (see bisect.log and patch file) I double checked it, if I boot with the previous commit, my desktop is able to initiate bluetooth connections without an issue. If I boot with the bad commit, I instantly get the problem.
Created attachment 908347 [details] bisect.log
Created attachment 908348 [details, diff] The patch that introduces the problem
I'm sorry, I posted the wrong patch (the 0001-Bluetooth-MGMT-Fix-possible-crash-on-mgmt_index_remo.patch) is the last good commit. I use git format-patch -1 HEAD instead of the bad commit sha1. I'll post the new one. I cannot delete attachments.
Created attachment 908349 [details, diff] Real bad commit that introduces the error The other file 0001-Bluetooth-MGMT-Fix-possible-crash-on-mgmt_index_remo.patch is the last good commit. I'm sorry about that.
(In reply to Pablo Yanez Trujillo from comment #17) > Created attachment 908349 [details, diff] [details, diff] > Real bad commit that introduces the error > > The other file > 0001-Bluetooth-MGMT-Fix-possible-crash-on-mgmt_index_remo.patch is the last > good commit. I'm sorry about that. I rolled back this patch on sys-kernel/gentoo-sources-6.11.7 and everything worked as it should.
Great find, thanks. Potential fix in upstream's bugzilla.
(In reply to Mike Pagano from comment #19) > Great find, thanks. Potential fix in upstream's bugzilla. Hi Mike. Can you post the link of upstream's bugzilla? Just out of curiosity. How do you handle these kind of problems? Do you report upstream these errors or just incorporate them in genpatch? Or should I report them upstream?
(In reply to Pablo Yanez Trujillo from comment #20) > (In reply to Mike Pagano from comment #19) > > Great find, thanks. Potential fix in upstream's bugzilla. > > Hi Mike. > > Can you post the link of upstream's bugzilla? > > Just out of curiosity. How do you handle these kind of problems? Do you > report upstream these errors or just incorporate them in genpatch? Or should > I report them upstream? Check the URL field at the top of the bug here . >Do you > report upstream these errors or just incorporate them in genpatch? Or should > I report them upstream? Yes, Yes and normally yes. But it looks like there's a report of it already.
https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/?id=48adce305dc6d6c444fd00e40ad07d4a41acdfbf
*** Bug 943119 has been marked as a duplicate of this bug. ***
Released in kernels >= 6.6.61 and 6.11.8