Giter Club home page Giter Club logo

Comments (9)

kitakar5525 avatar kitakar5525 commented on June 10, 2024

You can reproduce this issue manually by:

echo 1 | sudo tee /sys/kernel/debug/ipts/ipts_stop
echo 1 | sudo tee /sys/kernel/debug/ipts/ipts_start

from chromeos-kernel-linux-surface.

kitakar5525 avatar kitakar5525 commented on June 10, 2024
# evtest output on Arch Linux
$ evtest
No device specified, trying to scan all of /dev/input/event*
Not running as root, no devices may be available.
Available devices:
/dev/input/event0:	Lid Switch
/dev/input/event1:	Video Bus
/dev/input/event2:	Surface Pro 3/4 Buttons
/dev/input/event3:	PC Speaker
/dev/input/event4:	HDA Intel PCH Mic
/dev/input/event5:	HDA Intel PCH Headphone
/dev/input/event6:	HDA Intel PCH HDMI/DP,pcm=3
/dev/input/event7:	HDA Intel PCH HDMI/DP,pcm=7
/dev/input/event8:	HDA Intel PCH HDMI/DP,pcm=8
/dev/input/event9:	HDA Intel PCH HDMI/DP,pcm=9
/dev/input/event10:	HDA Intel PCH HDMI/DP,pcm=10
/dev/input/event11:	ipts 1B96:005E
/dev/input/event12:	ipts 1B96:005E
/dev/input/event13:	ipts 1B96:005E UNKNOWN
/dev/input/event14:	ipts 1B96:005E
/dev/input/event15:	ipts 1B96:005E
/dev/input/event16:	ipts 1B96:005E UNKNOWN
/dev/input/event17:	ydotoold virtual device
/dev/input/event18:	Simulated Right Button
/dev/input/event19:	ipts 1B96:005E
/dev/input/event20:	ipts 1B96:005E
/dev/input/event21:	ipts 1B96:005E UNKNOWN
/dev/input/event22:	Microsoft Surface Keyboard
/dev/input/event23:	Microsoft Surface Keyboard Consumer Control
/dev/input/event24:	Microsoft Surface Keyboard Touchpad
Select the device event number [0-24]: ^C

After ipts_stop/ipts_start cycle, old IPTS devices will not be removed. (11 to 16)
This behavior might confuse the Chromium OS.

from chromeos-kernel-linux-surface.

kitakar5525 avatar kitakar5525 commented on June 10, 2024

Whereas unloading IPTS modules (sudo modprobe -r ipts_surface) will remove old IPTS devices as expected.

from chromeos-kernel-linux-surface.

kitakar5525 avatar kitakar5525 commented on June 10, 2024
  • ipts_hid_init() will be called from ipts_handle_resp() [ipts-msg-handler.c] when we load intel_ipts module and it will register hid devices.
  • ipts_hid_release() will be called from ipts_mei_cl_remove() [ipts-mei.c] when we unload intel_ipts module and it will unregister the hid devices. But not called from ipts_stop()

So, the possible ways to fix I think are:

  • call ipts_mei_cl_exit() when the reset will take place instead of just calling ipts_stop()
  • move ipts_hid_release() from ipts_mei_cl_remove() to ipts_stop()

from chromeos-kernel-linux-surface.

kitakar5525 avatar kitakar5525 commented on June 10, 2024

The flow until ipts_hid_init() will be called when we load intel_ipts module:

ipts_mei_cl_probe()
👇
init_work_func()
👇
ipts_start()
👇
send a commend: ipts_handle_cmd(ipts, TOUCH_SENSOR_NOTIFY_DEV_READY_CMD, NULL, 0);
👇
The response (TOUCH_SENSOR_NOTIFY_DEV_READY_RSP) will be caught in ipts_handle_resp()
👇
send a commend: ipts_handle_cmd(ipts, TOUCH_SENSOR_GET_DEVICE_INFO_CMD, NULL, 0);
👇
The response (TOUCH_SENSOR_GET_DEVICE_INFO_RSP) will be caught in ipts_handle_resp()
👇
in the switch statement, ipts_hid_init() will be called

The flow until ipts_hid_release() will be called when we unload intel_ipts module:

ipts_mei_cl_exit()
👇
mei_cldev_driver_unregister()
👇
ipts_mei_cl_remove()
👇
(ipts_stop() will also be called, then) ipts_hid_release() will be called

from chromeos-kernel-linux-surface.

kitakar5525 avatar kitakar5525 commented on June 10, 2024

So, more concisely,

  • ipts_mei_cl_probe() 👉 ipts_start() 👉 ipts_hid_init()
  • ipts_mei_cl_exit() 👉 ipts_hid_release()

When considering the fact that ipts_start() will finally call ipts_hid_init(), I'd expect ipts_stop() will also finally call ipts_hid_release(), but it will not.

from chromeos-kernel-linux-surface.

kitakar5525 avatar kitakar5525 commented on June 10, 2024

I need to confirm next that moving ipts_hid_release() from ipts_mei_cl_remove() to ipts_stop() will really fix this issue after the reset happened.

from chromeos-kernel-linux-surface.

kitakar5525 avatar kitakar5525 commented on June 10, 2024

Or adding ipts_hid_release() to ipts_restart() may be another option.

from chromeos-kernel-linux-surface.

kitakar5525 avatar kitakar5525 commented on June 10, 2024

Fortunately, I don't see this issue for a long time. Closing for now.

from chromeos-kernel-linux-surface.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.