<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:me@jasonclinton.com" title="Jason D. Clinton <me@jasonclinton.com>"> <span class="fn">Jason D. Clinton</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - LID_SWITCH_RELIABILITY=write_open doesn't work"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=102039">bug 102039</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEEDINFO
           </td>
           <td>NEW
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - LID_SWITCH_RELIABILITY=write_open doesn't work"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=102039#c17">Comment # 17</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - LID_SWITCH_RELIABILITY=write_open doesn't work"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=102039">bug 102039</a>
              from <span class="vcard"><a class="email" href="mailto:me@jasonclinton.com" title="Jason D. Clinton <me@jasonclinton.com>"> <span class="fn">Jason D. Clinton</span></a>
</span></b>
        <pre>Yep, that's it.

I tried hitting all the keys and then again while holding "Fn" key. Fn is a
Razer hardware modifier that is not visible to the kernel. When holding it, it
turns off all the keyboard LED's except for the function key row and the arrow
keys. For the vast majority of these keys, Fn+key causes the secondary label
key press to be sent. For example, there's Fn+F6 that sends Media Play/Pause
that's sent on event10 (the main keyboard device like any other key press).

There's exactly one key on the internal keyboard that maps to the first
internal keyboard device (event9 below): Fn+F4 (switch video output). By the
udev rule (because there's no way to disambiguate them) this is the one that is
associated with the lid switch in the debug output. If I press Fn+F4 after
opening the lid, the lid switch open event is written:

$ sudo libinput-debug-events --verbose
event3  - Power Button: is tagged by udev as: Keyboard
event3  - Power Button: device is a keyboard
event5  - Video Bus: is tagged by udev as: Keyboard
event5  - Video Bus: device is a keyboard
event0  - Lid Switch: is tagged by udev as: Switch
event0  - Lid Switch: device is a switch device
event0  - Lid Switch: Lid Switch: will write switch open events
event2  - Power Button: is tagged by udev as: Keyboard
event2  - Power Button: device is a keyboard
event1  - Sleep Button: is tagged by udev as: Keyboard
event1  - Sleep Button: device is a keyboard
event21 - Logitech Webcam C930e: is tagged by udev as: Keyboard
event21 - Logitech Webcam C930e: device is a keyboard
event6  - Razer Razer DeathAdder Elite: is tagged by udev as: Mouse
event6  - Razer Razer DeathAdder Elite: device is a pointer
event7  - Razer Razer DeathAdder Elite: is tagged by udev as: Keyboard
event7  - Razer Razer DeathAdder Elite: device is a keyboard
event8  - Razer Razer DeathAdder Elite: is tagged by udev as: Keyboard
event8  - Razer Razer DeathAdder Elite: device is a keyboard
event20 - USB Camera: is tagged by udev as: Keyboard
event20 - USB Camera: device is a keyboard
event9  - Razer Razer Blade Stealth: is tagged by udev as: Keyboard
event9  - Razer Razer Blade Stealth: device is a keyboard
event0  - lid: keyboard paired with Lid Switch<->Razer Razer Blade Stealth
event10 - Razer Razer Blade Stealth: is tagged by udev as: Keyboard
event10 - Razer Razer Blade Stealth: device is a keyboard
event11 - Razer Razer Blade Stealth: is tagged by udev as: Mouse
event11 - Razer Razer Blade Stealth: device is a pointer
event12 - Synaptics TM2438-005: is tagged by udev as: Touchpad
event12 - using pressure-based touch detection
event12 - thumb: enabled thumb detection (+pressure)
event12 - Synaptics TM2438-005: device is a touchpad
event12 - lid_switch: activated for Synaptics TM2438-005<->Lid Switch
event12 - palm: dwt activated with Synaptics TM2438-005<->Razer Razer Blade
Stealth
event13 - HDA Intel PCH Mic: is tagged by udev as: Switch
event14 - HDA Intel PCH Headphone: is tagged by udev as: Switch
event15 - HDA Intel PCH HDMI/DP,pcm=3: is tagged by udev as: Switch
event16 - HDA Intel PCH HDMI/DP,pcm=7: is tagged by udev as: Switch
event17 - HDA Intel PCH HDMI/DP,pcm=8: is tagged by udev as: Switch
event18 - HDA Intel PCH HDMI/DP,pcm=9: is tagged by udev as: Switch
event19 - HDA Intel PCH HDMI/DP,pcm=10: is tagged by udev as: Switch
event4  - AT Raw Set 2 keyboard: is tagged by udev as: Keyboard
event4  - AT Raw Set 2 keyboard: device is a keyboard
-event3   DEVICE_ADDED     Power Button                      seat0 default
group1  cap:k
-event5   DEVICE_ADDED     Video Bus                         seat0 default
group2  cap:k
-event0   DEVICE_ADDED     Lid Switch                        seat0 default
group3  cap:S
-event2   DEVICE_ADDED     Power Button                      seat0 default
group4  cap:k
-event1   DEVICE_ADDED     Sleep Button                      seat0 default
group5  cap:k
-event21  DEVICE_ADDED     Logitech Webcam C930e             seat0 default
group6  cap:k
-event6   DEVICE_ADDED     Razer Razer DeathAdder Elite      seat0 default
group7  cap:p left scroll-nat scroll-button
-event7   DEVICE_ADDED     Razer Razer DeathAdder Elite      seat0 default
group7  cap:kp scroll-nat
-event8   DEVICE_ADDED     Razer Razer DeathAdder Elite      seat0 default
group7  cap:k
-event20  DEVICE_ADDED     USB Camera                        seat0 default
group8  cap:k
-event9   DEVICE_ADDED     Razer Razer Blade Stealth         seat0 default
group9  cap:k
-event10  DEVICE_ADDED     Razer Razer Blade Stealth         seat0 default
group9  cap:kp scroll-nat
-event11  DEVICE_ADDED     Razer Razer Blade Stealth         seat0 default
group9  cap:p left scroll-nat scroll-button
-event12  DEVICE_ADDED     Synaptics TM2438-005              seat0 default
group10 cap:pg  size 102x60mm tap(dl off) left scroll-nat scroll-2fg-edge
click-buttonareas-clickfinger dwt-on
-event13  DEVICE_ADDED     HDA Intel PCH Mic                 seat0 default
group11 cap:
-event14  DEVICE_ADDED     HDA Intel PCH Headphone           seat0 default
group11 cap:
-event15  DEVICE_ADDED     HDA Intel PCH HDMI/DP,pcm=3       seat0 default
group11 cap:
-event16  DEVICE_ADDED     HDA Intel PCH HDMI/DP,pcm=7       seat0 default
group11 cap:
-event17  DEVICE_ADDED     HDA Intel PCH HDMI/DP,pcm=8       seat0 default
group11 cap:
-event18  DEVICE_ADDED     HDA Intel PCH HDMI/DP,pcm=9       seat0 default
group11 cap:
-event19  DEVICE_ADDED     HDA Intel PCH HDMI/DP,pcm=10      seat0 default
group11 cap:
-event4   DEVICE_ADDED     AT Raw Set 2 keyboard             seat0 default
group12 cap:k
[...]
[close lid, suspend, resume, open lid, hit Fn+F4]
-event0   SWITCH_TOGGLE    +151.91s     switch lid state 0
-event9   KEYBOARD_KEY     +151.91s     KEY_RIGHTMETA (126) pressed
 event9   KEYBOARD_KEY     +151.91s     *** (-1) pressed
 event9   KEYBOARD_KEY     +152.01s     *** (-1) released
 event9   KEYBOARD_KEY     +152.12s     KEY_RIGHTMETA (126) released

Living with hitting Fn+F4 after opening the lid as a workaround goes is fairly
undesirable because hitting that key causes the internal Intel GPU to go
through the act of switching through all external video output ports to find an
external monitor. This causes the internal display to be blank for ~3 seconds.

So, how do we have the second keyboard that has this label be associated with
the lid switch, also? It seems that the video switch keyboard is always getting
enumerated first.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>