Bug 852851

Summary: Gnome cannot pair with bluetooth devices requiring a pin code
Product: [openSUSE] openSUSE 13.1 Reporter: Flavio Castelli <fcastelli>
Component: GNOMEAssignee: Dominique Leuenberger <dimstar>
Status: RESOLVED NORESPONSE QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: dimstar, fcastelli
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
See Also: https://bugzilla.gnome.org/show_bug.cgi?id=712387
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 844041    
Attachments: Output produced by bluetoothd

Description Flavio Castelli 2013-11-28 15:38:20 UTC
I cannot pair my apple wireless keyboard with gnome's setup wizard. The keyboard is shown, but the pairing procedure always times out.

That's the message I have inside of /var/log/messages:

2013-11-28T16:32:37.706510+01:00 roesti systemd[1016]: Starting Bluetooth.
2013-11-28T16:32:37.707212+01:00 roesti systemd[1016]: Reached target Bluetooth.
2013-11-28T16:32:37.735815+01:00 roesti bluetoothd[562]: Refusing input device connect: No such file or directory (2)
2013-11-28T16:32:37.740753+01:00 roesti bluetoothd[562]: Refusing connection from 44:2A:60:E2:27:50: unknown device
2013-11-28T16:32:38.074696+01:00 roesti gnome-session[1275]: Window manager warning: Log level 8: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-28T16:32:49.030422+01:00 roesti bluetoothd[562]: Agent replied with an error: org.freedesktop.DBus.Error.UnknownMethod, No such method 'DisplayPinCode'
2013-11-28T16:32:38.075221+01:00 roesti gnome-session[1275]: Window manager warning: Log level 8: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-28T16:33:21.465764+01:00 roesti gnome-session[1275]: (process:1887): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
2013-11-28T16:33:21.805885+01:00 roesti gnome-session[1275]: (firefox:1887): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::sm-connect after class was initialised
2013-11-28T16:33:21.806369+01:00 roesti gnome-session[1275]: (firefox:1887): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::show-crash-dialog after class was initialised
2013-11-28T16:33:21.806657+01:00 roesti gnome-session[1275]: (firefox:1887): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::display after class was initialised
2013-11-28T16:33:21.806940+01:00 roesti gnome-session[1275]: (firefox:1887): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::default-icon after class was initialised


I think the issue is caused by that:bluetoothd[562]: Agent replied with an error: org.freedesktop.DBus.Error.UnknownMethod, No such method 'DisplayPinCode'
Comment 1 Dominique Leuenberger 2013-11-28 16:53:31 UTC
Thank you very much for your bug report!

I will be spinning up a test package for you in the next couple hours that should address this.
Comment 2 Dominique Leuenberger 2013-11-28 19:38:27 UTC
An updated gnome-bluetooth package can be found in the repository

http://download.opensuse.org/repositories/home:/dimstar:/bnc852851/openSUSE_13.1_Update

Would you care testing this please, to validate if that works and if you happen to see other / new issues with this?
Comment 3 Flavio Castelli 2013-11-29 07:36:26 UTC
I did a zypper dup -r <your_repo> to install all the packages you have built. Unfortunately that didn't help:

