-
Notifications
You must be signed in to change notification settings - Fork 36
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
Touchscreen inactive after waking from sleep #96
Comments
I'm using archlinux with systemd. The service runs the script on boot up after all the binaries run and after sleep. It has both conditions set in the service file. could you add |
So I edited edit: I'm also using Arch with systemd, for reference. |
good news, i can verify your issue. i mis-read trouchscreen for trackpad. i don't use my touchscreen. i'll dig into it and see what i can figure out. |
#73 mentioned the touchscreen not working also after resume. i tried
i'm not sure what to suggest next. perhaps @ehegnes might have some insight. |
the following command will reset the touchscreen
note this if your touchpad is 0 else it's 8 when the touch pad is 7 |
Running
I looked through my system folders and there is a I'm going to reboot and test |
So running I'm going to try letting my Pixel sleep for a few minutes and see if resetting the touchscreen via Edit: My trackpad does not work after doing this. |
there is an error in the script - i have a fix and will be submitting it.
|
Editing that line in I tried sleep/waking the device afterwards and still needed to reset the touchscreen with |
i would reboot and see if you still have it. i also removed the suspend.target out of the service i'm using. the only thing on my system now different than the main repo is that small change to the script. |
note there are two lines in the enable-atmel.sh file at the bottom. one for the trackpad 004a and one for the touchscreen 004b. |
The edit to Sometimes Another more elusive issue is sometimes the trackpad needs reset with I get lucky on some sleep/wake cycles and the touchscreen won't need reset. Maybe the Pixel is not in 'complete' sleep mode despite the light bar being off? On some resets, most of the time it's the first one after a reboot, it takes a few seconds for the reset to kick in to get the touchscreen working again. |
So I let the Pixel sleep a minute and the touchscreen worked fine for a couple seconds before dying on me and needing a reset. |
i am getting the same after resume. the touchscreen works for a while and then doesn't. |
I looked through the new changes in the repo and found I was missing an added |
it will fail again as i have Type=idle in my service file. i just had a failed service. until i can reproduce it consistently, it may be hard to troubleshoot. |
The touchscreen has been working fine for me in the last few minutes I've been playing with it. How long does it take for yours to stop working? |
So letting it sleep for an hour or more and the touchscreen stops taking input for just the OS. some
I had left Chromium open when I put the laptop to sleep/suspend. Chromium oddly enough still takes touchscreen input while the OS does not. I'm going to reset the touchscreen and test whether or not that Chromium is causing the issue. I may also test Firefox since I am using the Grab and Drag extension for touch input and that's what I normally leave open instead of chromium. It could be a touch event focus stealing issue. edit: double checking the |
What input driver are you using in X? |
i'm using just xf86-input-libinput and my trackpad is happy and i just figured out how to right click! |
I also have |
Does X actually use both simultaneously? Either way, libinput supports tap-to-click. Regardless, I think that there is a bug with Chromium and how it handles libinput events. I've actually been having issues with various input mechanisms and Chromium for some months now. It might be related: https://code.google.com/p/chromium/issues/detail?id=519114 |
Both seemed to work fine for me. I assumed I needed synaptics for tap-to-click, but all libinput needed was a proper xorg config file for that. Two finger tap gives me right clicks now like I want, so I'll stick to libinput since that's all I need. I removed synaptics to make further troubleshooting easier. |
if you want to open in tab using chromium, it's control key + tap the bottom middle of the touch pad. |
@wulvyrn ? Ctrl + click is always open in new tab in Chromium. |
When the problem first showed up for me I was using Firefox at the time. Chromium was not even open. I'm going to see if I can replicate the issue with Firefox. So ctrl+middle tap does what two finger tap did with synaptics. So I have two finger tap doing right click like I want plus that, which is nice. Weirdly enough Chromium kept crashing when I would scroll pages before a reboot. I'm not sure if that's related to the current issue though. It's not crashing now at all though. |
So I was able to replicate the issue with Firefox. Having Firefox open then a following sleep/wake cycle kills touchscreen input. I've been using the Grab and Drag extension to be able to use the touchscreen with Firefox. I'm going to remove the extension to see if I still have problems after that. |
Alright, so removing the extension seems to eliminate the problem. I re-added the Grab and Drag extension to Firefox and after a sleep/wake cycle it killed touchscreen input again. |
Further testing without Grab and Drag and keeping Firefox open, I can still lose touchscreen input after a sleep/wake. I'm now going to try some sleep/wake cycles without any browsers/applications open to see if I still have issues. It could be two separate problems with each browser, or just an OS/driver issue. |
@colemikens - true on ChromeOS. With just libinput, I could only get it to ctk+ tap on the bottom middle. Anywhere else on the touchpad and no go. |
If your above method is working for you? That would be good info. |
My atmel.service currently has Usually the touchscreen won't take input when the screen wakes for me, though I have had a few instances where it stops working after a few seconds after wake and use of the touchscreen. Chromium has had much fewer issues with killing touchscreen input in comparison to Firefox. The breakdown of most frequent touchscreen disabling in my experience is thus: Firefox with Grab and Drag extension > Firefox without Grab and Drag extension > Chromium An interesting occurence I found about an hour or two ago is that touchscreen input can die after sleep/suspend with zathura as well. So that's a third program to add to the list, and it's not a browser. Since it's a light weight pdf reader it might be easier to pin down what's causing the issue. I have yet to test my method, I didn't realize that atmel.service already handled that. I can test both to see if one works better than the other. |
Another detail is that with zathura, resetting took a long time to kick in. It took about a couple minutes or more, this occasionally happens with other programs, though it's rather infrequent. |
WantedBy=multi-user.target suspend.target multi-user.target is on boot journalctl -xe will display and if if it was reset by saying xx004b reset |
So I changed that line in What I get with
The touchpad resets, but the touchscreen does not. It took me about 3 suspend/wake cycles to kill touchscreen input with firefox. |
So double checked the changes to the #!/bin/bash This script resets the Atmel maXTouch chips that control the touchscreen andtouchpad input devices.It is recommended for this script to be run by the init system on boot andafter resuming from suspend.Note the use of "mxt-app" which would have to be available to the init system.Elevate privileges if necessaryPROMPT=sudo Load
|
this is my setup from journalctl -xe | grep atmel
this is the enable-atmel.sh in the latest repo:
note the last four lines, this was recently a merged change. if it all works, you should see both reset in journalctl -xe or from command line. |
a reboot isn't needed. to reload systemctl:
|
I went and re-downloaded mxt-app from the repo to make sure I didn't have one out of date. I also ran |
So both the touchpad and touchscreen are resetting properly, and the touchscreen seemed to just randomly die on me with Firefox running. |
It came back after awhile. There's a bit of lag on some resets. |
Double checked it and the touchscreen does definitely reset with a noticeable delay. It ranges from like 5-30 seconds or so I think, sometimes longer it feels. The touchpad has had zero issues with resets. I wonder if there's a way to shorten the delay for the touchscreen, since this feels like it's working well. |
the service runs when the system is idle. idle was chosen so as it runs after all the binaries run else when it runs with them, it can fail. i'm not sure why the touchscreen would be lagging as it runs just like on command line in bash. |
What I mean by "lag" is that it takes a few seconds for the touchscreen to become active/usable. I don't mean sluggish. Other than waiting for the touchscreen to become active, everthing works fine now. Reducing the activation time is the only concern I have now, since touchscreen resets actually work now like their supposed to. Would laptop-mode-tools delay the touchscreen resets perhaps? |
i don't have those installed. they could cause a delay. You could change Type=idle in the service file to another option and see if that makes a difference. just restart the systemctl daemon after saving the change to see it. |
Disabling and stopping laptop-mode-tools didn't seem to do anything. I tried Type=simple, then Type=forking in the service file, both seemed to fail outright. Type=oneshot with RemainAfterExit=yes seemed about as successful as Type=idle. |
The script |
@raphael, thanks so much for this! It's nice to finally have a proper fix instead of that workaround. I have also been experiencing good results with the new one-time script. |
The new script is working great for me at the moment. If touchscreen support gets flaky again I'll let you know. |
I still get this issue with the touchscreen. When I run the script I get Currently running |
This is not running the kernel provided here, is that intentional? |
I guess after reading #63 and seeing support for a lot (most?) of the pixel's features in 4.8 I switched. I didn't realize this kernel version was still being developed (I thought just the scripts were being maintained). Good stuff! I'll try switching back tomorrow and I'll see if it helps. |
This kernel does not patch the source anymore but does provide a specific configuration. I'm just wondering whether the default config used by the ArchLinux kernel could be missing some modules. I don't know either way but it may be worth trying out this kernel. |
I switched over to the Samus kernel. Same issue:
|
OK at least we now know that's not the issue :) - what is the output of |
|
Do one of the ID numbers or the numbers in parentheses correspond to something in the script? I noticed this line: |
FWIW, I just did a fresh install with the latest linux & samus (using archlinux and the AUR) and I'm having the same issues with resuming... both touchscreen and trackpad don't work when I open the laptop back up. |
After booting and logging in the touchscreen takes input like normal. After closing the Pixel's lid and opening it back up to wake it the touchscreen no longer takes input as if it's been deactivated. A reboot fixes the issue temporarily until the next close/open of the lid.
I've been using version 4.4-4 (or 4.4.0-4ph according to
uname -r
) after upgrading from v4.2-11 (Linux kernel ver. 4.2.8).My first assumption is that the touchscreen driver might need reset similar to the touchpad, except after sleep/wake instead of at boot.
The text was updated successfully, but these errors were encountered: