LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-03-2020, 01:06 PM   #31
ALazyDope
Member
 
Registered: Jul 2020
Posts: 57

Original Poster
Rep: Reputation: Disabled

Is there any possible way to reset bluez just by itself to default? Like would reinstalling bluez and it's utilities also reset their configurations?
 
Old 08-03-2020, 05:19 PM   #32
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 797

Rep: Reputation: 184Reputation: 184
there is one last setting i was just reminded of that might be worth checking. in /etc/dbus-1/system.d/bluetooth.conf there are a couple of lines that define who is allowed to use bluetooth:
Quote:
allow users of bluetooth group to communicate
allow users of lp group (printing subsystem) to
communicate with bluetoothd
those are the two listed on my ubuntu 18.04-based system. i can't see why you would have been removed from the allowed group, but if you will issue the command groups <username> inserting your username after groups you can check which groups you are in.

to answer your question, unfortunately the only method i know of to return to a previous or default state is with a backup. since pop installs bluez with everything else (if the distrowatch list of packages is correct. i don't use pop myself), as far as i know it would be hard if not impossible outside of a clean install (or possibly a live usb) to tell what kind of optimization they might include, if any.

that being said, since your bluetooth doesn't seem to want to work properly at all, reinstalling bluez doesn't seem like it would hurt anything. the ubuntu/pop package manager (apt) has a couple of different options when it comes to removing a package. apt remove <package> basically reverses the install process. apt purge <package> clears out the config files as well (apt-get man page - note: apt-get is a slightly older version of the command. it still works, but apt is a little more streamlined. most of the different commands after apt-get [like remove and purge] are the same with apt).

dpkg -s bluez will show you some extensive info about the bluez package including where the conffiles are located. if you wanted to compare the results of that in your system after re-installing bluez to a live usb or maybe virtual machine, it might be possible to see if there are any big discrepancies between the two.

Last edited by cordx; 08-03-2020 at 05:22 PM.
 
Old 08-03-2020, 05:24 PM   #33
ALazyDope
Member
 
Registered: Jul 2020
Posts: 57

Original Poster
Rep: Reputation: Disabled
It appears I'm not actually in the bluetooth group for some reason, how do I add myself to it
Code:
~$ groups alazydope 
alazydope : alazydope sys adm sudo
dpkg returns this
Code:
~/Downloads$ dpkg -s bluez
Package: bluez
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 4795
Maintainer: Ubuntu Bluetooth team <ubuntu-bluetooth@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: foreign
Version: 5.53-0ubuntu3
Replaces: bluez-alsa, bluez-audio (<= 3.36-3), bluez-input, bluez-network, bluez-serial, bluez-utils (<= 3.36-3), udev (<< 170-1)
Depends: libc6 (>= 2.17), libdbus-1-3 (>= 1.9.14), libglib2.0-0 (>= 2.31.8), libreadline8 (>= 6.0), libudev1 (>= 196), kmod, udev (>= 170-1), lsb-base, dbus
Breaks: udev (<< 170-1)
Conflicts: bluez-alsa, bluez-audio (<= 3.36-3), bluez-utils (<= 3.36-3)
Conffiles:
 /etc/bluetooth/input.conf 9db05437704efb3cf160810a02bfc7dc
 /etc/bluetooth/main.conf 445fdaa9def1ffaa873df2447ba22004
 /etc/bluetooth/network.conf 0c7497c405b963382ff71789d0730abd
 /etc/dbus-1/system.d/bluetooth.conf 8d5c18600cd0f8bb63e7806c5f0269f9
 /etc/init.d/bluetooth 33ed7811d65a775cf10f04c2e6ee3cbf
Description: Bluetooth tools and daemons
 This package contains tools and system daemons for using Bluetooth devices.
 .
 BlueZ is the official Linux Bluetooth protocol stack. It is an Open Source
 project distributed under GNU General Public License (GPL).
Homepage: http://www.bluez.org
Original-Maintainer: Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>

Last edited by ALazyDope; 08-03-2020 at 05:26 PM.
 
Old 08-03-2020, 05:27 PM   #34
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 797

Rep: Reputation: 184Reputation: 184
to be clear, did you check the file to see what groups are given access? the groups in my post may not be the same as what is in your conf file.

edit: for example, on my system there is no bluetooth group. i get access by being in the lp group. that is why it is important to check the conf file before adding yourself to groups that might not even exist.

Last edited by cordx; 08-03-2020 at 05:40 PM. Reason: to clarify
 
Old 08-03-2020, 07:20 PM   #35
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 797

Rep: Reputation: 184Reputation: 184
looks like it is bluetooth
Quote:
<!-- This configuration file specifies the required security policies
for Bluetooth core daemon to work. -->

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

<!-- ../system.conf have denied everything, so we just punch some holes -->

<policy user="root">
<allow own="org.bluez"/>
<allow send_destination="org.bluez"/>
<allow send_interface="org.bluez.Agent1"/>
<allow send_interface="org.bluez.MediaEndpoint1"/>
<allow send_interface="org.bluez.MediaPlayer1"/>
<allow send_interface="org.bluez.Profile1"/>
<allow send_interface="org.bluez.GattCharacteristic1"/>
<allow send_interface="org.bluez.GattDescriptor1"/>
<allow send_interface="org.bluez.LEAdvertisement1"/>
<allow send_interface="org.freedesktop.DBus.ObjectManager"/>
<allow send_interface="org.freedesktop.DBus.Properties"/>
<allow send_interface="org.mpris.MediaPlayer2.Player"/>
</policy>

<!-- allow users of bluetooth group to communicate -->
<policy group="bluetooth">
<allow send_destination="org.bluez"/>
</policy>

<policy context="default">
<allow send_destination="org.bluez"/>
</policy>

</busconfig>
add an existing user account to a group.
 
Old 08-03-2020, 07:56 PM   #36
ALazyDope
Member
 
Registered: Jul 2020
Posts: 57

Original Poster
Rep: Reputation: Disabled
I was able to add myself to the bluetooth group
Code:
alazydope : alazydope sys adm sudo bluetooth
but still no success, if there's anything else you might suggest, I would really appreciate it, I'm going to try reinstalling bluez and hoping for the best
 
Old 08-03-2020, 08:02 PM   #37
ALazyDope
Member
 
Registered: Jul 2020
Posts: 57

Original Poster
Rep: Reputation: Disabled
I was able to add myself to the bluetooth group
Code:
alazydope : alazydope sys adm sudo bluetooth
but still no success, if there's anything else you might suggest, I would really appreciate it
 
Old 08-03-2020, 08:16 PM   #38
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 797

Rep: Reputation: 184Reputation: 184
i installed pop 20.04 in a vm and grabbed a copy of these conffiles. i haven't gone through them line by line, but they look very similar to what i have on my system so i don't know that pop has added much to a stock bluez installation. posting the contents in case you want to check them against what you have after you re-install.

/etc/bluetooth/input.conf
Code:
# Configuration file for the input service

# This section contains options which are not specific to any
# particular interface
[General]

# Set idle timeout (in minutes) before the connection will
# be disconnect (defaults to 0 for no timeout)
#IdleTimeout=30

# Enable HID protocol handling in userspace input profile
# Defaults to false (HIDP handled in HIDP kernel module)
#UserspaceHID=true

# Limit HID connections to bonded devices
# The HID Profile does not specify that devices must be bonded, however some
# platforms may want to make sure that input connections only come from bonded
# device connections. Several older mice have been known for not supporting
# pairing/encryption.
# Defaults to false to maximize device compatibility.
#ClassicBondedOnly=true

# LE upgrade security
# Enables upgrades of security automatically if required.
# Defaults to true to maximize device compatibility.
#LEAutoSecurity=true[/QUOTE]

/etc/bluetooth/main.conf
[QUOTE]#ReconnectUUIDs=00001112-0000-1000-8000-00805f9b34fb, 0000111f-0000-1000-8000-00805f9b34fb, 0000110a-0000-1000-8000-00805f9b34fb

# ReconnectAttempts define the number of attempts to reconnect after a link
# lost. Setting the value to 0 disables reconnecting feature.
#ReconnectAttempts=7

# ReconnectIntervals define the set of intervals in seconds to use in between
# attempts.
# If the number of attempts defined in ReconnectAttempts is bigger than the
# set of intervals the last interval is repeated until the last attempt.
#ReconnectIntervals=1, 2, 4, 8, 16, 32, 64

# AutoEnable defines option to enable all controllers when they are found.
# This includes adapters present on start as well as adapters that are plugged
# in later on. Defaults to 'false'.
AutoEnable=true
/etc/bluetooth/network.conf
Code:
# Configuration file for the network service

[General]

# Disable link encryption: default=false
#DisableSecurity=true
/etc/dbus-1/system.d/bluetooth.conf
Code:
<!-- This configuration file specifies the required security policies
     for Bluetooth core daemon to work. -->

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- ../system.conf have denied everything, so we just punch some holes -->

  <policy user="root">
    <allow own="org.bluez"/>
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.Agent1"/>
    <allow send_interface="org.bluez.MediaEndpoint1"/>
    <allow send_interface="org.bluez.MediaPlayer1"/>
    <allow send_interface="org.bluez.Profile1"/>
    <allow send_interface="org.bluez.GattCharacteristic1"/>
    <allow send_interface="org.bluez.GattDescriptor1"/>
    <allow send_interface="org.bluez.LEAdvertisement1"/>
    <allow send_interface="org.freedesktop.DBus.ObjectManager"/>
    <allow send_interface="org.freedesktop.DBus.Properties"/>
    <allow send_interface="org.mpris.MediaPlayer2.Player"/>
  </policy>

  <!-- allow users of bluetooth group to communicate -->
  <policy group="bluetooth">
    <allow send_destination="org.bluez"/>
  </policy>

  <policy context="default">
    <allow send_destination="org.bluez"/>
  </policy>

</busconfig>
/etc/init.d/bluetooth
Code:
#! /bin/sh
### BEGIN INIT INFO
# Provides: bluetooth
# Required-Start:    $local_fs $syslog $remote_fs dbus
# Required-Stop:     $local_fs $syslog $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start bluetooth daemons
### END INIT INFO
#
# bluez    Bluetooth subsystem starting and stopping
#
# originally from bluez's scripts/bluetooth.init
#
# Edd Dumbill <ejad@debian.org>
# LSB 3.0 compilance and enhancements by Filippo Giunchedi <filippo@debian.org>
#
# Updated for bluez 4.7 by Mario Limonciello <mario_limonciello@dell.com>
# Updated for bluez 5.5 by Nobuhiro Iwamatsu <iwamatsu@debian.org>
#
# Note: older daemons like dund pand hidd are now shipped inside the
# bluez-compat package

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DESC=bluetooth

DAEMON=/usr/sbin/bluetoothd
HCIATTACH=/usr/bin/hciattach

BLUETOOTH_ENABLED=0
HID2HCI_ENABLED=1
HID2HCI_UNDO=1

SDPTOOL=/usr/bin/sdptool

# If you want to be ignore error of "org.freedesktop.hostname1",
# please enable NOPLUGIN_OPTION.
# NOPLUGIN_OPTION="--noplugin=hostname"
NOPLUGIN_OPTION=""
SSD_OPTIONS="--oknodo --quiet --exec $DAEMON -- $NOPLUGIN_OPTION"

test -f $DAEMON || exit 0

# FIXME: any of the sourced files may fail if/with syntax errors
test -f /etc/default/bluetooth && . /etc/default/bluetooth
test -f /etc/default/rcS && . /etc/default/rcS

. /lib/lsb/init-functions

set -e

# FIXME: this function is possibly a no-op
run_sdptool()
{
	# declaring IFS local in this function, removes the need to
	# save/restore it
	local IFS o

	test -x $SDPTOOL || return 1

# FIXME: where does SDPTOOL_OPTIONS come from?
	if ! test -z "$SDPTOOL_OPTIONS" ; then
		IFS=";"
		for o in $SDPTOOL_OPTIONS ; do
			#echo "execing $SDPTOOL $o"
			IFS=" "
			if [ "$VERBOSE" != no ]; then
				$SDPTOOL $o
			else
				$SDPTOOL $o >/dev/null 2>&1
			fi
		done
	fi
}

hci_input()
{
    log_progress_msg "switching to HID/HCI no longer done in init script, see /usr/share/doc/bluez/NEWS.Debian.gz" || :
}
alias enable_hci_input=hci_input
alias disable_hci_input=hci_input

case $1 in
  start)
	log_daemon_msg "Starting $DESC"

	if test "$BLUETOOTH_ENABLED" = 0; then
		log_progress_msg "disabled. see /etc/default/bluetooth"
		log_end_msg 0
		exit 0
	fi

	start-stop-daemon --start --background $SSD_OPTIONS
	log_progress_msg "${DAEMON##*/}"

	run_sdptool || :

	if test "$HID2HCI_ENABLED" = 1; then
		enable_hci_input
	fi

	log_end_msg 0
  ;;
  stop)
	log_daemon_msg "Stopping $DESC"
	if test "$BLUETOOTH_ENABLED" = 0; then
		log_progress_msg "disabled."
		log_end_msg 0
		exit 0
	fi
	if test "$HID2HCI_UNDO" = 1; then
		disable_hci_input
	fi
	start-stop-daemon --stop $SSD_OPTIONS
	log_progress_msg "${DAEMON}"
	log_end_msg 0
  ;;
  restart|force-reload)
	$0 stop
	sleep 1
	$0 start
  ;;
  status)
	status_of_proc "$DAEMON" "$DESC" && exit 0 || exit $?
  ;;
  *)
	N=/etc/init.d/bluetooth
	echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
	exit 1
	;;
esac

exit 0

# vim:noet

Last edited by cordx; 08-05-2020 at 11:17 AM.
 
Old 08-05-2020, 10:26 AM   #39
ALazyDope
Member
 
Registered: Jul 2020
Posts: 57

Original Poster
Rep: Reputation: Disabled
My main.conf looks quite a bit different, but I haven't changed anything personally, also Pop_OS doesn't come stock with KDE Plasma so I installed that, would that have any effect on the bluetooth config?
Code:
[General]

# Default adaper name
# Defaults to 'BlueZ X.YZ'
#Name = BlueZ

# Default device class. Only the major and minor device class bits are
# considered. Defaults to '0x000000'.
#Class = 0x000100

# How long to stay in discoverable mode before going back to non-discoverable
# The value is in seconds. Default is 180, i.e. 3 minutes.
# 0 = disable timer, i.e. stay discoverable forever
#DiscoverableTimeout = 0

# How long to stay in pairable mode before going back to non-discoverable
# The value is in seconds. Default is 0.
# 0 = disable timer, i.e. stay pairable forever
#PairableTimeout = 0

# Automatic connection for bonded devices driven by platform/user events.
# If a platform plugin uses this mechanism, automatic connections will be
# enabled during the interval defined below. Initially, this feature
# intends to be used to establish connections to ATT channels. Default is 60.
#AutoConnectTimeout = 60