2013-11-29T08:28:48.890911+01:00 roesti systemd[1423]: Starting Bluetooth.
2013-11-29T08:28:48.891410+01:00 roesti systemd[1423]: Reached target Bluetooth.
2013-11-29T08:28:48.942350+01:00 roesti bluetoothd[571]: Refusing input device connect: No such file or directory (2)
2013-11-29T08:28:48.944635+01:00 roesti bluetoothd[571]: Refusing connection from 44:2A:60:E2:27:50: unknown device
2013-11-29T08:28:43.520466+01:00 roesti gnome-session[2402]: Window manager warning: Log level 8: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-29T08:28:49.221862+01:00 roesti gnome-session[2402]: (gnome-control-center:2947): Gtk-CRITICAL **: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-29T08:28:49.222322+01:00 roesti gnome-session[2402]: (gnome-control-center:2947): Gtk-CRITICAL **: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-29T08:28:49.223357+01:00 roesti gnome-session[2402]: Window manager warning: Log level 8: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-29T08:28:53.378730+01:00 roesti bluetoothd[571]: Refusing input device connect: No such file or directory (2)
2013-11-29T08:28:53.383639+01:00 roesti bluetoothd[571]: Refusing connection from 44:2A:60:E2:27:50: unknown device
2013-11-29T08:28:49.223687+01:00 roesti gnome-session[2402]: Window manager warning: Log level 8: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-29T08:28:53.601269+01:00 roesti gnome-session[2402]: (gnome-control-center:2947): Gtk-CRITICAL **: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-29T08:28:53.601955+01:00 roesti gnome-session[2402]: (gnome-control-center:2947): Gtk-CRITICAL **: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-29T08:28:53.602969+01:00 roesti gnome-session[2402]: Window manager warning: Log level 8: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-29T08:28:53.603312+01:00 roesti gnome-session[2402]: Window manager warning: Log level 8: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-29T08:29:00.901106+01:00 roesti gnome-session[2402]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x2600003 (Bluetooth )
2013-11-29T08:29:00.901873+01:00 roesti gnome-session[2402]: Window manager warning: meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed.
2013-11-29T08:29:09.811945+01:00 roesti kernel: [  758.756904] perf samples too long (2504 > 2500), lowering kernel.perf_event_max_sample_rate to 50000
2013-11-29T08:29:14.342691+01:00 roesti bluetoothd[571]: Refusing input device connect: No such file or directory (2)
2013-11-29T08:29:14.356965+01:00 roesti bluetoothd[571]: Refusing connection from 44:2A:60:E2:27:50: unknown device
2013-11-29T08:29:14.617824+01:00 roesti gnome-session[2402]: (gnome-control-center:2947): Gtk-CRITICAL **: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-29T08:29:14.618296+01:00 roesti gnome-session[2402]: (gnome-control-center:2947): Gtk-CRITICAL **: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-29T08:29:14.618573+01:00 roesti gnome-session[2402]: (bluetooth-wizard:3004): Gtk-CRITICAL **: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-29T08:29:14.618886+01:00 roesti gnome-session[2402]: (bluetooth-wizard:3004): Gtk-CRITICAL **: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-29T08:29:14.621306+01:00 roesti gnome-session[2402]: Window manager warning: Log level 8: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-29T08:29:49.398700+01:00 roesti bluetoothd[571]: Refusing input device connect: No such file or directory (2)
2013-11-29T08:29:49.414164+01:00 roesti bluetoothd[571]: Refusing connection from 44:2A:60:E2:27:50: unknown device
2013-11-29T08:29:14.621750+01:00 roesti gnome-session[2402]: Window manager warning: Log level 8: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-29T08:29:49.669048+01:00 roesti gnome-session[2402]: (gnome-control-center:2947): Gtk-CRITICAL **: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-29T08:29:49.669503+01:00 roesti gnome-session[2402]: (gnome-control-center:2947): Gtk-CRITICAL **: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-29T08:29:49.670781+01:00 roesti gnome-session[2402]: Window manager warning: Log level 8: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-29T08:29:49.671147+01:00 roesti gnome-session[2402]: Window manager warning: Log level 8: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-29T08:29:49.672955+01:00 roesti gnome-session[2402]: (bluetooth-wizard:3004): Gtk-CRITICAL **: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-29T08:30:01.748512+01:00 roesti /usr/sbin/cron[3020]: pam_unix(crond:session): session opened for user root by (uid=0)
2013-11-29T08:30:01.752130+01:00 roesti systemd[1]: Starting user-0.slice.
2013-11-29T08:30:01.752583+01:00 roesti systemd[1]: Created slice user-0.slice.
2013-11-29T08:30:01.757987+01:00 roesti systemd[1]: Starting User Manager for 0...
2013-11-29T08:30:01.767629+01:00 roesti systemd[1]: Starting Session 5 of user root.
2013-11-29T08:30:01.768024+01:00 roesti systemd[1]: Started Session 5 of user root.
2013-11-29T08:30:01.777965+01:00 roesti systemd: pam_unix(systemd-user:session): session opened for user root by (uid=0)
2013-11-29T08:30:01.782127+01:00 roesti systemd[3021]: Failed to open private bus connection: Failed to connect to socket /run/user/0/dbus/user_bus_socket: No such file or directory
2013-11-29T08:30:01.833786+01:00 roesti systemd[3021]: Mounted /sys/fs/fuse/connections.
2013-11-29T08:30:01.843278+01:00 roesti systemd[3021]: Stopped target Sound Card.
2013-11-29T08:30:01.844572+01:00 roesti systemd[3021]: Stopped target Bluetooth.
2013-11-29T08:30:01.845091+01:00 roesti systemd[3021]: Starting Default.
2013-11-29T08:30:01.845507+01:00 roesti systemd[3021]: Reached target Default.
2013-11-29T08:30:01.846038+01:00 roesti systemd[3021]: Startup finished in 64ms.
2013-11-29T08:30:01.847465+01:00 roesti systemd[1]: Started User Manager for 0.
2013-11-29T08:30:01.950991+01:00 roesti /USR/SBIN/CRON[3020]: pam_unix(crond:session): session closed for user root
2013-11-29T08:30:01.985549+01:00 roesti systemd[3021]: Starting Bluetooth.
2013-11-29T08:30:01.986023+01:00 roesti systemd[3021]: Reached target Bluetooth.
2013-11-29T08:30:02.128319+01:00 roesti bluetoothd[571]: Agent replied with an error: org.bluez.Error.Rejected, Rejected bluetoothd generated PIN code
2013-11-29T08:29:49.673477+01:00 roesti gnome-session[2402]: (bluetooth-wizard:3004): Gtk-CRITICAL **: gtk_tree_path_get_depth: assertion 'path != NULL' failed
2013-11-29T08:30:26.422400+01:00 roesti gnome-session[2402]: (bluetooth-wizard:3004): Bluetooth-WARNING **: Pair() failed: Timeout was reached
2013-11-29T08:30:26.422881+01:00 roesti gnome-session[2402]: ** (bluetooth-wizard:3004): WARNING **: Setting up 'Apple Wireless Keyboard' failed: Timeout was reached
2013-11-29T08:30:32.393669+01:00 roesti gnome-session[2402]: (bluetooth-wizard:3004): Bluetooth-WARNING **: Pair() failed: GDBus.Error:org.bluez.Error.InProgress: In Progress
2013-11-29T08:30:32.394211+01:00 roesti gnome-session[2402]: ** (bluetooth-wizard:3004): WARNING **: Setting up 'Apple Wireless Keyboard' failed: GDBus.Error:org.bluez.Error.InProgress: In Progress
2013-11-29T08:31:02.863074+01:00 roesti gnome-session[2402]: (bluetooth-wizard:3004): Bluetooth-WARNING **: Pair() failed: Timeout was reached
2013-11-29T08:31:02.863555+01:00 roesti gnome-session[2402]: ** (bluetooth-wizard:3004): WARNING **: Setting up 'Apple Wireless Keyboard' failed: Timeout was reached
Comment 4 Dominique Leuenberger 2013-11-29 08:31:47 UTC
Thanks for your testing..

