5

I got a new laptop for Christmas, and it's full of new hardware, so my only option was to install ubuntu 19.10, but among the bugs I've been facing, my touchpad seems to 'freeze up' whenever I have to wake my computer up from sleep, but I still can't figure out how to restart my mouse pad driver, I followed several different sets of instructions from Is there a way to "restart" the touchpad driver? but to no avail

I'm sure the sudo modprobe -r drivername && sudo modprobe drivername would work, but I can't seem to find the driver for my touchpad.

using xinput --list returns

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech Wireless Mouse                   id=9    [slave  pointer  (2)]
⎜   ↳ ELAN Touchscreen                          id=10   [slave  pointer  (2)]
⎜   ↳ MSFT0002:01 04F3:304B Touchpad            id=12   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Integrated Camera: Integrated C           id=11   [slave  keyboard (3)]
    ↳ Ideapad extra buttons                     id=13   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=14   [slave  keyboard (3)]

using xinput disable 12 && xinput enable 12 yields no help.

using grep -iA2 touchpad /proc/bus/input/devices yields:

N: Name="MSFT0002:01 04F3:304B Touchpad"
P: Phys=i2c-MSFT0002:01
S: Sysfs=/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-1/i2c-MSFT0002:01/0018:04F3:304B.0001/input/input23

which indicates that designware is the driver? But using ls $(find /lib/modules/$(uname -r) -type d -name mouse) doesn't show any such driver name:

appletouch.ko  bcm5974.ko  cyapatp.ko  elan_i2c.ko  gpio_mouse.ko  psmouse.ko  sermouse.ko  synaptics_i2c.ko  synaptics_usb.ko  vsxxxaa.ko

I've gone through and systematically restarted each one and none of them seem to be helping, is there somewhere else that a mouse driver would be located that I can look in?

The laptop model I'm using is:

Lenovo IdeaPad S340


Edit

I found a different question from a different forum https://unix.stackexchange.com/questions/423797/how-do-i-disable-i2c-designware-support-when-its-not-built-as-a-module that seems to address a similar issue concerning the built-in designware driver, how do I restart the designware driver, if as the link says, "It's not built as a module"?

iggy12345
  • 76
  • 3
  • 14

2 Answers2

1

When using the built-in mouse driver that comes with ubuntu, I found the best way to do this was to restart the i2c_hid module, this is what i2c_designware uses as the i2c manager. Which is why you can't find it in the lib_modules command.

I as able to figure this out using the lsmod command to list the modules in the kernel, and then looked for the keyword i2c. After that it was kind of a lucky guess to find the correct one.

As @ZanyZachary1 suggested, after finding the module to restart, it's as simple as setting up a bash script to run whenever the laptop is resumed or put to sleep.

#!/bin/sh

case $1/$2 in
  pre/*)
    echo "Going to $2..."
    # Place your pre suspend commands here, or `exit 0` if no pre suspend action required
    modprobe -r i2c_hid
    ;;
  post/*)
    echo "Waking up from $2..."
    # Place your post suspend (resume) commands here, or `exit 0` if no post suspend action required
    sleep 2
    modprobe i2c_hid
    ;;
esac

Then place this in /usr/lib/systemd/system-sleep/

You can find more information on this at: https://www.addictivetips.com/ubuntu-linux-tips/run-scripts-and-commands-on-suspend-and-resume-on-linux/

iggy12345
  • 76
  • 3
  • 14
0

Assuming you have these:

xserver-xorg-input-libinput 
xserver-xorg-input-evdev 
xserver-xorg-input-mouse

(if you don't sudo apt install xserver-xorg-input-libinput xserver-xorg-input-evdev xserver-xorg-input-mouse) You might have to install this: xserver-xorg-input-synaptics
sudo apt install xserver-xorg-input-synaptics