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
Merged

Touchpad settings #109

merged 9 commits into from
Dec 11, 2018

Conversation

yan12125
Copy link
Member

@yan12125 yan12125 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
Copy link
Contributor

palinek 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
Copy link
Contributor

palinek 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
Copy link
Member Author

yan12125 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
Copy link
Contributor

palinek 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
Copy link
Member Author

yan12125 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
Copy link
Contributor

palinek 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
Copy link
Member

agaida 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
Copy link
Member Author

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
Copy link
Member

tsujan 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
Copy link
Member Author

yan12125 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 :)

@yan12125
Copy link
Member Author

yan12125 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
Copy link
Member Author

yan12125 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
Copy link
Member

tsimonq2 commented Oct 20, 2018

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

@yan12125
Copy link
Member Author

yan12125 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
Copy link
Member

tsimonq2 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
Copy link
Member

agaida 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
Copy link
Member

tsimonq2 commented Nov 2, 2018

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

@agaida
Copy link
Member

agaida commented Nov 2, 2018

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

@tsimonq2
Copy link
Member

@agaida bump

@tsujan
Copy link
Member

tsujan 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
Copy link
Member Author

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
Copy link
Member

tsujan 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}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, it's better to use the *_LDLIBS

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Sorry for the noise :(

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem :) I appreciate your reviewing!

@yan12125 yan12125 merged commit ee7b0fe into master Dec 11, 2018
@yan12125 yan12125 deleted the touchpad-config branch December 11, 2018 10:30
@yan12125 yan12125 changed the title [WIP] Touchpad settings Touchpad settings Dec 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants