Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] bluetoothctl does not echo commands as user
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
[n00b@localhost]
Apprentice
Apprentice


Joined: 30 Aug 2004
Posts: 266
Location: London, UK

PostPosted: Tue Feb 16, 2016 12:38 pm    Post subject: [SOLVED] bluetoothctl does not echo commands as user Reply with quote

I am having trouble getting bluetooth working under kde-plasma and I've realised that it may be down to the fact I can't get bluetooth working at all under my user account.

The problem I am experiencing is that the bluetoothctl command won't accept my keyboard input when I run it under my user account, but running it as the root user works as expected. bluetoothctl will display the prompt but not echo any characters I type, and the only way to get it to quit is CTRL+C.

I have Googled for this problem and it appears that it is quite common, but all the solutions I've seen so far have been simply down to the bluetoothd daemon not running, or the permissions not being set correctly. (On an unrelated note this seriously pisses me off and lowers the quality of results search engines return when people don't Google for their problem beforehand and instead post yet another question which gathers the same response.) I have therefore verified that the permissions are set correctly and that the bluetoothd daemon is running before posting this question.

Example shell session:
Code:

gary@garyslaptop ~ $ hciconfig -a
hci0:   Type: BR/EDR  Bus: USB
   BD Address: F4:B7:E2:E9:B6:7F  ACL MTU: 1021:8  SCO MTU: 64:1
   UP RUNNING PSCAN ISCAN
   RX bytes:6037 acl:71 sco:0 events:228 errors:0
   TX bytes:3829 acl:73 sco:0 commands:103 errors:0
   Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
   Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
   Link policy: RSWITCH SNIFF
   Link mode: SLAVE ACCEPT
   Name: 'garyslaptop'
   Class: 0x00010c
   Service Classes: Unspecified
   Device Class: Computer, Laptop
   HCI Version: 4.0 (0x6)  Revision: 0x1000
   LMP Version: 4.0 (0x6)  Subversion: 0x220e
   Manufacturer: Broadcom Corporation (15)

gary@garyslaptop ~ $ bluetoothctl
[bluetooth]#
gary@garyslaptop ~ $ su -
Password:
garyslaptop ~ # /etc/init.d/bluetooth status
 * status: started
garyslaptop ~ # ps ax | grep bluetoothd
 1887 ?        Ss     0:07 /usr/libexec/bluetooth/bluetoothd
18596 pts/3    S+     0:00 grep --colour=auto bluetoothd
garyslaptop ~ # bluetoothctl
[NEW] Controller F4:B7:E2:E9:B6:7F garyslaptop [default]
[bluetooth]# list
Controller F4:B7:E2:E9:B6:7F garyslaptop [default]
[bluetooth]# quit
[DEL] Controller F4:B7:E2:E9:B6:7F garyslaptop [default]


The bluetoothctl prompt appears blue as both root and user accounts and apparently this means that the bluetoothd is running.

The bluetooth wiki article says it is sufficient to either have consolekit installed and running with the acl USE flag set, or for the user to be in the plugdev group. I have tried both solutions to no avail:

Code:

garyslaptop ~ # /etc/init.d/consolekit status
 * status: started
garyslaptop ~ # ps ax | grep console-kit
 1973 ?        Ssl    0:00 /usr/sbin/console-kit-daemon
 7236 pts/3    R+     0:00 grep --colour=auto console-kit
garyslaptop ~ # groups gary
wheel audio cdrom video usb users portage plugdev bumblebee kvm android realtime svnusers gary


Pertinent information:
Code:

garyslaptop ~ # emerge --info
Portage 2.2.27 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop/plasma, gcc-5.3.0, glibc-2.22-r1, 4.4.0-tuxonice-r1 x86_64)
=================================================================
System uname: Linux-4.4.0-tuxonice-r1-x86_64-Intel-R-_Core-TM-_i7-3630QM_CPU_@_2.40GHz-with-gentoo-2.2
KiB Mem:    32717092 total,  12103220 free
KiB Swap:    1028092 total,   1028092 free
Timestamp of repository gentoo: Tue, 09 Feb 2016 09:15:01 +0000
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r1::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2-r1::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.4.3-r7::gentoo, 3.5.1-r2::gentoo
dev-util/cmake:           3.4.3::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.19.1::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.8.5::gentoo, 5.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.uk.gentoo.org/gentoo-portage
    priority: -1000

Local-Overlay
    location: /usr/local/portage
    sync-type: git
    sync-uri: https://github.com/garymacindoe/gentoo-overlay.git
    masters: gentoo

bumblebee
    location: /var/lib/layman/bumblebee
    sync-type: laymansync
    sync-uri: git://github.com/Bumblebee-Project/bumblebee-gentoo
    masters: gentoo
    priority: 50

java
    location: /var/lib/layman/java
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/java.git
    masters: gentoo
    priority: 50

proaudio
    location: /var/lib/layman/proaudio
    sync-type: laymansync
    sync-uri: svn://svn.tuxfamily.org/svnroot/proaudio/proaudio/trunk/overlays/proaudio
    masters: gentoo
    priority: 50

science
    location: /var/lib/layman/science
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/sci.git
    masters: gentoo
    priority: 50

Installed sets: @steam
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
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/splash /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy clean-logs compress-build-logs config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync multilib-strict news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://mirror.bytemark.co.uk/gentoo/ http://mirror.bytemark.co.uk/gentoo/ http://mirror.qubenet.net/mirror/gentoo/ http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/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"
USE="X a52 aac accessibility acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam ffmpeg fftw firefox flac fortran gdbm gif git glamor gpm gtk iconv icu ipv6 java jpeg kde kipi lapack lcms ldap libnotify mad mmx mmxext mng modules mp3 mp4 mpeg mpi multilib mysql ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds python qml qt3support qt4 qt5 readline sdl seccomp semantic-desktop session spell sqlite sse sse2 ssl startup-notification subversion svg tcpd threads tiff truetype udev udisks unicode upower usb vaapi vdpau vorbis wayland widgets wxwidgets x264 xattr xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" DVB_CARDS="usb-dib0700 usb-dtt200u" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4 python3_5" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="intel i965 nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

garyslaptop ~ # emerge -pv1 --nodeps $(qlist -IC blue) consolekit

These are the packages that would be merged, in order:

[ebuild   R   ~] kde-frameworks/bluez-qt-5.18.0:5/5.18::gentoo  USE="-debug -doc {-test}" 0 KiB
[ebuild   R   ~] kde-plasma/bluedevil-5.5.4:5::gentoo  USE="-debug" 0 KiB
[ebuild   R    ] net-wireless/bluez-5.37:0/3::gentoo  USE="cups obex readline udev -debug -doc -extra-tools (-selinux) -systemd {-test} -test-programs" ABI_X86="(64) -32 (-x32)" PYTHON_TARGETS="python2_7" 0 KiB
[ebuild   R    ] sys-auth/consolekit-1.0.0-r1::gentoo  USE="acl pam (policykit) -cgroups -debug -doc (-selinux) {-test}" 0 KiB

Total: 4 packages (4 reinstalls), Size of downloads: 0 KiB


Last edited by [n00b@localhost] on Wed Feb 17, 2016 4:14 pm; edited 1 time in total
Back to top
View user's profile Send private message
[n00b@localhost]
Apprentice
Apprentice


Joined: 30 Aug 2004
Posts: 266
Location: London, UK

PostPosted: Wed Feb 17, 2016 4:14 pm    Post subject: Reply with quote

So this was solved after I had completed an emerge -e world. Accessing bluetooth from KDE Plasma works as well.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum