I'm using a fresh install of Ubuntu 12.10 on a Samsung NP700Z7C-S01US. The Magic mouse worked out of the box after a successful pairing. But when I suspend the laptop, the magic mouse is inoperable upon resume. I spent the past 72 hours tweaking, and this what I've got:
xinput disable 13 (that's the magic mouse device ID) xinput enable 13
Is the only thing aside from reboot that will make it work again. Restarting the bluetooth service, switching the mouse on/off, disconnecting/connecting it... was useless.
So I tried to stick these commands in /etc/pm/sleep.d/20_magicmouse like so:
#!/bin/sh # /etc/pm/sleep.d/20_magicmouse # Jul Magic mouse reset case $1 in resume|thaw) xinput --disable 13 xinput --enable 13 ;; esac
It doesn't work! Then I tried to suspend the hid_magicmouse and/or bluetooth module in /etc/pm/config.d/10_magicmouse like so:
# /etc/pm/config.d/10_magicmouse # Unload modules upon suspend SUSPEND_MODULES="bluetooth, hid_magicmouse"
I tried a lot of combinations to no avail. I ended up creating an alias and invoking it manually upon resume, but it doesn't satisfy me fully. The Ubuntu experience has been so smooth, that it really breaks the fourth wall.