Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Touchpad settings #109

Merged
merged 9 commits into from Dec 11, 2018

Conversation

@yan12125
Copy link
Member

commented Dec 1, 2016

WARNING: incomplete implementation

This is the first step to https://github.com/lxde/lxqt/issues/92.

Notes:

  1. Depends on X11, udev and libinput. Only xf86-input-libinput driver is supported. Other vendor specific drivers are not supported. I don't plan to implement drivers other than libinput as the latter is preferred now. For example, Arch Linux, Fedora and Gnome suggests moving to libinput
  2. Tested only on Arch Linux with systemd's udev. On systems other than Linux, I guess things won't compile at all
  3. Unlike other configuration tools, the default values are loaded from X.org
  4. You need to run this tool every time after starting up LXQt. I haven't added codes that load touchpad settings to lxqt-session yet
  5. New to UI/UX. Hope to hear opinions on the UI design

TODO:

  1. Check udev and libinput in CMakeLists.txt
  2. Handle non-libinput drivers properly
  3. Add "Device Enabled"
@palinek

This comment has been minimized.

Copy link
Contributor

commented Dec 2, 2016

/home/palco/work/oss/lxqt/lxqt-config/lxqt-config-input/touchpaddevice.cpp:26:10: fatal error: 'xorg/libinput-properties.h' file not found
#include <xorg/libinput-properties.h>
         ^
1 error generated.

The xorg-libinput needs to be checked in cmake phase...

@palinek

This comment has been minimized.

Copy link
Contributor

commented Dec 2, 2016

Failing here....:

add "us" ""
add "sk" "qwerty"
Detected "AlpsPS/2 ALPS DualPoint TouchPad" on "/dev/input/event2"
ASSERT: "values.size() == 3" in file /home/palco/work/oss/lxqt/lxqt-config/lxqt-config-input/touchpaddevice.cpp, line 268
Aborted (core dumped)
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
#1  0x00007fb4966e540a in __GI_abort () at abort.c:89
#2  0x00007fb4979ab541 in qt_message_fatal (context=..., message=<synthetic pointer>) at global/qlogging.cpp:1682
#3  QMessageLogger::fatal (this=this@entry=0x7ffc9604ea00, msg=msg@entry=0x7fb497c603d8 "ASSERT: \"%s\" in file %s, line %d") at global/qlogging.cpp:793
#4  0x00007fb4979a6a0e in qt_assert (assertion=<optimized out>, file=<optimized out>, line=<optimized out>) at global/qglobal.cpp:3081
#5  0x000000000041d72d in TouchpadDevice::scrollingMethodEnabled (this=0x7ffc9604eaf0) at /home/palco/work/oss/lxqt/lxqt-config/lxqt-config-input/touchpaddevice.cpp:268
#6  0x000000000041d44f in TouchpadDevice::enumerate_from_udev () at /home/palco/work/oss/lxqt/lxqt-config/lxqt-config-input/touchpaddevice.cpp:181
#7  0x0000000000419b71 in TouchpadConfig::TouchpadConfig (this=0x19168d0, _settings=0x7ffc9604f048, parent=0x7ffc9604efe8)
    at /home/palco/work/oss/lxqt/lxqt-config/lxqt-config-input/touchpadconfig.cpp:32
#8  0x000000000040a17a in main (argc=1, argv=0x7ffc9604f178) at /home/palco/work/oss/lxqt/lxqt-config/lxqt-config-input/lxqt-config-input.cpp:55

Update:
System: debian unstable

@yan12125

This comment has been minimized.

Copy link
Member Author

commented Dec 2, 2016

Hmm the assertion failure is out of my expectation. What the output of this command?

xinput --list-props "AlpsPS/2 ALPS DualPoint TouchPad"
@palinek

This comment has been minimized.

Copy link
Contributor

commented Dec 2, 2016

$ xinput --list-props "AlpsPS/2 ALPS DualPoint TouchPad"
Device 'AlpsPS/2 ALPS DualPoint TouchPad':
        Device Enabled (140):   1
        Coordinate Transformation Matrix (142): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        Device Accel Profile (272):     1
        Device Accel Constant Deceleration (273):       2.500000
        Device Accel Adaptive Deceleration (274):       1.000000
        Device Accel Velocity Scaling (275):    12.500000
        Synaptics Edges (293):  614, 3481, 307, 1740
        Synaptics Finger (294): 25, 30, 0
        Synaptics Tap Time (295):       180
        Synaptics Tap Move (296):       201
        Synaptics Tap Durations (297):  180, 100, 100
        Synaptics ClickPad (298):       0
        Synaptics Middle Button Timeout (299):  75
        Synaptics Two-Finger Pressure (300):    282
        Synaptics Two-Finger Width (301):       7
        Synaptics Scrolling Distance (302):     91, 91
        Synaptics Edge Scrolling (303): 0, 0, 0
        Synaptics Two-Finger Scrolling (304):   1, 0
        Synaptics Move Speed (305):     1.000000, 1.750000, 0.043687, 0.000000
        Synaptics Off (306):    0
        Synaptics Locked Drags (307):   0
        Synaptics Locked Drags Timeout (308):   5000
        Synaptics Tap Action (309):     0, 0, 0, 0, 0, 0, 0
        Synaptics Click Action (310):   1, 1, 1
        Synaptics Circular Scrolling (311):     0
        Synaptics Circular Scrolling Distance (312):    0.100000
        Synaptics Circular Scrolling Trigger (313):     0
        Synaptics Circular Pad (314):   0
        Synaptics Palm Detection (315): 0
        Synaptics Palm Dimensions (316):        10, 200
        Synaptics Coasting Speed (317): 20.000000, 50.000000
        Synaptics Pressure Motion (318):        30, 160
        Synaptics Pressure Motion Factor (319): 1.000000, 1.000000
        Synaptics Grab Event Device (320):      0
        Synaptics Gestures (321):       1
        Synaptics Capabilities (322):   1, 1, 1, 1, 1, 0, 0
        Synaptics Pad Resolution (323): 38, 40
        Synaptics Area (324):   0, 0, 0, 0
        Synaptics Noise Cancellation (325):     22, 22
        Device Product ID (264):        2, 8
        Device Node (263):      "/dev/input/event2"
@yan12125

This comment has been minimized.

Copy link
Member Author

commented Dec 2, 2016

Thanks @palinek Seems you're using the Synaptics driver. In X11, the two most common drivers are xf86-input-synaptics and xf86-input-libinput. The former is vendor-specific and the latter is more general. My initial plan was encouraging users to move from the vendor-specific Synaptics driver to the more general libinput driver as the Synaptics driver is now in the maintanence mode (see links in my first note). Should LXQt support drivers that are considered deprecated?

@palinek

This comment has been minimized.

Copy link
Contributor

commented Dec 2, 2016

.. initial plan was encouraging users to move from the vendor-specific Synaptics driver to the more general libinput driver as the Synaptics driver is now in the maintanence mode...

Fair enough, but lxqt-config-input has to run even on environment where it is not able to handle the touch pad. Maybe just show a message in the new tab?

@agaida

This comment has been minimized.

Copy link
Member

commented Mar 19, 2017

It seems that the major distributions switch to libinput - so i guess we should only support libinput and display a message if synaptics is present.

@yan12125

This comment has been minimized.

Copy link
Member Author

commented Mar 19, 2017

Sorry for not continuing on this pull request. My old laptop is completely broken, and I don't think I'll get a new one soon. That is, I can't give any more progress on this. If anyone else has a libinput-compatible touchpad and is interested in tweaking the touchpad via GUI buttons, feel free to just copy my code.

@tsujan

This comment has been minimized.

Copy link
Member

commented Nov 7, 2017

I can't give any more progress on this.

Very sorry to hear that (after a long time)! This seems really needed.

If anyone else has a libinput-compatible touchpad and is interested in tweaking the touchpad via GUI buttons, feel free to just copy my code.

I have a libinput-compatible touchpad but not the required knowledge ;)

@yan12125

This comment has been minimized.

Copy link
Member Author

commented Nov 7, 2017

I have a libinput-compatible touchpad but not the required knowledge ;)

Hmm libinput appears to have changed a lot. The CLI tool is completely redesigned, and I'm not sure how to use them to debug. At this point I don't know more than you :)

@agaida agaida added this to Tests/WIP/Rework in Pull Requests Mar 27, 2018

@agaida agaida moved this from Need Approve to WIP/Rework in Pull Requests Jul 14, 2018

@yan12125 yan12125 force-pushed the touchpad-config branch from c8202eb to 54d6ecd Sep 6, 2018

@yan12125

This comment has been minimized.

Copy link
Member Author