# Use vendor id source (assigner), vendor, product and version information for
# DID profile support. The values are separated by ":" and assigner, VID, PID
# and version.
# Possible vendor id source values: bluetooth, usb (defaults to usb)
#DeviceID = bluetooth:1234:5678:abcd

# Do reverse service discovery for previously unknown devices that connect to
# us. This option is really only needed for qualification since the BITE tester
# doesn't like us doing reverse SDP for some test cases (though there could in
# theory be other useful purposes for this too). Defaults to 'true'.
#ReverseServiceDiscovery = true

# Enable name resolving after inquiry. Set it to 'false' if you don't need
# remote devices name and want shorter discovery cycle. Defaults to 'true'.
#NameResolving = true

# Enable runtime persistency of debug link keys. Default is false which
# makes debug link keys valid only for the duration of the connection
# that they were created for.
#DebugKeys = false

# Restricts all controllers to the specified transport. Default value
# is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW).
# Possible values: "dual", "bredr", "le"
# ControllerMode = dual

# Enables Multi Profile Specification support. This allows to specify if
# system supports only Multiple Profiles Single Device (MPSD) configuration
# or both Multiple Profiles Single Device (MPSD) and Multiple Profiles Multiple
# Devices (MPMD) configurations.
# Possible values: "off", "single", "multiple"
#MultiProfile = off

# Permanently enables the Fast Connectable setting for adapters that
# support it. When enabled other devices can connect faster to us,
# however the tradeoff is increased power consumptions. This feature
# will fully work only on kernel version 4.1 and newer. Defaults to
# 'false'.
#FastConnectable = false

[Policy]

# The ReconnectUUIDs defines the set of remote services that should try
# to be reconnected to in case of a link loss (link supervision
# timeout). The policy plugin should contain a sane set of values by
# default, but this list can be overridden here. By setting the list to
# empty the reconnection feature gets disabled.
#ReconnectUUIDs=00001112-0000-1000-8000-00805f9b34fb, 0000111f-0000-1000-8000-00805f9b34fb, 0000110a-0000-1000-8000-00805f9b34fb

# ReconnectAttempts define the number of attempts to reconnect after a link
# lost. Setting the value to 0 disables reconnecting feature.
#ReconnectAttempts=7

# ReconnectIntervals define the set of intervals in seconds to use in between
# attempts.
# If the number of attempts defined in ReconnectAttempts is bigger than the
# set of intervals the last interval is repeated until the last attempt.
#ReconnectIntervals=1, 2, 4, 8, 16, 32, 64

# AutoEnable defines option to enable all controllers when they are found.
# This includes adapters present on start as well as adapters that are plugged
# in later on. Defaults to 'false'.
AutoEnable=true
network.conf, system.d/bluetooth.conf, and init.d/bluetooth seem to be the exact same however
 