On the plus side: the error is different.

the new error is:
2013-11-29T08:30:02.128319+01:00 roesti bluetoothd[571]: Agent replied with an
error: org.bluez.Error.Rejected, Rejected bluetoothd generated PIN code

was there a passcode input dialog or so?
Comment 5 Flavio Castelli 2013-11-29 08:45:51 UTC
There was no dialog.
Comment 6 Dominique Leuenberger 2013-11-29 14:04:33 UTC
(In reply to comment #5)
> There was no dialog.

thanks.. wondering if bluetoothd did everything it should have done here:

Can you please
'kill' bluetoothd and restart it from a terminal with debug? (I hope you have a 
2nd keyboard)

sudo /usr/sbin/bluetoothd --nodaemon --debug

then try to pair the device again.
Comment 7 Flavio Castelli 2013-12-06 08:55:27 UTC
Excuse me for the delay, I've been busy with other stuff and I forgot about this issue.

> sudo /usr/sbin/bluetoothd --nodaemon --debug

I invoked bluetoothd in this way: 

sudo /usr/lib/bluetooth/bluetoothd -n -d &> blue.log

I'm going to attach the output to this bug. As you can see nothing changed.
Comment 8 Flavio Castelli 2013-12-06 08:56:01 UTC
Created attachment 570556 [details]
Output produced by bluetoothd
Comment 9 Dominique Leuenberger 2017-09-21 11:50:21 UTC
Flavio apologies for losing track of this bug (it somehow showed up on my list again now) - is this actually still an issue? There were various GNOME and bluez updates since the last comments

Please verify/validate on Tumbleweed and/or Leap 42.3
Comment 10 Flavio Castelli 2017-10-03 08:30:14 UTC
I ran away screaming from bluetooth devices sometimes ago, I cannot verify the fix anymore.

Closing the issue.