commented Sep 6, 2018

Rebased and add some error checking. I plan to install Arch Linux on my Macbook Air to see if I can develop touchpad codes on it...

yan12125 added some commits Sep 8, 2018

@yan12125

This comment has been minimized.

Copy link
Member Author

commented Sep 9, 2018

Now lxqt-config-input automatically loads touchpad settings just like lxqt-config-monitor. There's no need to configure touchpad after every login.

@tsimonq2

This comment has been minimized.

Copy link
Member

commented Oct 20, 2018

What's left here? (Is the description accurate?)

@yan12125

This comment has been minimized.

Copy link
Member Author

commented Oct 21, 2018

Minor stuff - change the term "touchpad" as it covers also covers mice, and UI improvements.

UPDATE: added TODO 3, which is also a nice to have feature. I'm OK with adding it after merging this.

@tsimonq2

This comment has been minimized.

Copy link
Member

commented Nov 1, 2018

Cool, I ask because Lubuntu 19.04's development has started and this has been one of the most frequently requested features. 😄

@agaida

This comment has been minimized.

Copy link
Member

commented Nov 1, 2018

i can test and merge it probably in a few days - right now i take a little "transition-vacation" - my builder don't work until the perl transiton is over

@tsimonq2

This comment has been minimized.

Copy link
Member

commented Nov 2, 2018

But @agaida, why don't you try with Debian Stable? hehehe

@agaida

This comment has been minimized.

Copy link
Member

commented Nov 2, 2018

not a good idea, tried it with a current Ubuntu 14.04 LTS - didn't work.

@agaida agaida added this to To do in PRs Nov 5, 2018

@tsimonq2

This comment has been minimized.

Copy link
Member

commented Nov 21, 2018

@agaida bump

@tsujan

This comment has been minimized.

Copy link
Member

commented Dec 10, 2018

@yan12125 I want to make a PR for adding an Apply button to Keyboard and Mouse after V0.14.0 (see lxqt/lxqt#1625). It'll change the code structure. If you finish this PR sooner, I could make structural changes to your code and then make my PR accordingly. If not, you'll have to do heavy rebasing. Do you have an estimation of the time when this PR will be ready?

@yan12125

This comment has been minimized.

Copy link
Member Author

commented Dec 10, 2018

Hi @tsujan, thanks for notifying me for upcoming changes. I consider this PR ready, and remaining works are just polishing and minor improvements, which I'd like to leave them for future PRs. Do you think it's a good idea?

/cc @agaida, @palinek I'd like to hear opinions from you, too :)

@tsujan

This comment has been minimized.

Copy link
Member

commented Dec 10, 2018

Do you think it's a good idea?

It's both a good idea and good news :) I'll wait until this is merged.

@@ -61,8 +68,10 @@ target_link_libraries(lxqt-config-input
Qt5::Widgets
Qt5::X11Extras
${X11_LIBRARIES}
${X11_Xinput_LIB}

This comment has been minimized.

Copy link
@palinek

palinek Dec 10, 2018

Contributor

IMO, it's better to use the *_LDLIBS

This comment has been minimized.

Copy link
@yan12125

yan12125 Dec 10, 2018

Author Member

X11 appears to be a special case, where there's only *_LIB, but no *_LDLIBS or *_LDFLAGS. The latter two does not build on my machine (Arch Linux).

X11_Xinput_INCLUDE_PATH,       X11_Xinput_LIB,     X11_Xinput_FOUND

(From https://cmake.org/cmake/help/v3.13/module/FindX11.html)

This comment has been minimized.

Copy link
@palinek

palinek Dec 11, 2018

Contributor

OK. Sorry for the noise :(

This comment has been minimized.

Copy link
@yan12125

yan12125 Dec 11, 2018

Author Member

No problem :) I appreciate your reviewing!

@yan12125 yan12125 merged commit ee7b0fe into master Dec 11, 2018

Pull Requests automation moved this from WIP/Rework to Done Dec 11, 2018

PRs automation moved this from To do to Done Dec 11, 2018

@yan12125 yan12125 deleted the touchpad-config branch Dec 11, 2018

@yan12125 yan12125 changed the title [WIP] Touchpad settings Touchpad settings Dec 11, 2018

@agaida agaida moved this from Done to Changelog in PRs Dec 30, 2018

@agaida agaida moved this from Done to Archive in Pull Requests Jan 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants
You can’t perform that action at this time.