Hybrid laptop's accelerometer tilt interpreted as WiFi hardware switch

Bug #1438422 reported by Adam Colligan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
compiz (Ubuntu)
Invalid
Undecided
Unassigned
gnome-session (Ubuntu)
New
Undecided
Unassigned
network-manager (Ubuntu)
New
Undecided
Unassigned
urfkill (Ubuntu)
New
Undecided
Unassigned

Bug Description

This bug appears to be a regression in Vivid sometime in the second half of March 2015.

When the machine is tilted (e.g., onto its side), Syslog reports an "unknown" button being pressed. When tilted back to the normal laptop position, the machine's WiFi disconnects and is shown as disabled in the connection manager. Syslog indicates that urfkill registered a hardware switch cutoff for the WiFi.

I know that the accelerometers do work in other contexts and can be read properly in Ubuntu. As an example, this "orient" script works for me: https://github.com/leszakk/orient .

Hardware: HP Envy x360 15t -- this is a hybrid touch notebook
OS: Ubuntu 15.04 Beta 2 -- Desktop version
Kernel: 3.19.0-10-generic
urfkill:
  Installed: 0.6.0~20150318.103828.5539c0d.1-0ubuntu1
  Candidate: 0.6.0~20150318.103828.5539c0d.1-0ubuntu1
  Version table:
 *** 0.6.0~20150318.103828.5539c0d.1-0ubuntu1 0
        500 http://mirrors.mit.edu/ubuntu/ vivid/universe amd64 Packages
        100 /var/lib/dpkg/status

Below is a Syslog readout from a test event. The notebook starts in normal typing position, the hinge bent at a right angle. At 16:13:30, without moving the hinge, I tip the notebook 90 degrees to the left from my perspective. So the Unity launcher is now closest to the floor, for example. I hold it there for about 10 seconds until 16:13:40.

Mar 30 16:13:30 [my_hostname] kernel: [ 1327.717086] atkbd serio0: Unknown key pressed (translated set 2, code 0xd8 on isa0060/serio0).
Mar 30 16:13:30 [my_hostname] kernel: [ 1327.717098] atkbd serio0: Use 'setkeycodes e058 <keycode>' to make it known.
Mar 30 16:13:30 [my_hostname] kernel: [ 1327.724168] atkbd serio0: Unknown key released (translated set 2, code 0xd8 on isa0060/serio0).
Mar 30 16:13:30 [my_hostname] kernel: [ 1327.724180] atkbd serio0: Use 'setkeycodes e058 <keycode>' to make it known.
Mar 30 16:13:41 [my_hostname] URfkill[868]: Setting WLAN devices to blocked
Mar 30 16:13:41 [my_hostname] URfkill[868]: set_soft: Setting WLAN to blocked
Mar 30 16:13:41 [my_hostname] kernel: [ 1338.698934] wlan0: deauthenticating from [ma:ca:dd:re:ss] by local choice (Reason: 3=DEAUTH_LEAVING)
Mar 30 16:13:41 [my_hostname] wpa_supplicant[1015]: wlan0: CTRL-EVENT-DISCONNECTED bssid=[ma:ca:dd:re:ss] reason=3 locally_generated=1
Mar 30 16:13:41 [my_hostname] kernel: [ 1338.710906] cfg80211: Calling CRDA to update world regulatory domain
Mar 30 16:13:41 [my_hostname] avahi-daemon[876]: Interface wlan0.IPv6 no longer relevant for mDNS.
Mar 30 16:13:41 [my_hostname] avahi-daemon[876]: Leaving mDNS multicast group on interface wlan0.IPv6 with address fe80::8286:f2ff:fe32:def8.
Mar 30 16:13:41 [my_hostname] dhclient: receive_packet failed on wlan0: Network is down
Mar 30 16:13:41 [my_hostname] avahi-daemon[876]: Interface wlan0.IPv4 no longer relevant for mDNS.
Mar 30 16:13:41 [my_hostname] avahi-daemon[876]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 192.168.1.133.
Mar 30 16:13:41 [my_hostname] avahi-daemon[876]: Withdrawing address record for fe80::8286:f2ff:fe32:def8 on wlan0.
Mar 30 16:13:41 [my_hostname] avahi-daemon[876]: Withdrawing address record for 192.168.1.133 on wlan0.
Mar 30 16:13:41 [my_hostname] URfkill[868]: device_changed_cb: phy0
Mar 30 16:13:41 [my_hostname] NetworkManager[863]: <warn> Connection disconnected (reason -3)
Mar 30 16:13:41 [my_hostname] NetworkManager[863]: <error> [1427746421.849186] [platform/nm-linux-platform.c:1714] add_object(): Netlink error adding 0.0.0.0/0 via 192.168.1.1 dev wlan0 metric 1024 mss 0 src user: Unspecific failure
Mar 30 16:13:41 [my_hostname] NetworkManager[863]: <error> [1427746421.849417] [platform/nm-linux-platform.c:1714] add_object(): Netlink error adding 192.168.1.1/32 via 0.0.0.0 dev wlan0 metric 1024 mss 0 src user: Unspecific failure
Mar 30 16:13:41 [my_hostname] NetworkManager[863]: <error> [1427746421.849591] [platform/nm-linux-platform.c:1714] add_object(): Netlink error adding 0.0.0.0/0 via 192.168.1.1 dev wlan0 metric 1024 mss 0 src user: Unspecific failure
Mar 30 16:13:41 [my_hostname] avahi-daemon[876]: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.1.133.
Mar 30 16:13:41 [my_hostname] NetworkManager[863]: <error> [1427746421.849679] [nm-policy.c:693] update_ip4_routing(): Failed to set default route.
Mar 30 16:13:41 [my_hostname] avahi-daemon[876]: New relevant interface wlan0.IPv4 for mDNS.
Mar 30 16:13:41 [my_hostname] avahi-daemon[876]: Registering new address record for 192.168.1.133 on wlan0.IPv4.
Mar 30 16:13:41 [my_hostname] wpa_supplicant[1015]: rfkill: WLAN soft blocked
Mar 30 16:13:41 [my_hostname] NetworkManager[863]: <info> WiFi now disabled by radio killswitch
Mar 30 16:13:41 [my_hostname] NetworkManager[863]: <info> (wlan0): device state change: activated -> unavailable (reason 'none') [100 20 0]
Mar 30 16:13:41 [my_hostname] NetworkManager[863]: <info> (wlan0): deactivating device (reason 'none') [0]
Mar 30 16:13:41 [my_hostname] whoopsie[861]: [16:13:41] Cannot reach: https://daisy.ubuntu.com
Mar 30 16:13:41 [my_hostname] whoopsie[861]: [16:13:41] offline
Mar 30 16:13:41 [my_hostname] URfkill[868]: urf_killswitch_soft_block_cb: all done
Mar 30 16:13:41 [my_hostname] NetworkManager[863]: inet default table main
Mar 30 16:13:41 [my_hostname] NetworkManager[863]: priority 0x400 protocol static
Mar 30 16:13:41 [my_hostname] kernel: [ 1338.724369] cfg80211: World regulatory domain updated:
Mar 30 16:13:41 [my_hostname] kernel: [ 1338.724382] cfg80211: DFS Master region: unset
Mar 30 16:13:41 [my_hostname] kernel: [ 1338.724387] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
Mar 30 16:13:41 [my_hostname] kernel: [ 1338.724397] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
Mar 30 16:13:41 [my_hostname] kernel: [ 1338.724405] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
Mar 30 16:13:41 [my_hostname] kernel: [ 1338.724411] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm), (N/A)
Mar 30 16:13:41 [my_hostname] kernel: [ 1338.724417] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
Mar 30 16:13:41 [my_hostname] kernel: [ 1338.724424] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
Mar 30 16:13:41 [my_hostname] NetworkManager[863]: nexthop via 192.168.1.1 dev 3
Mar 30 16:13:41 [my_hostname] NetworkManager[863]: inet 192.168.1.1 table main
Mar 30 16:13:41 [my_hostname] NetworkManager[863]: priority 0x400 protocol static
Mar 30 16:13:41 [my_hostname] NetworkManager[863]: nexthop dev 3
Mar 30 16:13:41 [my_hostname] NetworkManager[863]: inet default table main
Mar 30 16:13:41 [my_hostname] NetworkManager[863]: priority 0x400 protocol static
Mar 30 16:13:41 [my_hostname] NetworkManager[863]: nexthop via 192.168.1.1 dev 3
Mar 30 16:13:41 [my_hostname] NetworkManager[863]: <info> (wlan0): canceled DHCP transaction, DHCP client pid 6495
Mar 30 16:13:41 [my_hostname] avahi-daemon[876]: Withdrawing address record for 192.168.1.133 on wlan0.
Mar 30 16:13:41 [my_hostname] avahi-daemon[876]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 192.168.1.133.
Mar 30 16:13:41 [my_hostname] avahi-daemon[876]: Interface wlan0.IPv4 no longer relevant for mDNS.
Mar 30 16:13:41 [my_hostname] NetworkManager[863]: <info> Writing DNS information to /sbin/resolvconf
Mar 30 16:13:41 [my_hostname] whoopsie[861]: [16:13:41] Cannot reach: https://daisy.ubuntu.com
Mar 30 16:13:41 [my_hostname] dnsmasq[9032]: setting upstream servers from DBus
Mar 30 16:13:41 [my_hostname] NetworkManager[863]: <info> NetworkManager state is now CONNECTED_LOCAL
Mar 30 16:13:41 [my_hostname] NetworkManager[863]: <info> NetworkManager state is now DISCONNECTED
Mar 30 16:13:42 [my_hostname] dbus[901]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Mar 30 16:13:42 [my_hostname] systemd[1]: Starting Network Manager Script Dispatcher Service...
Mar 30 16:13:42 [my_hostname] dbus[901]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Mar 30 16:13:42 [my_hostname] systemd[1]: Started Network Manager Script Dispatcher Service.
Mar 30 16:13:42 [my_hostname] nm-dispatcher: Dispatching action 'down' for wlan0
Mar 30 16:11:52 [my_hostname] gnome-session[3796]: message repeated 3 times: [ KviMainWindow::changeEvent g_pActiveWindow=#ubuntu+1]
Mar 30 16:13:42 [my_hostname] gnome-session[3796]: (deja-dup-monitor:13318): GLib-CRITICAL **: Source ID 66 was not found when attempting to remove it
Mar 30 16:13:43 [my_hostname] ntpd[9279]: Deleting interface #5 wlan0, fe80::8286:f2ff:fe32:def8#123, interface stats: received=0, sent=0, dropped=0, active_time=120 secs
Mar 30 16:13:43 [my_hostname] ntpd[9279]: Deleting interface #3 wlan0, 192.168.1.133#123, interface stats: received=9, sent=10, dropped=0, active_time=120 secs
Mar 30 16:13:43 [my_hostname] ntpd[9279]: 91.189.94.4 interface 192.168.1.133 -> (none)
Mar 30 16:13:43 [my_hostname] ntpd[9279]: 199.102.46.74 interface 192.168.1.133 -> (none)
Mar 30 16:13:43 [my_hostname] ntpd[9279]: 15.126.135.247 interface 192.168.1.133 -> (none)
Mar 30 16:13:43 [my_hostname] ntpd[9279]: 66.7.96.2 interface 192.168.1.133 -> (none)
Mar 30 16:13:43 [my_hostname] ntpd[9279]: 208.79.89.249 interface 192.168.1.133 -> (none)
Mar 30 16:13:43 [my_hostname] ntpd[9279]: peers refreshed
Mar 30 16:14:54 [my_hostname] gnome-session[3796]: (nm-applet:4046): Gtk-WARNING **: Attempting to read the recently used resources file at `/home/[my_username]/.local/share/recently-used.xbel', but the parser failed: Failed to open file '/home/[my_username]/.local/share/recently-used.xbel': Permission denied.
Mar 30 16:14:54 [my_hostname] org.gnome.zeitgeist.Engine[3567]: (zeitgeist-datahub:4181): Gtk-WARNING **: Attempting to read the recently used resources file at `/home/[my_username]/.local/share/recently-used.xbel', but the parser failed: Failed to open file '/home/[my_username]/.local/share/recently-used.xbel': Permission denied.
Mar 30 16:14:56 [my_hostname] gnome-session[3796]: compiz (core) - Warn: unhandled ConfigureNotify on 0x1204f63!
Mar 30 16:14:56 [my_hostname] gnome-session[3796]: compiz (core) - Warn: this should never happen. you should probably file a bug about this.
Mar 30 16:14:56 [my_hostname] gnome-session[3796]: compiz (core) - Warn: unhandled ConfigureNotify on 0x1204f63!
Mar 30 16:14:56 [my_hostname] gnome-session[3796]: compiz (core) - Warn: this should never happen. you should probably file a bug about this.
Mar 30 16:14:56 [my_hostname] gnome-session[3796]: compiz (core) - Warn: unhandled ConfigureNotify on 0x1204f63!
Mar 30 16:14:56 [my_hostname] gnome-session[3796]: compiz (core) - Warn: this should never happen. you should probably file a bug about this.
Mar 30 16:14:56 [my_hostname] gnome-session[3796]: compiz (core) - Warn: unhandled ConfigureNotify on 0x1204f63!
Mar 30 16:14:56 [my_hostname] gnome-session[3796]: compiz (core) - Warn: this should never happen. you should probably file a bug about this.
Mar 30 16:14:56 [my_hostname] gnome-session[3796]: compiz (core) - Warn: unhandled ConfigureNotify on 0x1204f63!
Mar 30 16:14:56 [my_hostname] gnome-session[3796]: compiz (core) - Warn: this should never happen. you should probably file a bug about this.
Mar 30 16:14:56 [my_hostname] gnome-session[3796]: compiz (core) - Warn: unhandled ConfigureNotify on 0x1204f63!
Mar 30 16:14:56 [my_hostname] gnome-session[3796]: compiz (core) - Warn: this should never happen. you should probably file a bug about this.
Mar 30 16:14:56 [my_hostname] gnome-session[3796]: compiz (core) - Warn: unhandled ConfigureNotify on 0x1204f63!
Mar 30 16:14:56 [my_hostname] gnome-session[3796]: compiz (core) - Warn: this should never happen. you should probably file a bug about this.
Mar 30 16:14:57 [my_hostname] gnome-session[3796]: compiz (core) - Warn: unhandled ConfigureNotify on 0x1204f63!
Mar 30 16:14:57 [my_hostname] gnome-session[3796]: compiz (core) - Warn: this should never happen. you should probably file a bug about this.
Mar 30 16:14:57 [my_hostname] gnome-session[3796]: compiz (core) - Warn: unhandled ConfigureNotify on 0x1204f63!
Mar 30 16:14:57 [my_hostname] gnome-session[3796]: compiz (core) - Warn: this should never happen. you should probably file a bug about this.
Mar 30 16:14:57 [my_hostname] gnome-session[3796]: compiz (core) - Warn: unhandled ConfigureNotify on 0x1204f63!
Mar 30 16:14:57 [my_hostname] gnome-session[3796]: compiz (core) - Warn: this should never happen. you should probably file a bug about this.
Mar 30 16:14:57 [my_hostname] gnome-session[3796]: compiz (core) - Warn: unhandled ConfigureNotify on 0x1204f63!
Mar 30 16:14:57 [my_hostname] gnome-session[3796]: compiz (core) - Warn: this should never happen. you should probably file a bug about this.

Adam Colligan (adam-p)
description: updated
Revision history for this message
Stephen M. Webb (bregma) wrote :

I can guarantee rendering to the screen (Compiz) has no effect on how input devices get interpreted by the system, even if it complains about receiving unknown configuration change requests from somewhere as a result.

Marking bug as Invalid for Compiz.

Changed in compiz (Ubuntu):
status: New → Invalid
Revision history for this message
Adam Colligan (adam-p) wrote :

Update: this bug also appears if the screen is held level in a normal, vertical position and the keyboard hinge is rotated around it. If I swing the keyboard under and around the screen into tablet mode, then swing it back into laptop mode, WiFi is disabled and has to be manually re-enabled via Network Manager.

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

I'm tempted to think this is a bug either in the kernel, X or the input handling - because it seems more to do with what the interpretation of key input (that happens to be how the accelerator signals?) than actual actions. What happens if you try booting with 14.10 kernel but leave everything else the same?

Revision history for this message
Adam Colligan (adam-p) wrote :

Tested 3.16.0-29 . Bug behavior appeared to be the same.

It might also be worth noting that sometimes, even when I re-enable WiFi, the network manager does not recognize available networks. However, I can connect if I choose to connect to a hidden network and then select from a list of potential hidden networks one that I know is active and in range. After that successful connection, network manager begins displaying that and other networks properly. I have assumed that this is just to do with the messy way in which the OS thinks the WiFi has been turned on or off by hardware switch, but maybe it's some kind of clue by itself.

Revision history for this message
Adam Colligan (adam-p) wrote :

I am currently working around the problem by setting key control to false in /etc/urfkill/urfkill.conf .

Revision history for this message
Adam Colligan (adam-p) wrote :

I can confirm this behavior recurred in a fresh install of Ubuntu 16.04 on this same machine.

Revision history for this message
Antoine Monmayrant (bozubuntu) wrote :

Hello, I confirm I face the very same bug on my HP Spectre x360 G2 with both 17.10 and 18.04 beta (it was OK on 17.04):
# Folding to tablet mode and back to laptop mode:
## Unknown keypress is registered:
grep Unknown /var/log/syslog
                Mar 17 14:24:53 lyre kernel: [11312.248585] atkbd serio0: Unknown key released (translated set 2, code 0xd8 on isa0060/serio0).
## Airplane gets activated and has to be manually deactivated

Revision history for this message
Antoine Monmayrant (bozubuntu) wrote :

Hello again,

Here is another way to look at this unexpected unknown key press and airplane mode activated (ie wifi killed):
acpi_listen
# Folding to tablet mode and back to laptop mode again
button/wlan WLAN 00000080 00000000 K
button/wlan WLAN 00000080 00000000 K
button/wlan WLAN 00000080 00000000 K

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Antoine Monmayrant, can you file a separate bug report? That will collect more accurate information for your machine.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.