Old 08-05-2020, 11:15 AM   #40
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 797

Rep: Reputation: 184Reputation: 184
Quote:
Originally Posted by ALazyDope View Post
My main.conf looks quite a bit different
my apologies. it seems when i was copying and pasting, i missed the whole top of the main.conf file present in the vm. yours is an almost exact copy (one space of difference on one commented line = not significant at all) of that one.

Quote:
Originally Posted by ALazyDope View Post
also Pop_OS doesn't come stock with KDE Plasma so I installed that, would that have any effect on the bluetooth config?
i haven't done any work with installing extra desktops, but since the mistake above was one of omission on my part it would seem your system looks almost exactly like a stock new installation. i have read other people having some config issues with settings stored in /home/user by some who installed a different desktop. then there are others who say they don't have any issues with multiple desktops.

so far my focus has been on the conffiles listed by dpkg -s. i scanned my /home/user/.config and even other hidden files or directories in /home/user to see if anything there appears to be bluetooth related. i didn't see anything in particular, but there is plenty of room there for some setting i just don't recognize to exist for sure.
 
Old 08-06-2020, 09:23 AM   #41
ALazyDope
Member
 
Registered: Jul 2020
Posts: 57

Original Poster
Rep: Reputation: Disabled
A clean install is really my last resort
An extra note is that the hardware I am using is a builtin bluetooth adapter that is on my Asrock x570 motherboard

I am doing to try a live boot and see if that fixes anything
 
Old 08-06-2020, 09:40 AM   #42
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 797

Rep: Reputation: 184Reputation: 184
to clarify, my suggestion of testing in a live boot setup was in hopes that you could get an idea of whether or not a clean install might be helpful. it won't fix anything presently malfunctioning on your system. i think you get that. i just wanted to make sure my suggestion was clear.

if you do a clean install, i would suggest trying everything before adding kde again (if you intend to do so) to get a baseline to compare with in case that did play some part in what went wrong.
 
Old 08-06-2020, 10:18 AM   #43
ALazyDope
Member
 
Registered: Jul 2020
Posts: 57

Original Poster
Rep: Reputation: Disabled
The strange thing is that, there wasn't a clear cause for it to stop working, as I already had KDE installed for a few days before it broke, and the only change I made to the system in a reasonable time period before it broke was changing my hostname
 
1 members found this post helpful.
Old 08-06-2020, 10:25 AM   #44
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 797

Rep: Reputation: 184Reputation: 184
agreed that it can be hard, if not impossible, to either understand or track down what change made things go weird. it is good to hear that things worked with kde in general. did you ever try the headset before adding kde?

like i said before, i don't use pop but since it is based on ubuntu it likely makes use of unattended upgrades which may make some changes to installed packages in the background that you might never be aware of.
 
Old 08-06-2020, 10:32 AM   #45
ALazyDope
Member
 
Registered: Jul 2020
Posts: 57

Original Poster
Rep: Reputation: Disabled
A breakthrough, if you can call it that

It still won't work on a live boot from a USB

Exact same issue; Terminal says paired, headset is not paired, no audio data sent

I'm going to try to find a USB bluetooth adapter

Last edited by ALazyDope; 08-06-2020 at 10:34 AM.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
5.1 surrond sound via Digital in Pop_Os snowyhare Linux - Software 1 09-05-2022 11:18 AM
Problem with installation POP_OS 20.04LTS on Acer Aspire 3 from USB - can't see drive ppahljina Linux - Laptop and Netbook 6 05-31-2020 06:22 AM
5.1 Surrond sound POP_OS snowyhare Linux - Hardware 2 04-24-2020 05:44 AM
Bluetooth can pair devices but there is no connectivity bobsie Slackware 9 11-11-2013 03:42 AM
How to pair bluetooth devices? JET-33 Linux - Software 1 08-24-2007 11:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration