[Xperia Z4 Tablet Android Development] alter.daemon:
[MENTION=2705776]sabar_op[/MENTION]

You have nailed it. I see now that in the logs that I have a constant flow of errors, that's probably the reason for the battery drain:

https://gitlab.com/LineageOS/issues/android/-/issues/2132

EDIT (fix):

changing in /system/vendor/etc/wifi/wpa_supplicant_overlay.conf

from p2p_disabled=1 to p2p_disabled=0 fixes the problem

it even enables scanning for wireless display devices (like miracast) which wasn't working before but trying to connect to such devices ends up with tablet making soft reset (this issue is connected with WIFI Direct somehow)

EDIT2(fix for miracast):

Miracast should have been already working. Please find the patch here:

https://xdaforums.com/showpost.php?p=83494259&postcount=5

https://review.lineageos.org/c/LineageOS/android_device_xiaomi_sdm845-common/+/284011/

for now I am getting in logs:

wpa_supplicant
failed to invoke HIDL iface callback

Kindly please merge those 2 fixes into the next bulild. Thx!

[11-22 16:30:57.843 1169:2224 E/SupplicantP2pIfaceHal]
Failed to get ISupplicantIface 1

[11-22 16:30:57.843 1169:2224 E/SupplicantP2pIfaceHal]
initSupplicantP2pIface got null iface

[11-22 16:30:57.864 1169:2224 E/SupplicantP2pIfaceHal]
Failed to get ISupplicantIface 1

[11-22 16:30:57.864 1169:2224 E/SupplicantP2pIfaceHal]
initSupplicantP2pIface got null iface

[11-22 16:26:12.091 1574:1574 I/wpa_supplicant]
nl80211: Driver does not support authentication/association or connect commands

[11-22 16:26:12.091 1574:1574 I/wpa_supplicant]
nl80211: deinit ifname=p2p-dev-wlan0 disabled_11b_rates=0

[11-22 16:26:12.091 1574:1574 E/wpa_supplicant]
Could not read interface p2p-dev-wlan0 flags: No such device

[11-22 16:26:12.091 1574:1574 E/wpa_supplicant]
p2p-dev-wlan0: Failed to initialize driver interface

[11-22 16:26:12.092 1169:2224 E/SupplicantP2pIfaceHal]
Failed to get ISupplicantIface 1

[11-22 16:26:12.092 1169:2224 E/SupplicantP2pIfaceHal]
initSupplicantP2pIface got null iface

[11-22 16:26:12.092 1169:2224 E/WifiP2pNative]
Failed to setup P2p iface in supplicant

---------- Post added at 05:06 PM ---------- Previous post was at 04:56 PM ----------

Regarding this:

1.

I have looked thoroughly the logs and I can't find nothing about keyboard touchpad gestures when trying to perform them .. the only thing close to the subject was:

[11-22 16:26:37.083 7147:7147 W/ViewRootImpl[Main]]
Cancelling event due to no window focus: MotionEvent { action=ACTION_CANCEL, actionButton=0, id[0]=0, x[0]=0.0, y[0]=0.0, toolType[0]=TOOL_TYPE_UNKNOWN, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=62423537, downTime=0, deviceId=14, source=0x1000010, displayId=-1 }

[11-22 16:26:12.989 1169:2660 E/WindowManager]
Unable to transfer touch focus

but I doubt it has something to do with the gestures not working.

2.

I haven't a chance to test it in the previous versions of LOS but looking at the posts in the web I can say that others have such problem too when coming from the Sony stock ROM.

3.

Twofinger-scrolling was working fine under stock Lollipop, Marshmallow and Nougat. It may be that it was possible because of dedicated software support by Sony (there was a dedicated app for BKB50 keyboard).

I was wondering then if android has a built-in support for such gestures and if it has whether LOS is implementing it right