if you have ssh setup on the laptop you can ssh into the laptop
remotely and/or ping it.  If ping works or you can ssh into it it did
not suspend.



I have mine so that suspend is disabled when the lid is close but in
place I have this script started up in rc.local:
#!/bin/bash
laststate=open
while [ true ] ; do
  lidstate=`cat /proc/acpi/button/lid/LID0/state | awk '{print $2}'`
  if [ "${lidstate}" == "open" ] && [ "${laststate}" == "closed" ] ; then
    logger -s "at `date` lid was opened - full speed"
    /usr/local/bin/highspeed
    laststate=${lidstate}
    grep -i mhz /proc/cpuinfo | logger -s
  elif [ "${lidstate}" == "closed" ] && [ "${laststate}" == "open" ] ; then
      logger -s "at `date` lid was closed - low speed"
      /usr/local/bin/lowspeed
      laststate=${lidstate}
      grep -i mhz /proc/cpuinfo | logger -s
  fi
  sleep 10
done

lowspeed does this:
echo 400000 > /sys/devices/system/cpu/cpufreq/policy1/scaling_max_freq
 echo 400000 > /sys/devices/system/cpu/cpufreq/policy2/scaling_max_freq
 echo 400000 > /sys/devices/system/cpu/cpufreq/policy3/scaling_max_freq
 echo 400000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq

And that keeps mine cool while still leaving it running.

if I use it remotely via VNC I then run a script called highspeed that
turns the max_freq to full

My script you could modify to report the lid state every 10 seconds
rather than going low power and log that to a file with the date/time.

On Wed, Sep 8, 2021 at 1:39 PM Anil F Duggirala
<anilduggir...@fastmail.fm> wrote:
>
> Hello,
>
> I have been experiencing an issue on sporadic occasions. Having worked
> on my laptop, I close the lid and expect it to suspend. An hour later I
> open the lid, I see that it is on (not suspended) and am shown a black
> screen and the laptop is smoking hot (really hot). I hard shutdown turns
> the system off (havent tried any other way to get the system working
> because the temperature is so high I get scared, I dont really remember
> if the fans were on at this point, although I believe they are not
> because the temperature is really high).
>
> This has happened a few times, but is not happening always. How can I
> test suspend action when laptop lid is closed? How can I test the laptop
> lid close sensor is working? What can I do if this happens again? Is
> there a way to log temperatures to make sure the system is shutting down
> when high temperatures are reached?
>
> System: Fedora WS 34 on Dell XPS 15 with 4K touchscreen (this screen is
> heavy and I believe could generate a lot of heat too if it is left on).
>
> thank you,
> _______________________________________________
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org
> Fedora Code of Conduct: 
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
> Do not reply to spam on the list, report it: 
> https://pagure.io/fedora-infrastructure
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to