HP Envy x360 Tablet mode

Hey,

So I just bought an HP Envy x360 15-ed104la and set it up with Manjaro Gnome using Calamares, and I’m running the 5.17 kernel. It’s working mostly fine, so I’m going about setting it up for tablet mode to work properly. Currently, I’ve installed no additional package related to this issue and done no additional configuration. Hence, after reading up on it online, I was surprised to notice that the latch is properly detected and causes certain actions when I turn it over. Success! Now here is the current state of things:

  • Mousepad and integrated keyboard are properly disabled when I switch over
  • Airplane mode turns on and off kind of randomly when switching, which is weird

What I need help with is changing this behaviour so that it stops playing with airplane mode when switching, enables the on-screen keyboard feature in Gnome and rotates the screen (still landscape but opposite so I can use keyboard part as a kickstand, or maybe detect rotation with the integrated sensor?).

Any help would be appreciated! It looks like there’s a beginning of Tablet Mode implementation from the current behaviour so I hope this is useful for Manjaro development as well.

Here are the journalctl logs:

Apr 23 01:00:42 pc kernel: wlo1: deauthenticating from ee:a9:40:15:67:67 by local choice (Reason: 3=DEAUTH_LEAVING)
Apr 23 01:00:42 pc wpa_supplicant[700]: wlo1: CTRL-EVENT-SIGNAL-CHANGE above=0 signal=-9999 noise=9999 txrate=0
Apr 23 01:00:42 pc wpa_supplicant[700]: wlo1: CTRL-EVENT-DISCONNECTED bssid=ee:a9:40:15:67:67 reason=3 locally_generated=1
Apr 23 01:00:42 pc wpa_supplicant[700]: rfkill: WLAN soft blocked
Apr 23 01:00:07 pc kernel: audit: type=1131 audit(1650693607.580:185): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Apr 23 01:00:42 pc kernel: wlo1: deauthenticating from ee:a9:40:15:67:67 by local choice (Reason: 3=DEAUTH_LEAVING)
Apr 23 01:00:42 pc wpa_supplicant[700]: wlo1: CTRL-EVENT-SIGNAL-CHANGE above=0 signal=-9999 noise=9999 txrate=0
Apr 23 01:00:42 pc wpa_supplicant[700]: wlo1: CTRL-EVENT-DISCONNECTED bssid=ee:a9:40:15:67:67 reason=3 locally_generated=1
Apr 23 01:00:42 pc wpa_supplicant[700]: rfkill: WLAN soft blocked
Apr 23 01:00:07 pc kernel: audit: type=1131 audit(1650693607.58Apr 23 01:05:52 pc kernel: wlo1: deauthenticating from ee:a9:40:15:67:67 by local choice (Reason: 3=DEAUTH_LEAVING)
Apr 23 01:05:52 pc wpa_supplicant[700]: wlo1: CTRL-EVENT-DISCONNECTED bssid=ee:a9:40:15:67:67 reason=3 locally_generated=1
Apr 23 01:05:52 pc wpa_supplicant[700]: rfkill: WLAN soft blocked
Apr 23 01:05:52 pc wpa_supplicant[700]: rfkill: WLAN soft blocked
Apr 23 01:05:52 pc systemd[1]: Starting Load/Save RF Kill Switch Status...
Apr 23 01:05:52 pc NetworkManager[617]: <info>  [1650693952.7329] manager: rfkill: Wi-Fi now disabled by radio killswitch
Apr 23 01:05:52 pc NetworkManager[617]: <info>  [1650693952.7330] device (wlo1): state change: activated -> unavailable (reason 'none', sys-iface-state: 'managed')
Apr 23 01:05:52 pc systemd[1]: Started Load/Save RF Kill Switch Status.
Apr 23 01:05:52 pc audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Apr 23 01:05:52 pc kernel: audit: type=1130 audit(1650693952.730:206): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Apr 23 01:05:52 pc NetworkManager[617]: <info>  [1650693952.7792] dhcp4 (wlo1): canceled DHCP transaction
Apr 23 01:05:52 pc NetworkManager[617]: <info>  [1650693952.7793] dhcp4 (wlo1): activation: beginning transaction (timeout in 45 seconds)
Apr 23 01:05:52 pc NetworkManager[617]: <info>  [1650693952.7793] dhcp4 (wlo1): state changed no lease
Apr 23 01:05:52 pc gnome-shell[1138]: An active wireless connection, in infrastructure mode, involves no access point?
Apr 23 01:05:52 pc NetworkManager[617]: <info>  [1650693952.7822] device (wlo1): set-hw-addr: set MAC address to CA:36:A1:6E:AE:2B (scanning)
Apr 23 01:05:52 pc NetworkManager[617]: <info>  [1650693952.7824] manager: NetworkManager state is now DISCONNECTED
Apr 23 01:05:52 pc wpa_supplicant[700]: p2p-dev-wlo1: CTRL-EVENT-DSCP-POLICY clear_all
Apr 23 01:05:52 pc wpa_supplicant[700]: p2p-dev-wlo1: CTRL-EVENT-DSCP-POLICY clear_all
Apr 23 01:05:52 pc wpa_supplicant[700]: nl80211: deinit ifname=p2p-dev-wlo1 disabled_11b_rates=0
Apr 23 01:05:52 pc NetworkManager[617]: <info>  [1650693952.7842] device (p2p-dev-wlo1): state change: disconnected -> unavailable (reason 'supplicant-failed', sys-iface-state: 'managed')
Apr 23 01:05:52 pc dbus-daemon[597]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.4' (uid=0 pid=617 comm="/usr/bin/NetworkManager --no-daemon")
Apr 23 01:05:52 pc systemd[1]: Starting Network Manager Script Dispatcher Service...
Apr 23 01:05:52 pc dbus-daemon[597]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Apr 23 01:05:52 pc systemd[1]: Started Network Manager Script Dispatcher Service.
Apr 23 01:05:52 pc audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Apr 23 01:05:52 pc kernel: audit: type=1130 audit(1650693952.786:207): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Apr 23 01:05:53 pc NetworkManager[617]: <info>  [1650693953.0090] manager: rfkill: WWAN hardware radio set disabled
Apr 23 01:05:53 pc audit[617]: USYS_CONFIG pid=617 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=radio-control arg="wwan-enabled:off" pid=1377 uid=1000 result=success exe="/usr/bin/NetworkManager" hostname=? addr=? terminal=? res=success'
Apr 23 01:05:53 pc NetworkManager[617]: <info>  [1650693953.0092] audit: op="radio-control" arg="wwan-enabled:off" pid=1377 uid=1000 result="success"
Apr 23 01:05:53 pc kernel: audit: type=1111 audit(1650693953.006:208): pid=617 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=radio-control arg="wwan-enabled:off" pid=1377 uid=1000 result=success exe="/usr/bin/NetworkManager" hostname=? addr=? terminal=? res=success'
Apr 23 01:05:53 pc wpa_supplicant[700]: wlo1: CTRL-EVENT-DSCP-POLICY clear_all
Apr 23 01:05:53 pc wpa_supplicant[700]: wlo1: CTRL-EVENT-DSCP-POLICY clear_all
Apr 23 01:05:53 pc wpa_supplicant[700]: nl80211: deinit ifname=wlo1 disabled_11b_rates=0
Apr 23 01:05:54 pc NetworkManager[617]: <info>  [1650693954.9024] manager: rfkill: Wi-Fi now enabled by radio killswitch
Apr 23 01:05:55 pc NetworkManager[617]: <info>  [1650693955.1052] manager: rfkill: WWAN hardware radio set enabled
Apr 23 01:05:55 pc audit[617]: USYS_CONFIG pid=617 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=radio-control arg="wwan-enabled:on" pid=1377 uid=1000 result=success exe="/usr/bin/NetworkManager" hostname=? addr=? terminal=? res=success'
Apr 23 01:05:55 pc kernel: audit: type=1111 audit(1650693955.100:209): pid=617 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=radio-control arg="wwan-enabled:on" pid=1377 uid=1000 result=success exe="/usr/bin/NetworkManager" hostname=? addr=? terminal=? res=success'
Apr 23 01:05:55 pc NetworkManager[617]: <info>  [1650693955.1054] audit: op="radio-control" arg="wwan-enabled:on" pid=1377 uid=1000 result="success"
Apr 23 01:05:55 pc NetworkManager[617]: <info>  [1650693955.1724] device (wlo1): supplicant interface state: internal-starting -> disconnected
Apr 23 01:05:55 pc NetworkManager[617]: <info>  [1650693955.1725] device (p2p-dev-wlo1): state change: unavailable -> unmanaged (reason 'removed', sys-iface-state: 'removed')
Apr 23 01:05:55 pc NetworkManager[617]: <info>  [1650693955.1732] Wi-Fi P2P device controlled by interface wlo1 created
Apr 23 01:05:55 pc NetworkManager[617]: <info>  [1650693955.1736] manager: (p2p-dev-wlo1): new 802.11 Wi-Fi P2P device (/org/freedesktop/NetworkManager/Devices/12)
Apr 23 01:05:55 pc NetworkManager[617]: <info>  [1650693955.1739] device (p2p-dev-wlo1): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Apr 23 01:05:55 pc NetworkManager[617]: <info>  [1650693955.1748] device (wlo1): state change: unavailable -> disconnected (reason 'supplicant-available', sys-iface-state: 'managed')
Apr 23 01:05:55 pc NetworkManager[617]: <info>  [1650693955.1755] device (p2p-dev-wlo1): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed')
Apr 23 01:05:55 pc gnome-shell[1138]: Removing a network device that was not added
Apr 23 01:05:57 pc wpa_supplicant[700]: rfkill: WLAN soft blocked
Apr 23 01:05:57 pc wpa_supplicant[700]: rfkill: WLAN soft blocked
Apr 23 01:05:57 pc NetworkManager[617]: <info>  [1650693957.8515] manager: rfkill: Wi-Fi now disabled by radio killswitch
Apr 23 01:05:57 pc NetworkManager[617]: <info>  [1650693957.8515] device (wlo1): state change: disconnected -> unavailable (reason 'none', sys-iface-state: 'managed')
Apr 23 01:05:57 pc NetworkManager[617]: <info>  [1650693957.8520] device (p2p-dev-wlo1): state change: disconnected -> unavailable (reason 'supplicant-failed', sys-iface-state: 'managed')
Apr 23 01:05:57 pc wpa_supplicant[700]: p2p-dev-wlo1: CTRL-EVENT-DSCP-POLICY clear_all
Apr 23 01:05:57 pc wpa_supplicant[700]: p2p-dev-wlo1: CTRL-EVENT-DSCP-POLICY clear_all
Apr 23 01:05:57 pc wpa_supplicant[700]: nl80211: deinit ifname=p2p-dev-wlo1 disabled_11b_rates=0
Apr 23 01:05:58 pc NetworkManager[617]: <info>  [1650693958.1204] manager: rfkill: WWAN hardware radio set disabled
Apr 23 01:05:58 pc NetworkManager[617]: <info>  [1650693958.1205] audit: op="radio-control" arg="wwan-enabled:off" pid=1377 uid=1000 result="success"
Apr 23 01:05:58 pc audit[617]: USYS_CONFIG pid=617 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=radio-control arg="wwan-enabled:off" pid=1377 uid=1000 result=success exe="/usr/bin/NetworkManager" hostname=? addr=? terminal=? res=success'
Apr 23 01:05:58 pc kernel: audit: type=1111 audit(1650693958.116:210): pid=617 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=radio-control arg="wwan-enabled:off" pid=1377 uid=1000 result=success exe="/usr/bin/NetworkManager" hostname=? addr=? terminal=? res=success'
Apr 23 01:05:58 pc wpa_supplicant[700]: wlo1: CTRL-EVENT-DSCP-POLICY clear_all
Apr 23 01:05:58 pc wpa_supplicant[700]: wlo1: CTRL-EVENT-DSCP-POLICY clear_all
Apr 23 01:05:58 pc wpa_supplicant[700]: nl80211: deinit ifname=wlo1 disabled_11b_rates=0
Apr 23 01:06:02 pc systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
Apr 23 01:06:02 pc audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Apr 23 01:06:02 pc kernel: audit: type=1131 audit(1650693962.800:211): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Apr 23 01:06:03 pc systemd[1]: systemd-rfkill.service: Deactivated successfully.
Apr 23 01:06:03 pc audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Apr 23 01:06:03 pc kernel: audit: type=1131 audit(1650693963.120:212): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

Logs from dmesg -w

[ 2639.966021] wlo1: deauthenticating from ee:a9:40:15:67:67 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 2640.000332] audit: type=1130 audit(1650695921.550:401): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 2640.224789] audit: type=1130 audit(1650695921.776:402): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 2640.341181] audit: type=1111 audit(1650695921.890:403): pid=617 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=radio-control arg="wwan-enabled:off" pid=1377 uid=1000 result=success exe="/usr/bin/NetworkManager" hostname=? addr=? terminal=? res=success'
[ 2640.344493] audit: type=1111 audit(1650695921.893:404): pid=617 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=radio-control arg="wwan-enabled:on" pid=1377 uid=1000 result=success exe="/usr/bin/NetworkManager" hostname=? addr=? terminal=? res=success'
[ 2643.800871] wlo1: authenticate with ee:a9:40:15:67:67
[ 2643.806343] wlo1: send auth to ee:a9:40:15:67:67 (try 1/3)
[ 2643.858374] wlo1: authenticated
[ 2643.864894] wlo1: associate with ee:a9:40:15:67:67 (try 1/3)
[ 2643.968165] wlo1: associate with ee:a9:40:15:67:67 (try 2/3)
[ 2643.970224] wlo1: RX AssocResp from ee:a9:40:15:67:67 (capab=0x131 status=0 aid=1)
[ 2643.972920] wlo1: associated
[ 2644.064901] wlo1: Limiting TX power to 23 (23 - 0) dBm as advertised by ee:a9:40:15:67:67
[ 2644.149149] IPv6: ADDRCONF(NETDEV_CHANGE): wlo1: link becomes ready
[ 2645.348445] audit: type=1131 audit(1650695926.900:405): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 2645.707555] wlo1: deauthenticating from ee:a9:40:15:67:67 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 2645.741776] audit: type=1130 audit(1650695927.293:406): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 2646.072707] audit: type=1111 audit(1650695927.623:407): pid=617 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=radio-control arg="wwan-enabled:off" pid=1377 uid=1000 result=success exe="/usr/bin/NetworkManager" hostname=? addr=? terminal=? res=success'
[ 2646.076118] audit: type=1111 audit(1650695927.626:408): pid=617 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=radio-control arg="wwan-enabled:on" pid=1377 uid=1000 result=success exe="/usr/bin/NetworkManager" hostname=? addr=? terminal=? res=success'
[ 2649.631697] wlo1: authenticate with ee:a9:40:15:67:67
[ 2649.636813] wlo1: send auth to ee:a9:40:15:67:67 (try 1/3)
[ 2649.698136] wlo1: authenticated
[ 2649.701546] wlo1: associate with ee:a9:40:15:67:67 (try 1/3)
[ 2649.706920] wlo1: RX AssocResp from ee:a9:40:15:67:67 (capab=0x131 status=0 aid=1)
[ 2649.710156] wlo1: associated
[ 2649.799511] wlo1: Limiting TX power to 23 (23 - 0) dBm as advertised by ee:a9:40:15:67:67
[ 2649.875820] IPv6: ADDRCONF(NETDEV_CHANGE): wlo1: link becomes ready
[ 2650.238457] audit: type=1131 audit(1650695931.790:409): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 2650.421434] wlo1: deauthenticating from ee:a9:40:15:67:67 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 2650.787914] audit: type=1111 audit(1650695932.336:410): pid=617 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=radio-control arg="wwan-enabled:off" pid=1377 uid=1000 result=success exe="/usr/bin/NetworkManager" hostname=? addr=? terminal=? res=success'
[ 2650.791539] audit: type=1111 audit(1650695932.343:411): pid=617 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=radio-control arg="wwan-enabled:on" pid=1377 uid=1000 result=success exe="/usr/bin/NetworkManager" hostname=? addr=? terminal=? res=success'
[ 2654.347120] wlo1: authenticate with ee:a9:40:15:67:67
[ 2654.352079] wlo1: send auth to ee:a9:40:15:67:67 (try 1/3)
[ 2654.408812] wlo1: authenticated
[ 2654.411511] wlo1: associate with ee:a9:40:15:67:67 (try 1/3)
[ 2654.413935] wlo1: RX AssocResp from ee:a9:40:15:67:67 (capab=0x131 status=0 aid=1)
[ 2654.417083] wlo1: associated
[ 2654.509991] wlo1: Limiting TX power to 23 (23 - 0) dBm as advertised by ee:a9:40:15:67:67
[ 2654.595078] IPv6: ADDRCONF(NETDEV_CHANGE): wlo1: link becomes ready
[ 2655.795081] audit: type=1131 audit(1650695937.346:412): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 2655.951238] wlo1: deauthenticating from ee:a9:40:15:67:67 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 2655.985153] audit: type=1130 audit(1650695937.536:413): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 2656.319982] audit: type=1111 audit(1650695937.870:414): pid=617 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=radio-control arg="wwan-enabled:off" pid=1377 uid=1000 result=success exe="/usr/bin/NetworkManager" hostname=? addr=? terminal=? res=success'
[ 2656.323175] audit: type=1111 audit(1650695937.873:415): pid=617 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=radio-control arg="wwan-enabled:on" pid=1377 uid=1000 result=success exe="/usr/bin/NetworkManager" hostname=? addr=? terminal=? res=success'
[ 2659.742550] wlo1: authenticate with ee:a9:40:15:67:67
[ 2659.747633] wlo1: send auth to ee:a9:40:15:67:67 (try 1/3)
[ 2659.833994] wlo1: authenticated
[ 2659.838273] wlo1: associate with ee:a9:40:15:67:67 (try 1/3)
[ 2659.841577] wlo1: RX AssocResp from ee:a9:40:15:67:67 (capab=0x131 status=0 aid=1)
[ 2659.844549] wlo1: associated
[ 2659.937165] wlo1: Limiting TX power to 23 (23 - 0) dBm as advertised by ee:a9:40:15:67:67
[ 2659.992249] IPv6: ADDRCONF(NETDEV_CHANGE): wlo1: link becomes ready
[ 2661.327031] audit: type=1131 audit(1650695942.876:416): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 2661.997437] audit: type=1130 audit(1650695943.546:417): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 2672.010391] audit: type=1131 audit(1650695953.560:418): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'



I’ve tried numerous fixes such as setkeycodes on e057/e058 or disabling suspend on lid closed in Tweaks but to no avail, which indicates to me it may be a different key. Unfortunately I’m unable to see anything that would help me find out what’s happening in these logs.