# Lidswitch stopped doing anything (certainly stopped locking as desired), and unsure why: no dmesg output for lid-close

**URL:** https://discourse.nixos.org/t/lidswitch-stopped-doing-anything-certainly-stopped-locking-as-desired-and-unsure-why-no-dmesg-output-for-lid-close/61406
**Category:** Help
**Created:** [March 9, 2025, 11:27pm UTC](https://discourse.nixos.org/t/lidswitch-stopped-doing-anything-certainly-stopped-locking-as-desired-and-unsure-why-no-dmesg-output-for-lid-close/61406 "2025-03-09T23:27:59Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![daxodev](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/d/cab0a1/32.png) [@daxodev](https://discourse.nixos.org/u/daxodev)
#### Post date: [March 9, 2025, 11:27pm UTC](https://discourse.nixos.org/t/lidswitch-stopped-doing-anything-certainly-stopped-locking-as-desired-and-unsure-why-no-dmesg-output-for-lid-close/61406/1 "2025-03-09T23:27:59Z")

</div>

I’m _not sure_ if closing my laptop (lidswitch close) is suspending, but certainly when I _open_ the lid, I find the screen unlocked. **Question: any obvious** steps to debug that lid-switch hardware events are even coming through to one’s laptop?

- The hardware I have is: framework 13 inch 1st-gen laptop (the [“11th gen intel”](https://gitlab.com/jzacsh/dotfiles/-/blob/main/.host/src/host.art/nixos/system/configuration.nix?ref_type=heads#L16))
- The nixos config I have is: [this folder](https://gitlab.com/jzacsh/dotfiles/-/tree/main/.host/src/host.art/nixos/system) (symlink [to this](https://gitlab.com/jzacsh/dotfiles/-/tree/main/.host/src/distro.nixos/nix-common-configs) is followed; whole thing’s copy/pasted as a tree of content up into `/etc/nixos/...`)

## debugging steps I’ve tried…

1. checking my systemd settings…

I currently have [uncommented this unrelated line](https://gitlab.com/jzacsh/dotfiles/-/blob/main/.host/src/distro.nixos/nix-common-configs/system-personal-computer.nix?ref_type=heads#L52) (“unrelated” because it _should_ only apply to being docked) just to be sure:

```auto
services.logind.lidSwitchDocked = "lock"

```

and [according to docs, `suspend` should be default for `lidSwitch`](https://nixos.org/manual/nixos/stable/options.html#opt-services.logind.lidSwitch) but I’ve explicitly set that too, just to be sure.

1. `fwupdmgr update` already says I’m on the latest firmware

2. get a baseline: it _used_ to work with this exact same hardware, but I recently upgraded my SSD, so reinstalled nixos from scratch. Then I merged my old configs with my new calamari-generated configs. It _could_ be I messed up something int he process of reinstalling, but thought I’d ask here before continuing to dig.  
- made sure I followed [the couple manual setps for channels for nixos-hardware](https://github.com/NixOS/nixos-hardware/tree/master?tab=readme-ov-file#using-channels)  
- made sure to reboot  
- next: I guess I can try to find logs to indicated lidswitch is even being detected? I _assume_ dmesg should show lidswitch happens, but maybe not (maybe logs normally only output for suspend/etc.-- systemd’s actions when it _is_ handling lidswitch with a suspend?)

---

<div class="post-metadata">

### Author: ![Postboote](https://discourse.nixos.org/user_avatar/discourse.nixos.org/postboote/32/28003_2.png) [@Postboote](https://discourse.nixos.org/u/Postboote)
#### Post date: [March 17, 2025, 11:44am UTC](https://discourse.nixos.org/t/lidswitch-stopped-doing-anything-certainly-stopped-locking-as-desired-and-unsure-why-no-dmesg-output-for-lid-close/61406/2 "2025-03-17T11:44:09Z")

</div>

Hello  
The lidswitch event and sleep is not in dmesg. It is logged in journalctl.  
To see when the lid close event is triggerd use this command:

```auto
journalctl | grep "Lid closed" 

```

Then just pick a time when the lid got closed and type something like this:

```auto
journalctl | grep "Jan 12 08:39"

```
