161

Logitech has a Unifying receiver that you can add several devices using the same USB device. Is this supported in Ubuntu and if so do I have to additionally configure something so that when adding a new wireless device it gets recognized by the same receiver.

Info: http://www.logitech.com/en-us/66/6079

Luis Alvarado
  • 211,503

7 Answers7

215

I've a Logitech Illuminated Keyboard and M525 mouse here, both are using the Logitech Unifying USB receiver. They works out-of-the box, Plug & Play!

lsusb | grep Logitech:

Bus 002 Device 004: ID 046d:c52b Logitech, Inc. Unifying Receiver

dmesg | grep Logitech:

input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/input/input2
generic-usb 0003:046D:C52B.0001: input,hidraw0: USB HID v1.11 Keyboard [Logitech USB Receiver] on usb-0000:00:1d.0-1.2/input0
input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.1/input/input3
generic-usb 0003:046D:C52B.0002: input,hiddev0,hidraw1: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-0000:00:1d.0-1.2/input1
generic-usb 0003:046D:C52B.0003: hiddev0,hidraw2: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:1d.0-1.2/input2

Having that said, Logitech only supports Unifying software for Windows and Mac OS X. For Linux, I have created the ltunify tool which is described in detail on my article Logitech Unifying for Linux: Reverse Engineering and unpairing tool. Quick installation instructions if you are in a hurry:

sudo apt-get install git gcc
git clone https://git.lekensteyn.nl/ltunify.git
cd ltunify
make install-home

This will fetch the sources and install the program to $HOME/bin/ltunify, if $HOME/bin did not exist before, then you may have to re-login or reopen your terminal. After doing so, you can pair a new device with the sudo ltunify pair command and unpair devices with a command like sudo ltunify unpair mouse (be sure to have a second device that you can use after detaching your Unifying device!).

A graphical tool is also available, Solaar. It has better support for functionality of newer devices such as swapping the functionality of FN keys. It is available though the ppa:daniel.pavel/solaar PPA (if you do not know how to install such a "PPA", see What are PPAs and how do I use them?). After installation, you can search for Solaar in the applications menu and start it from there.

Lekensteyn
  • 174,277
  • 2
    @Jeff There is a known issue with USB 3.0 in older kernels, see http://askubuntu.com/q/269762/6969 – Lekensteyn Jun 07 '13 at 22:27
  • I am sorry but I have been unable to get this to work for my set up. I am running Ubuntu 13.04 an have 2 mice and 1 keyboard please help. – powell4076 Jun 15 '13 at 22:57
  • @powell4076 You need to add what devices you have. You will get more help related to this problem if you talk directly with the developer of Solaar as I am. Helping him will help us all Logitech users. – Luis Alvarado Jul 03 '13 at 23:31
  • 1
    @Lekensteyn I followed the instructions to the letter on Ubuntu 13.04 but get the following error when using the sudo ltunify pair command: "sudo: ltunify: command not found". I am sitting in the ~/ltunify$ directory properly and had no errors or issues installing. – MAllen22842 Mar 31 '14 at 16:00
  • 3
    @MAllen22842 With the udev rules installed, you should not need sudo. If you cannot get the udev rules to work, try sudo ./ltunify ... instead. – Lekensteyn Mar 31 '14 at 16:05
  • @Lekensteyn Thanks for your efforts mate. Despite my mouse being on, I'm getting an error is saying: "No Logitech Unifying Receiver device found". Any idea what could be the problem? My receiver ID is the same as yours however I'm trying to connect a M705 mouse. – pandita Jan 29 '15 at 08:41
  • @Lekensteyn The problem solved itself in unknown ways.... http://crunchbang.org/forums/viewtopic.php?id=38805. Thanks. – pandita Jan 29 '15 at 09:19
  • It works - thanks so much! I even ignored all errors and did other hacky stuff lol. –  Aug 18 '17 at 18:53
  • in Ubuntu 17.10 it says The program 'make' can be found in the following packages:
    • make
    • make-guile

    Try: sudo apt install

    – Shuddh Jan 30 '18 at 19:47
  • 1
    6 years later, it still works. Great job, @Lekensteyn ! – Askar Kalykov Mar 01 '18 at 18:58
  • 2
    !! Solaar. Had to apt-get twice, but worked GREAT. https://www.omgubuntu.co.uk/2013/12/logitech-unifying-receiver-linux-solaar – MattC Nov 06 '19 at 23:34
  • You can build in docker if you want to: mkdir -p $HOME/bin ; docker run -it -v /etc/localtime:/etc/localtime -v $HOME/bin:/home-bin ubuntu bash -c "apt-get update && apt-get -y install gcc mono-mcs make git && rm -rf /var/lib/apt/lists/* && mkdir -p \$HOME/bin && git clone https://git.lekensteyn.nl/ltunify.git && cd ltunify && make install-home && cp -v \$HOME/bin/ltunify /home-bin/" - Replace with ubuntu:<version> if you want to build for a particular version - not latest. – sastorsl Apr 26 '22 at 10:45
  • @Lekensteyn Will the unifying receiver only pair with Logitech hardware? – Bastion Sep 02 '22 at 00:38
105

I would like to complement Lekensteyn's answer by including a feature I did not know about. I have a Logitech Anywhere MX mouse and when the batteries were almost out, I got the following message:

enter image description here

So the Unifying receiver is not only supported by it offers (Depending on the device) several features like the image above. This image was with Ubuntu 12.10

On Ubuntu 14.04 with version 0.9.2 you can see the following:

  • A panel icon (Battery icon) that measures how much battery the wireless mouse has left
  • A menu (After clicking the battery icon) that shows all mice that have been paired
  • Clicking on the Unified Receiver option will reveal a second window that shows each mouse individually with several options.

enter image description here

I recommend to read this excellent article about Logitech Unifying Technology written by Lekensteyn.

Note that on latest versions, there is no need for the PPA as this already comes in the Universe Repository with the solaar-gnome3 (For Gnome3/Unity) and solaar packages.

Also see the list of current supported devices and to install it if you are not on a latest Ubuntu version simply run the following lines:

sudo apt-get update   
sudo apt-get install solaar   

Logout and login again and Solaar should appear on your top panel. You can also execute the app from the Dash by typing "Solaar".

Here are some images of several Logitech mice working together with one unified receiver:

enter image description here

enter image description here

enter image description here

Solaar offers an easier way to know how much battery you have left, how much time you have let, which mouse you are using and more. It also offers special features like detecting if the battery is charging:

enter image description here

The following 2 images are from Ubuntu 16.04 64-bit With Solaar:

enter image description here

enter image description here

Luis Alvarado
  • 211,503
  • 6
    This is a feature of UPower contributed by Julien Danjou, I mentioned this in the conclusion of my article. – Lekensteyn Apr 25 '13 at 16:49
  • 1
    FYI, the (approximate) power status can also be retrieved using upower -i <path of receiver>. For the path, run upower -e. Some devices are currently not supported by the version 0.9.20 of UPower (or broken in 0.9.21). (I have submitted some patches for that.) Btw, I would +1 you again if I could for those nice screenshots. – Lekensteyn Aug 07 '13 at 22:56
  • 1
    The solaar repository doesn't work if you're on 14.10 (Utopic) or 15.04 (Vivid). sudo apt-get update fails with W: Failed to fetch http://ppa.launchpad.net/daniel.pavel/solaar/ubuntu/dists/vivid/main/binary-amd64/Packages 404 Not Found and again for binary-i386/Packages. Indeed, http://ppa.launchpad.net/daniel.pavel/solaar/ubuntu/dists/ only lists packages up to 14.04 (trusty). A bug has been filed on github, https://github.com/pwr/Solaar/issues/232 , with a workaround in the comments. – skierpage Aug 11 '15 at 19:00
  • 4
    The PPA repository is not needed for the latest releases starting from Vivid Vervet, since solaar and solaar-gnome3 are included in the Universe repository. @skierpage – jarno Oct 19 '15 at 06:56
  • Are the special options only available when the Wireless Link is not encrypted? I have the MX Vertical and the MX Keys and both are not having any special options unfortunately. I just want to configure these devices... – phrogg Jan 30 '20 at 16:38
  • 1
    @PhilRoggenbuck I have no clue but that is a good question. – Luis Alvarado Jan 30 '20 at 19:04
  • The supported devices can now be found at: https://pwr-solaar.github.io/Solaar/devices – dmiller2117 Apr 09 '20 at 15:35
