{"id":1181,"date":"2025-12-19T10:10:10","date_gmt":"2025-12-19T09:10:10","guid":{"rendered":"https:\/\/www.reeltoreel.nl\/blog\/?p=1181"},"modified":"2025-12-19T10:10:43","modified_gmt":"2025-12-19T09:10:43","slug":"hp-envy-360-laptop-close-lid-suspend-fix-linux","status":"publish","type":"post","link":"https:\/\/www.reeltoreel.nl\/blog\/?p=1181","title":{"rendered":"HP Envy 360 laptop close lid suspend does not work: fixed &#8211; linux"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you are like me and struggle that the suspend function when closing the lid on your  <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>~> inxi -M\nMachine:\n  Type: Convertible System: HP product: HP ENVY x360 Convertible 15-ed0xxx\n    v: Type1ProductConfigId serial: &lt;superuser required>\n  Mobo: HP model: 8757 v: 08.42 serial: &lt;superuser required> Firmware: UEFI\n    vendor: Insyde v: F.24 date: 03\/16\/2022\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">HP notebook does not work, there are several fixes and tweaks to the system that can be tried. I have literally tried all of them, and believe me, they all DO NOT WORK. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What is the problem? The suspend function in linux works ok, because<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># systemctl suspend<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">works flawlessly. But it does not work when setting the events in KDE plasma Power Management settings. Believe me, it simply does not work. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then I tried a LOT of other options, ranging from GRUB kernel boot options to creating custom ACPI events and letting systemd logind handle the event etc. etc. etc. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I spend a lot of time, none of the options worked for me. Finally this solution worked. it uses a service to manually suspend the machine (since the command does work normally). <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here are the 3 things you have to do:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. Create a unit file<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Create a unit file :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># vi \/etc\/systemd\/system\/lid-suspend.service<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">with the following content:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Unit]\nDescription=HP Envy lid close suspend poller\nAfter=plasma-kwin_wayland.service powerdevil.service\nWants=plasma-kwin_wayland.service powerdevil.service\n\n&#91;Service]\nType=simple\nExecStartPre=\nExecStart=\/usr\/local\/bin\/lid-suspend.sh\nRestart=always\nRestartSec=5\nCPUWeight=1\nIOSchedulingClass=idle\n\n&#91;Install]\nWantedBy=default.target<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">2. create a script<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Create the following script:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># vi \/usr\/local\/bin\/lid-suspend.sh<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">with the following content:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\nexec > \/var\/log\/lid-suspend.log 2>&amp;1\necho \"$(date): Lid poller v2 started - checking all paths\"\n\nwhile true; do\n  for path in \/proc\/acpi\/button\/lid\/LID*\/state \/proc\/acpi\/button\/lid\/state \/sys\/class\/input\/*\/uevent; do\n    if &#91; -f \"$path\" ]; then\n      if grep -qi \"closed\\|LID=closed\" \"$path\" 2>\/dev\/null; then\n        echo \"$(date): Lid closed op $path - suspending!\"\n        systemctl suspend\n        sleep 15\n        break 2\n      fi\n    fi\n  done\n  \n  # Fallback: input event checken\n  if ls \/sys\/class\/input\/input*\/name 2>\/dev\/null | grep -qi lid; then\n    echo \"$(date): Lid input device gevonden via fallback\"\n  fi\n  \n  sleep 1\ndone<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">3. activate the files<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># chmod +x \/usr\/local\/bin\/lid-suspend.sh\n# systemctl daemon-reload\n# systemctl enable --now lid-suspend.service<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After this, the suspend function works when the lid is closed in linux plasma6!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are like me and struggle that the suspend function when closing the lid on your HP notebook does not work, there are several fixes and tweaks to the system that can be tried. I have literally tried all of them, and believe me, they all DO NOT WORK. What is the problem? The [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[12],"class_list":["post-1181","post","type-post","status-publish","format-standard","hentry","category-audio","tag-linux"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.reeltoreel.nl\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1181","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.reeltoreel.nl\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.reeltoreel.nl\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.reeltoreel.nl\/blog\/index.php?rest_route=\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.reeltoreel.nl\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1181"}],"version-history":[{"count":2,"href":"https:\/\/www.reeltoreel.nl\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1181\/revisions"}],"predecessor-version":[{"id":1183,"href":"https:\/\/www.reeltoreel.nl\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1181\/revisions\/1183"}],"wp:attachment":[{"href":"https:\/\/www.reeltoreel.nl\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.reeltoreel.nl\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1181"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.reeltoreel.nl\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}