# [SOLVED] No Touchpad After Install



## Israel (Jan 19, 2021)

Recently I got a Asus Tuf Gaming A17 laptop. After a while I was able to resolve my wifi problems, but I'm still not able to use the touchpad. Usually I just install xf86-input-synaptics and that fixes it. I installed xf86-input-synaptics and libsynaptics, but no change. I added 'hw.psm.synaptics_support="1"' to /boot/loader.conf. I tried a couple examples of /usr/local/etc/X11/xorg.conf like this:


```
Section "InputClass"
  Identifier "touchpad"
  MatchIsTouchpad "on"
  Driver "libinput"
  Option "Tapping" "on"
EndSection
```

I tried the bsdconfig utility, but none of the options under mouse changed anything. I did notice this though:

$ synclient
Couldn't find synaptics properties. No synaptics driver loaded?

I tried searching for that online, but did not find a resolution. It seems like a driver isn't loaded, though I'm not sure how to resolve this.

Also, moused is disabled. Any suggestions appreciated.


----------



## phalange (Jan 19, 2021)

Israel said:


> Usually I just install xf86-input-synaptics and that fixes it.


Meaning you've had FreeBSD on this device before and the trackpad worked?

I have two Asus laptops, one similar to yours and the touchpad is a no-go because it's elantech i2c. Someone wrote a driver I think but it's not part of FreeBSD. I can't find it just now, but I believe it's on Github.


----------



## Israel (Jan 19, 2021)

No, I was referring to other laptops in the past. Is this the driver you are referring to?









						GitHub - renic/freebsd-elantech
					

Contribute to renic/freebsd-elantech development by creating an account on GitHub.




					github.com


----------



## Mjölnir (Jan 19, 2021)

RTFM psm(4) & moused(8).  If your touchpad is supported, usually _(corrected)_ `sysrc moused_flags+=" -l 2"` (set psm(4) to _level 2_: enable extended mouse communication protocol), `service moused enable` followed by `service moused start` should enable the specialized touchpad driver to get the extended data to & from the touchpad.  Otherwise, the touchpad will claim to be an ordinary PS/2 mouse.  For the average use-case, I recommend not to have a xorg.conf(5) file, but instead to rely on Xorg(1)'s _automagic_ configuration.
EDIT From `pkg info -D xorg-server`: [...] add `kern.evdev.rcpt_mask=6` to sysctl.conf(5) (at runtime: `sysctl kern.evdev.rcpt_mask=6`).


----------



## Israel (Jan 20, 2021)

mjollnir said:


> RTFM psm(4) & moused(8).  If your touchpad is supported, usually `sysrc moused_flags +=" -l 2"` (set psm(4) to _level 2_: enable extended mouse communication protocol), `service moused enable` followed by `service moused start` should enable the specialized touchpad driver to get the extended data to & from the touchpad.  Otherwise, the touchpad will claim to be an ordinary PS/2 mouse.  For the average use-case, I recommend not to have a xorg.conf(5) file, but instead to rely on Xorg(1)'s _automagic_ configuration.


Here's what I got when I ran your commands:
`# sysrc moused_flags +=" -l 2"
moused_flags: 
# service moused enable
moused enabled in /etc/rc.conf
# service moused start
Starting default moused
moused: unable to open /dev/psm0: No such file or directory`

I don't think that first one is right since mouse_flags: seemed to reply empty. Obviously something is wrong with the 3rd command, or something needs to happen before the execution of these commands.

I'm glad someone is helping me, but let's please try to be nicer than saying RTFM. I might be new to FreeBSD, but if I knew which manual to research, I would have done it. I'm just trying to learn here. I'm going to look into the driver Phalange mentioned now, but if you have other suggestions on correcting or changing the commands you provided I'll be willing to try.

Thanks


----------



## Israel (Jan 20, 2021)

phalange said:


> Meaning you've had FreeBSD on this device before and the trackpad worked?
> 
> I have two Asus laptops, one similar to yours and the touchpad is a no-go because it's elantech i2c. Someone wrote a driver I think but it's not part of FreeBSD. I can't find it just now, but I believe it's on Github.


Okay, this is probably gonna show how much of a n00b I am. I found a driver on github I mentioned here earlier that seemed to be what you referred to. I can't seem to find any make file though. Once I go in that folder's directory these are the only files:

`$ find . -type f
./releng10.3/patched/sys/dev/atkbdc/psm.c
./releng10.3/patched/sys/dev/atkbdc/atkbd.c
./releng10.3/patched/sys/dev/atkbdc/atkbdcreg.h
./releng10.3/patched/sys/dev/atkbdc/atkbdc.c
./releng10.3/patched/sys/sys/mouse.h
./releng10.3/patched/usr.sbin/moused/moused.c
./releng10.3/original/usr.sbin/moused/moused.c
./releng10.3/original/sys/sys/mouse.h
./releng10.3/original/sys/dev/atkbdc/atkbd.c
./releng10.3/original/sys/dev/atkbdc/psm.c
./releng10.3/original/sys/dev/atkbdc/atkbdc.c
./releng10.3/original/sys/dev/atkbdc/atkbdcreg.h
./COPYRIGHT
./original.diff
./README.md`

The README didn't seem to have any build steps. Just what to put in /boot/loader.conf after its built. I tried looking for how to build drivers from github for FreeBSD on google, but didn't really find much that would apply to this. Any tips?


----------



## Mjölnir (Jan 20, 2021)

