I am using a script in
which runs at plasma-startup (and can also be found as script-entry in systemsettings/autostart).
This script calls 3 other scripts for setup of touchpad and mouse parameters, esp. the handedness of the mouse (left handed) by calling for example
xinput set-prop $mouseId "libinput Left Handed Enabled" 0
Since upgrade to fedora28/plasma 5.13, the following problem occurrs:
- initial startup of plasma is ok, mouse settings are applied
- suspend laptop to RAM
- wake up again
- mouse settings are gone, mouse operates as right-handed mouse.
Yes, i can manually call the script again, then my settings are of course reapplied.
But, up to fedora27 this approach was valid and even suspend did not override the settings
- is it possible to run my init script automatically after suspend/wakeup?
- even better... could this bug be fixed, so that the settings survive a suspend/wakeup cycle?
some more info coming from Peter Hutterer/libinput
usually what happens during suspend is that all devices are removed and then added again on resume. Basically the same as on plug/unplug. Since you're applying run-time settings only, these don't get applied to new devices (you can test this by unplugging your mouse). Same problem here.
Check your xorg.log, if it says "device removed" and whatnot before suspend, then this is the issue. I think the only way this could've worked in F27 is if the script got called on resume. The device removal has been like this for quite a while now.
and yes, we have the entry in the logs
[146935.893] (II) event8 - (II) Logitech M525: (II) device removed
Then this seems to be plasma related only?
Any idea what did change in the handling of those autostart scripts?
*** This bug has been marked as a duplicate of bug 395401 ***
This report is about libinput, bug 395401 is about evdev.
well, as Peter Hutterer pointed out, this is NOT libinput related, instead, this seems to be about the handling of startup scripts in plasma after a suspend/wakeup cycle
Are you only using this script as a workaround for the fact that the settings aren't remembered across reboots?
no, i wanted to apply settings available only using libinput, so that's the main reason.
And it's just working (ok, _was_ working) as i expected.
I am adjusting lenovos T470 touchpad, mouse and lenovo pointer-stick (the red thing on the keyboard) using libinputs acceleration profiles and handedness. Plasma mouse settings never came close to the options of libinput
In Plasma 5.13, it does have a checkbox for "left handed mode" though (and other stuff). Is there any reason why you can't use it?
yes, there is A left handed mouse using plasma settings does react completely different in gimp!!
Gimp does not like button remappings (i assume), so a right handed mouse works ok, a left handed not. And, same applies to an external touchpad/drawing pad (wacom) which uses left handed settings of the mouse somehow. Same problem.... libinput to the rescue ;-)
In Plasma 5.13, the mouse settings panel *does* use libinput. Can you share a screenshot of what it looks like for you, please?
i know what you're talking about, i'm pretty sure mybscreen is the same as yours. But a left handed mouse setup (plasma setting) does a button remap which affects wacom pen as well. I cannot set left handed mouse exclusively and wacom pen right handed. And, moreover, my command (see first post) does something different to the mouse without affecting wacom. so i really would like to keep this freedom ;-)
Yes, nobody wants to remove your freedom, but rather, we want to resolve the bug that you're working around so you don't have to keep working around it. :)
The reason why I ask you to share a screenshot is because the old evdev interface did a button re-map, but libinput does not; it actually supports the concept of a left-handed mode. So if our attempts to expose this through the UI did not work, we need to fix that. So I'd like you to show me that screenshot so I can verify that you're actually using the libinput interface (in which case there is a but with it) rather than the old evdev interface (in which case you should try the libinput one first).
agreed ... will check again and keep you updated
Created attachment 114717 [details]
some updates (and a screenshot :-)
1) mouse and trackpoint settings are related to each other - that is, i cannot set mouse to left-handed and the trackpoint(lenovo t470) to right handed
(you know, with 2 hands - mouse left, right hand on keyboard, i choose _my_ preferences :-))
In plasma, there is still no property-panel for trackpoint settings
2) initialization of touchpad
i am using
xinput set-prop $touchpadId "libinput Click Method Enabled" 0 1
to get rid of the lower-button-like sensitive areas of the touchpad (so i can use the whole area)
In plasma touchpad settings, those options are still greyed out
2a) entering the property panel of touchpad gives me (first time access) an error-like message (red hint area on top of panel) that my current settings are not being displayed - with an option/button to do so.
Afterwards, the touchpad does have other sensitivity settings as before (so this seems not to be just an update of the panel-display?). And, i did not really notice any differences in the values of the panel in comparison to before the button click
3) sudden loss of mouse-handedness
i have experienced today a sudden loss of mouse-handedness... (without 'playing' in the systemsettings panel). Mouse setup was done using libinput script and i was using chrome (left-handed). Then, the mouse suddenly was right-handed, because clicking now opened a context menu??? (ok, i experienced this only once)
4) update to suspend/wakeup
I have opened this bugreport because the mouse/trackpoint/touchpad settings were apparently not reapplied when waking up. In the meantime, i had several suspend/wakeup cycles where the mouse settings survived the sleep-period...
So, maybe (with topic 3 above), this is not really related to the processing of startup-scripts but something else in plasma? Just wondering...
update for startup scripts:
According to journalctl -b -0, the script gets called only after logoff/login, and not after suspend/wakeup
I can only find the line
ksmserver: org.kde.kf5.ksmserver: autostart script ("/home/user/.config/autostart-scripts/kde_init.sh") finished with exit code 0
when doing a logoff/login cycle
I encountered the mouse-handedness being lost now multipe times on 2 different machines (desktop w/o suspend and laptop).
Both incidents were without suspend/wakeup cycle, just the screensaver kickin' in...
This is really annoying, if your mouse handedness suddenly changes !!!
The Mouse KCM has a kcmInit hook, which sends the current settings on every reboot and apparently also on wake up after suspend to the Xserver.
It was this way before that as well, just that our libinput KCM didn't support setting the handedness, so it didn't try to reapply it on wake up. Now it does, so it overwrites your script setting. But there should be no difference in how it behaves in GIMP in comparison to when you set it through xinput.
The problems you describe later about settings of touchpads and mice being dependent on each other is dealt with in: https://phabricator.kde.org/D15256
Setting the report to invalid, since the KCM is meant to resend settings to the Xserver and did it this way in the past as well, just not the handedness with libinput because it didn't support it. Also there should be no difference in GIMP to setting it through xinput.
and now on logout or reboot but peculiarly only on my Intel based laptop and not my Ryzen based desktop.
using latest Tumbleweed
There is another bug somewhere describing the effect as occasional and random (reported by me) that I cannot find in which a KDE developer suggested that the problem was caused by an unidentified application was triggering an event unnecessarily
In current Tumbleweed the not respecting left-handedness problem has reawakened from the apparent dead and seems to be interacting with Bluetooth, which doesn't always respect the state it was set to after power off or log out. Further there seems to be some process that takes its time before telling me my Bluetooth mouse is connected, which is new. Not sure if it is a system settings problem or a Bluetooth problem
I've now identified that the behaviour is unrelated to the setting in system setting>input devices>mouse
on occasion, when logging on the mouse is right-handed but the system shows left-handed option selected. To achieve left-handness it is necessary to toggle-off, apply, toggle-on, apply
This bug report is too confusing as it has been used for many different things; let's track the issue of settings being reset after login/suspend when *not* using a custom script with Bug 435113.
i'm closing this specific bug, as with newer versions of plasma there is no need any more to set mouse/touchpoint/touchpad handedness by script - systemsettings does what is required for me.
I think the problem was, that libinput being fed by script and systemsettings using the 'old style' of applying handedness was the culprit.
Using plasma 5.23.5 all is fine so far