askmrsinh / touchpad-indicator

Touchpad management GNOME Shell Extension.
https://extensions.gnome.org/extension/131/touchpad-indicator/
GNU General Public License v2.0
83 stars 20 forks source link

Doesn't disable touchscreen on load #45

Closed davidrhoderick closed 4 years ago

davidrhoderick commented 4 years ago

While this extension works great for the touchpad and trackpoint, it features the option to disable touch screen. However, even though the touchscreen is disabled through the extension, it still works on start up. I have to turn it on and off to get it to disable. Is there a way to prohibit this behavior?

askmrsinh commented 4 years ago

Ideally, this should not be happening. Input device states (enabled/disabled) should be preserved.

Can you please tell me a bit more about the setup? I need:

  1. Extension version
  2. Switching method in use
  3. Gnome shell version
  4. At least N: Name= and P: Phys= lines from output for cat /proc/bus/input/devices
  5. Logs from the extension
davidrhoderick commented 4 years ago

Sure:

  1. Looks like it's version 33.
  2. gsettings is the current switch method.
  3. GNOME Shell 3.34.3
  4. Here is the output for cat /proc/bus/input/devices:
I: Bus=0019 Vendor=0000 Product=0003 Version=0000
N: Name="Sleep Button"
P: Phys=PNP0C0E/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input0
U: Uniq=
H: Handlers=kbd event0 
B: PROP=0
B: EV=3
B: KEY=4000 0 0

I: Bus=0019 Vendor=0000 Product=0005 Version=0000
N: Name="Lid Switch"
P: Phys=PNP0C0D/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input1
U: Uniq=
H: Handlers=event1 
B: PROP=0
B: EV=21
B: SW=1

I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=LNXPWRBN/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input2
U: Uniq=
H: Handlers=kbd event2 
B: PROP=0
B: EV=3
B: KEY=10000000000000 0

I: Bus=0011 Vendor=0001 Product=0001 Version=ab54
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/devices/platform/i8042/serio0/input/input3
U: Uniq=
H: Handlers=sysrq kbd event3 leds 
B: PROP=0
B: EV=120013
B: KEY=402000000 3803078f800d001 feffffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=7

I: Bus=0019 Vendor=0000 Product=0006 Version=0000
N: Name="Video Bus"
P: Phys=LNXVIDEO/video/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input6
U: Uniq=
H: Handlers=kbd event4 
B: PROP=0
B: EV=3
B: KEY=3e000b00000000 0 0 0

I: Bus=0019 Vendor=17aa Product=5054 Version=4101
N: Name="ThinkPad Extra Buttons"
P: Phys=thinkpad_acpi/input0
S: Sysfs=/devices/platform/thinkpad_acpi/input/input22
U: Uniq=
H: Handlers=rfkill kbd event6 
B: PROP=0
B: EV=33
B: KEY=10040 0 18040000 0 50000000000000 0 1701b02102004 c000280051115000 10e000000000000 0
B: MSC=10
B: SW=8

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel PCH Mic"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1f.3/sound/card0/input24
U: Uniq=
H: Handlers=event7 
B: PROP=0
B: EV=21
B: SW=10

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel PCH Headphone"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1f.3/sound/card0/input25
U: Uniq=
H: Handlers=event8 
B: PROP=0
B: EV=21
B: SW=4

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel PCH HDMI/DP,pcm=3"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1f.3/sound/card0/input26
U: Uniq=
H: Handlers=event12 
B: PROP=0
B: EV=21
B: SW=140

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel PCH HDMI/DP,pcm=7"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1f.3/sound/card0/input27
U: Uniq=
H: Handlers=event13 
B: PROP=0
B: EV=21
B: SW=140

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel PCH HDMI/DP,pcm=8"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1f.3/sound/card0/input28
U: Uniq=
H: Handlers=event14 
B: PROP=0
B: EV=21
B: SW=140

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel PCH HDMI/DP,pcm=9"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1f.3/sound/card0/input29
U: Uniq=
H: Handlers=event15 
B: PROP=0
B: EV=21
B: SW=140

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel PCH HDMI/DP,pcm=10"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1f.3/sound/card0/input30
U: Uniq=
H: Handlers=event16 
B: PROP=0
B: EV=21
B: SW=140

I: Bus=001d Vendor=06cb Product=0000 Version=0000
N: Name="Synaptics TM3381-002"
P: Phys=rmi4-00/input0
S: Sysfs=/devices/rmi4-00/input/input23
U: Uniq=
H: Handlers=mouse2 event17 
B: PROP=5
B: EV=b
B: KEY=e520 10000 0 0 0 0
B: ABS=6f3800001000003

I: Bus=0011 Vendor=0002 Product=000a Version=0000
N: Name="TPPS/2 Elan TrackPoint"
P: Phys=rmi4-00.fn03/serio0/input0
S: Sysfs=/devices/rmi4-00/rmi4-00.fn03/serio2/input/input31
U: Uniq=
H: Handlers=mouse3 event18 
B: PROP=21
B: EV=7
B: KEY=70000 0 0 0 0
B: REL=3

I: Bus=0003 Vendor=04f3 Product=2610 Version=0110
N: Name="ELAN Touchscreen"
P: Phys=usb-0000:00:14.0-10/input0
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.0/0003:04F3:2610.0004/input/input32
U: Uniq=
H: Handlers=mouse1 event9 
B: PROP=2
B: EV=1b
B: KEY=400 0 0 0 0 0
B: ABS=3273800000000003
B: MSC=20

I: Bus=0003 Vendor=5986 Product=211a Version=5465
N: Name="Integrated IR Camera: Integrate"
P: Phys=usb-0000:00:14.0-5/button
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/input/input36
U: Uniq=
H: Handlers=kbd event10 
B: PROP=0
B: EV=3
B: KEY=100000 0 0 0

I: Bus=0003 Vendor=5986 Product=2113 Version=5422
N: Name="Integrated Camera: Integrated C"
P: Phys=usb-0000:00:14.0-8/button
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.0/input/input37
U: Uniq=
H: Handlers=kbd event11 
B: PROP=0
B: EV=3
B: KEY=100000 0 0 0
  1. How do you want this done? Via the systemd journal?
askmrsinh commented 4 years ago

Thank you!

For collecting logs, you can do it via the debug tab in extension settings. It should automatically create a new file wherever your extension is installed at (usually /home/$USER/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com).

Screenshot from 2020-02-20 23-59-09

askmrsinh commented 4 years ago

The touch-screen is always disabled via xinput regardless of what switch method (gsettings, xinput, synclient) you select to disable the touchpad. The below lines seem to be causing the issue that you are facing.

https://github.com/user501254/TouchpadIndicator/blob/783300252b6e04a9b694ceb17158796086616cf5/extension.js#L143-L145

One way to fix this at your end would be to change the switch method from gsettings to xinput. Alternately, I may switch to use:

 if (this._switchMethod !== Lib.METHOD.XINPUT) { 
     this.xinput._enableByType("mouse"); 
 }