37

The first device you plug in just works, but if you get another keyboard or mouse then you need to pair it with the existing receiver. Here's a script you can use to pair your devices on Linux:

Works great.

Jorge Castro
  • 71,754
  • 1
    Needed to convert the [[ and ]] in its autopair.sh to [ and ] but then it worked perfectly! Many thanks. – taneli Jan 17 '13 at 15:09
  • 2
    Just tried it on Ubuntu 14.04 with a M305 and Unifyint receiver and this works perfectly! – Elijah Lynn Aug 09 '14 at 12:33
  • ... but if you get another keyboard or mouse then you need to pair it with the existing receiver This sentence helped a lot. Thanks. – Asme Just Dec 19 '17 at 03:30
2

One of the strengths of Linux is that if you have a problem, someone will find an elegant solution to that problem - and they'll share it.

In this case, a gentleman named Daniel Pavel created an application called Solaar. This application provides a very elegant interface to manage the Logitech Unifying Receiver and the devices attached to it.

This article describes the application and provides installation instructions: http://www.webupd8.org/2013/07/pair-unpair-logitech-unifying-devices.html

I have been using Solaar for a while and I have found it to be very useful.

I hope this helps,

fballem
  • 87
1

I have a Logitech K360 Keyboard, Logitech Wireless Trackpad, and a Logitech M510 Wireless Mouse, all working through the same unifying receiver.

I configured the devices initially on a Windows machine, then moved the unifying receiver to my Linux box (running ubuntu 12.04). All of the devices work well most of the time.

I have encountered two issues:

The first issue is that I would like to configure different speeds for the trackpad and the mouse, but they are jointly recognised as a mouse, so there is only one configuration possible.

The second issue is that from time-to-time, I appear to lose the signal. In other words, none of the devices will work - or they will stop working. I encounter this on Windows as well - just one of those things. I pull the receiver from the usb slot and then re-insert it and the signal is restored - the devices work.

I am happy with the arrangement, although I do wish that I could find a solution to the first issue.

Hope this helps,

fballem
  • 87
  • 1
    the loss of signal happens when there's a USB device close to the USB port of your receiver.. I was going crazy over that then I just switched ports (put the receiver far away) – George Katsanos Apr 17 '13 at 13:59
1

if you are more new to Ubuntu , follow these steps this is the same answer as above but in steps using: https://github.com/treeder/logitech_unifier

click on the files autopair.sh and then click on raw, then save as, save it in any path you like. now go back and download unify.c the same way and put it into the same folder. now either right click on the autopair.sh and in permissions allow excuting it. now you should be able to run it by double clicking if not , press ctrl+L and copy that path push ctrl+shift+t write cd then push ctrl+shift+v and press enter now write

chmod +x autopair.sh

and press enter now you can run it by writing ./autopair.sh and pressing enter

that should be all telling you to turn off the device and press enter then you turn on the device and that's it , repeat for more devices. I could guess if the compiler doesnt work you need to install build essentials. by running

sudo apt-get install build-essential

now do the above instructions again . if it still is no go, maybe you can pair using another computer.

TheNano
  • 627
  • This is the solution that made my mouse and keyboard work. I had to use two receivers for them to work. Now I just need one single receiver. THANK YOU! – Luis Lobo Borobia Sep 29 '15 at 22:08
0

Building on the answer from @Lekensteyn you can build the ltunify program in docker - if you don't want to install all kinds of dependencies for one-off tasks:

mkdir -p $HOME/bin &&
docker run -it \
  -v /etc/localtime:/etc/localtime \
  -v $HOME/bin:/home-bin \
  ubuntu bash -c "
    apt-get update &&
    apt-get -y install gcc mono-mcs make git &&
    rm -rf /var/lib/apt/lists/* &&
    mkdir -p \$HOME/bin &&
    git clone https://git.lekensteyn.nl/ltunify.git &&
    cd ltunify &&
    make install-home &&
    cp -v \$HOME/bin/ltunify /home-bin/"

Verified on the ubuntu:20.04 docker image. The binary worked well in adding a Logitech K520 keyboard in addition to my mouse to my laptop running Ubuntu 20.04 LTS.

sastorsl
  • 463