I can't take credit for this. I found this info on an Ubuntu 18.04 forum some time ago. I've just tidied up the formatting and put it here for my benefit. Thanks to whoever supplied the info initially.

My bluetooth Mouse (Logitech M557) wouldn't automatially connect via bluetooth when powering on my laptop. The following procedure resolved the issue.

  1. Manually connect bluetooth mouse
  2. Open a terminal session
  3. Type bluetoothctl
  4. If you don't see a list of device connected, type devices
  5. Find the mac address for the mouse device in question
  6. Type info 00:00:00:00:00:00, using the mac address of the device
  7. Confirm Trusted: no
  8. Type trust 00:00:00:00:00:00
  9. Type info 00:00:00:00:00:00 to confirm trust succeeded.

This resolved the issue for me on a Dell XPS 9370 running Ubuntu 18.04.

Terminal Output

[email protected]:~$ bluetoothctl
[NEW] Controller 9C:B6:D0:8D:07:DA KING-BOB [default]
[NEW] Device E4:04:39:75:BC:DF E4-04-39-75-BC-DF
[NEW] Device B8:C1:11:79:71:A1 Mine, not yours. 
[NEW] Device 34:88:5D:86:42:0F Bluetooth Mouse M557
[NEW] Device 00:0D:44:A5:A6:00 UE Mobile Boombox
Agent registered
[bluetooth]# devices
Device E4:04:39:75:BC:DF E4-04-39-75-BC-DF
Device B8:C1:11:79:71:A1 Mine, not yours. 
Device 34:88:5D:86:42:0F Bluetooth Mouse M557
Device 00:0D:44:A5:A6:00 UE Mobile Boombox
[bluetooth]# info 34:88:5D:86:42:0F
Device 34:88:5D:86:42:0F (public)
	Name: Bluetooth Mouse M557
	Alias: Bluetooth Mouse M557
	Class: 0x00000580
	Icon: input-mouse
	Paired: yes
	Trusted: no
	Blocked: no
	Connected: no
	LegacyPairing: no
	UUID: Service Discovery Serve.. (00001000-0000-1000-8000-00805f9b34fb)
	UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
	UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
	Modalias: usb:v046DpB010d1001
[bluetooth]# trust 34:88:5D:86:42:0F
[CHG] Device 34:88:5D:86:42:0F Trusted: yes
Changing 34:88:5D:86:42:0F trust succeeded
[bluetooth]# info 34:88:5D:86:42:0F
Device 34:88:5D:86:42:0F (public)
	Name: Bluetooth Mouse M557
	Alias: Bluetooth Mouse M557
	Class: 0x00000580
	Icon: input-mouse
	Paired: yes
	Trusted: yes
	Blocked: no
	Connected: no
	LegacyPairing: no
	UUID: Service Discovery Serve.. (00001000-0000-1000-8000-00805f9b34fb)
	UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
	UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
	Modalias: usb:v046DpB010d1001
[bluetooth]# exit
Agent unregistered
[DEL] Controller 9C:B6:D0:8D:07:DA KING-BOB [default]
[email protected]:~$