-
Notifications
You must be signed in to change notification settings - Fork 242
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
[Surface Laptop 2] Touchscreen does not work on 5.3 #574
Comments
For the touchscreen, please re-run the setup script from my repository. The wifi problem is known and discussed in a couple of other issues (no real solution yet, I think, AFAIK this should happen on all kernels). The caps lock light is currently not implemented as I'm missing some information on that, see linux-surface/surface-aggregator-module#8. |
I re-ran the script from your repository. After a reboot, touchscreen still doesn't work somehow. Thanks for developing and improving the whole thing anyway. |
Do you have the proprietary firmware package installed (I think this should be |
linux-firmware is already the newest version (1.178.3). /lib/firmware/intel/ipts exsists and contains: And the dmesg log attached. Thank you! |
Alright, dmesg log shows that the firmware is being loaded and IPTS is properly initialized. Can you run |
It seems in my case 3 is for stylus and 4 is for touch. Thanks a lot. |
Okay, so this looks definitely wrong, there should be multiple |
Also can you check if there is an |
CC @StollD |
I've done extracting the firmware from Jake's repo. After a reboot, touchscreen still doesn't work.
Thanks! |
You did remove the other firmware files before, right (including the other folders, specifically the MSHW0079 firmware folder, otherwise the firmware in the ipts root folder will not be loaded)? So firmware-wise you should then have the correct firmware. Do you by any chance have Windows still installed and had any issues there? Have you also tried a firmware reset (not sure how that works on the Laptops, on the SB2 it's performed by pressing power and volume up buttons for 15 seconds)? |
Hmm, that is an interesting one. Some random thoughs:
Since HID events are generated in hardware, you might have faulty hardware. As @qzed said, do you have windows installed? Have you tried if touch works correctly there? In your dmesg there is sth. that looks like a crash when the kernel tries to load it's certificate for verifying modules. Some lines below, it complains about the signature of the HID module being wrong. Maybe your downloaded kernel, or the .deb package that qzed uploaded got corruped? (As said above, you could check that by trying an older kernel). @qzed another random thought: maybe IPTS somehow got stuck in single-touch mode? With the latest release that just sends all touch events to /dev/null. Is that even possible? Again, downgrading the kernel could fix that if it was the case. |
I did remove the whole |
Firmware versions:
BTW, I signed the kernel myself following the instruction given by Jake in SIGNING.md in order to remove the ugly red lock during boot time by turning on Secure Boot. Maybe something went wrong that caused it to complain about the signature. It can boot normally with Secure Boot on though. Also I will try downgrading the Kernel and flashing a newer version of Firmware then. |
@StollD Maybe, but I think that'd have to be switched by the MEI device itself, I don't know if that's possible. Also there are the timestamp events in the evtest log, would they be there in single-touch mode? |
That shouldn't cause any issues. The signature it was complaining about was in-kernel and could have to do something with how I compile the kernels. Unfortunately I can't test/verify that as I'm not using a Debian based distro. |
I’m not sure how set you are on 19.04, but my surface laptop 2 had issues with the keyboard not working using 19.04 and no issues at all with 18.04, including no WiFi issues. The only downside is scaling on the high resolution surface display is more of a hassle on 18.04, but everything else works fine for me. |
@qzed @StollD : Thank you guys a lot for helping me out! |
Also, I just tested that qzed's 5.3.1 still has the touchscreen problem here. |
@SG-M1niCrusher That might not be a permanent solution. The previous kernels do not initialize the keyboard properly (thus the problems). By installing the newer kernel you have set-up the keyboard, which may work until the EC is reset or changes something (e.g. by booting into Windows). Are you absolutely certain that the touchscreen does not work on the 5.2.x kernels (even when re-running the setup script)? |
rerunning setup.sh (libwrt... yes) worked here on 5.2.x kernel as note (Surface Laptop 1) dead wifi while running was an issue before, but meanwhile its working, energy savings off. wifi is completely dead after resume here as note, only reboot will make it work again. |
To elaborate a bit: Pre 5.3, IPTS driver had two modes: (apart from implementation changes) they can be seen as single- and multi-touch mode. In 5.3, we scrapped the single-touch implementation as we assumed that it's unused and devices would normally work in multi-touch mode. Now that may have been wrong (basically it's the only change to 5.2 that I can think of that would be capable of breaking touch). So, @alturismo and @SG-M1niCrusher, can you check if multi-touch works on 5.2/5.1 or previous versions? There are some resources for Ubuntu here, but a simple way to do this would be to run |
@qzed: I've noticed if touchscreen works, there will be 4 |
@qzed here from Surface Laptop 1 with 5.2.17 and setup.sh
|
So I think I know what is going on. As @qzed said, in 5.3 the changes that IPTS did to the HID subsystem got reverted, because we assumed that they were only used for single-touch. But, at some point Jake seems to added some fixes to them, which we reverted as well: 78f1e81 I think those are software mitigations for firmware that produces wrong HID events, especially this: static int mt_touch_input_mapped(struct hid_device *hdev, struct hid_input *hi,
struct hid_field *field, struct hid_usage *usage,
unsigned long **bit, int *max)
{
if (usage->type == EV_KEY || usage->type == EV_ABS)
set_bit(usage->type, hi->input->evbit);
return -1;
} which seems to forcefully apply some events (the ones that are missing in your evtest results). I was even able to test this: I replaced the As the next step I readded those mitigations and recompiled the kernel. And it did actually fix the issue! Well, sort of. My touch input is now upside down, which doesn't really matter for testing though. It confirms where the issue lies. @SG-M1niCrusher @alturismo I know this sounds dumb (and it is tbh), but would you be open to trying out the other IPTS firmwares to see if they can fix the problem? Basically, install the 5.3 kernel, make sure that touch is broken, then do something like this: # Backup your current FW
$ cp -r /lib/firmware/intel/ipts/MSHW0079 .
# Remove it and replace it with another one
$ sudo rm -r /lib/firmware/intel/ipts/MSHW0079
$ sudo cp -r /lib/firmware/intel/ipts/$FIRMWARE /lib/firmware/intel/ipts/MSHW0079
# Reboot You can try to use the SB2 firmware to verify that this tricks works and actually restores touch for you, but that won't be the final solution as said above. I'd suggest trying If nothing of that works we will have to put those mitigations back in place. |
@StollD : |
Thank you for testing! I did some further testing. As it turns out, using the HID descriptor from This means that the firmware (responsible for rotation) works, but the HID descriptor (required for telling the kernel which events it can process) is bugged. On IPTS, the HID descriptor consists of @SG-M1niCrusher Could you please try to restore the $ sudo rm -r /lib/firmware/intel/ipts/MSHW0079
$ sudo cp -r MSHW0079 /lib/firmware/intel/ipts/
$ sudo cp /lib/firmware/intel/ipts/MSHW0137/vendor_desc.bin /lib/firmware/intel/ipts/MSHW0079 |
@StollD Nice work! Given that the |
So I've just checked the firmware packages for the SL1 and SL2, and it looks like the firmware is up-to-date (although I had to use |
Yes it works for me after I replaced the |
g morning, i also can confirum touch working with this procedure on SL1 with 5.3.1 on ubuntu 19.04 but i didnt have the subfolder /lib/firmware/intel/ipts/MSHW0079 so i replaced in /lib/firmware/intel/ipts/ config.bin while the vendor_desc.bin then from the MSHW0137 package. touch seems fine here now |
See: jakeday#574 As long as that issue exist, and noone of us understands how to work with HID descriptors and fix them, replace the file with the one from MSHW0137 which is confirmed to be working properly. Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
@m1nicrusher @alturismo Can you check if this works with the latest |
@qzed confirmed working here, tested on the 5.3.2 kernel from your repo #offtopic |
@alturismo Thanks! Those are the MSHW0079 files, I've patched the original |
The patched firmware seems to work as intended. As it is a direct replacement and should not cause any further issues, we can drop the backup of the original firmware. In case any unforseen issues arise, we can always get it from the official driver/firmware packages again. See: jakeday/linux-surface#574
See: jakeday#574 As long as that issue exist, and noone of us understands how to work with HID descriptors and fix them, replace the file with the one from MSHW0137 which is confirmed to be working properly. Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
The patched firmware seems to work as intended. As it is a direct replacement and should not cause any further issues, we can drop the backup of the original firmware. In case any unforseen issues arise, we can always get it from the official driver/firmware packages again. See: jakeday#574
See: jakeday/linux-surface#574 As long as that issue exist, and noone of us understands how to work with HID descriptors and fix them, replace the file with the one from MSHW0137 which is confirmed to be working properly. Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
The patched firmware seems to work as intended. As it is a direct replacement and should not cause any further issues, we can drop the backup of the original firmware. In case any unforseen issues arise, we can always get it from the official driver/firmware packages again. See: jakeday/linux-surface#574
I've tried the newest Ubuntu 19.04 on Surface Laptop 2.
Keyboard didn't work.
WiFi and Touchpad were working fine.
Then I tried the forked 5.3.1 version by @qzed , Keyboard now works but Touchscreen died. Also the Caps Lock Light won't work (Light is always off even if Caps Locks is on)
Now WiFi died after half an hour of apt installing.
The text was updated successfully, but these errors were encountered: