I just installed the Logitech k350 keyboard and m510 mouse not working unless I unplug and replug dongle up to 20 times. (This is on Ubuntu 12.04, I tried this replacing an existing keyboard and mouse and also reinstalling the OS)
I found a number of posts similar to this but the scenario was a little different, and the solution did not help.
The best I got was run this in a start up script:
rmmod hid_logitech_dj modprobe hid_logitech_dj
I tried that (as well as
modprobe -r hid_logitech_dj) and still have to unplug and plug the dongle several times. I also try variations of that, such as a for loop that runs that 10, 20 and 50 times, I even set it to sleep for a couple seconds after each command.
When running that script manually with the for loop I find it randomly either works or doesn't work. IE. I can run it 10 times and 5 times I will have keyboard and mouse, and 5 times I will have to unplug and replug the dongle (once or twice).
The other thing I tried was, #1 the startup script, and #2 also a cronjob that would run every minute to run those commands, after 10 minutes, I didn't have keyboard or mouse. However when I rebooted and left the computer on over night, I had keyboard and mouse in the morning.
Does anyone know a reliable solution for this? The best I have found is the startup script, the crontab, but even after about a 10 minutes I still have unplug and replug the dongle, which isn't a great solution, when you got an SSD harddrive for lightning fast boot times.