Israel said:


> Here's what I got when I ran your commands:
> # sysrc moused_flags +=" -l 2"


I'm sorry.  The correct command is `sysrc moused_flags+=" -l 2"` without the space.  I'll edit my previous post so that noone copies that typo again.  I _guess_, but don't know, that this is useful for your touchpad, too.  To be clear: without setting the psm(4) driver to level 2, the touchpad should still work, but only as a dumb PS/2 mouse with fixed default settings, and without support for special touchpad drivers & configuration like adjusting the pressure etc.


Israel said:


> [...]
> moused: unable to open /dev/psm0: No such file or directory


This means you do not have the standard PS/2 mouse device/interface to the OS because your touchpad was not detected: it is not a _Synaptics_ touchpad.  From the previous posts I _guess_ yours is an _Elantech_.  You have to set `hw.psm.elantech_support="1"` in loader.conf(5) EDIT and add `kern.evdev.rcpt_mask=6` to sysctl.conf(5), /EDIT then reboot to enable that.  That type of touchpad should be supported by libinput(4) (I see a /usr/local/share/libinput/30-vendor-elantech.quirks), so please do not try to compile a driver yourself.  If it's supported by libinput(4), it should be _automagically_ detected by Xorg(1)'s autoconfiguration.  If it's not supported, it should still be usable as standard PS/2 mouse.  In the latter case, you can revert `sysrc moused_flags-=" -l 2"` and if you do not need the mouse on the console, you can also `service moused disable`.  Good luck.
EDIT You may also want to add `message: "query '[%C/%n] %M'",` to the _ALIAS_ section of /usr/local/etc/pkg.conf and read through all `pkg message|less` to check for other settings requested by any package you installed.


----------



## Mjölnir (Jan 20, 2021)

Israel said:


> [..] I'm glad someone is helping me, but let's please try to be nicer than saying RTFM. I might be new to FreeBSD, but if I knew which manual to research, I would have done it. [...]


Whenever I write RTFM (_read the fine manual page_) I refer to this as: _"You can find related information in ..."._  I don't know why so many people think it has a negative conotation.  At least one person does not mean it in an offensive way, including me.  Please let me know if the infos I gave were helpful.


----------



## Mjölnir (Jan 20, 2021)

Israel said:


> [...]
> ./releng10.3/patched/sys/dev/atkbdc/psm.c
> ./releng10.3/patched/sys/dev/atkbdc/atkbd.c
> ./releng10.3/patched/sys/dev/atkbdc/atkbdcreg.h
> ...


These are changes to the genuine FreeBSD 10.3 source files (in releng10.3/original/) to get that touchpad working.  The changed files are under releng10.3/patched/, and the _diff_ (which can be feeded to patch(1)) is in the file original.diff.  Iff your device is not supported on 12.x, you can try to manually patch that diff into the sources of 12.x by carefully finding the lines that correspond and edit accordingly.  I guess automatic patching will very likely not succeed, given that too many lines have changed since 10.3, and thus patch(1) will fail.


----------



## phalange (Jan 20, 2021)

Israel said:


> No, I was referring to other laptops in the past. Is this the driver you are referring to?
> 
> 
> 
> ...


I wasn't aware of that one. I was thinking of this








						GitHub - wulf7/iichid: Generic HID layer for FreeBSD. Including I2C and USB backends.
					

Generic HID layer for FreeBSD. Including I2C and USB backends. - GitHub - wulf7/iichid: Generic HID layer for FreeBSD. Including I2C and USB backends.




					github.com
				




I can't vouch for it since I didn't install it though.


----------



## phalange (Jan 20, 2021)

mjollnir said:


> Whenever I write RTFM (_read the fine manual page_) I refer to this as: _"You can find related information in ..."._  I don't know why so many people think it has a negative conotation.


I have seen this rendered as Read The Friendly Manual and Read The Fine Manual, but 9 times in 10 people mean Read The F******* Manual (expletive withheld). I know you didn't mean it that way; after all, you've helped me on these forums.

Just saying, I think people take it to mean "don't waste my time if you haven't done your homework" rather than "here's a suggested source for more information."


----------



## free-and-bsd (Jan 20, 2021)

Israel said:


> Recently I got a Asus Tuf Gaming A17 laptop. After a while I was able to resolve my wifi problems, but I'm still not able to use the touchpad. Usually I just install xf86-input-synaptics and that fixes it. ...


Lucky you. I always have to add xf86-input-libinput. For some reason or other, it DOES NOT install this automatically. I can't say it is not my fault (maybe supposed to use some mega-package or whatever they call it), but recently installed on an old Lenovo T61, so I had to _manually_ add this one in addition to synaptics.

EDIT: I remember this was the case when X was migrating to this libinput thing. But I don't do installations every day... so perhaps this bug wasn't resolved?...


----------



## Israel (Jan 20, 2021)

I installed the driver phalange mentioned. Followed the steps and rebooted and the trackpad finally worked! Thank you all for the help and suggestions!
​


----------



## Mjölnir (Jan 21, 2021)

Great!  Then feel free to mark this thread as _solved_, to give others who search the forum an indication that this thread contains a solution:  On the 1st post, click "..." -> edit thread -> prefix: _solved_


----------



## Mjölnir (Jan 25, 2021)

Did you also try x11-drivers/xf86-input-libinput? `pkg install xf86-input-libinput` and be sure to have `hw.psm.elantech_support="1"` in loader.conf(5)


----------

