Re: HandleLidSwitch issue.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26Mar2020 01:13, Tim <ignored_mailbox@xxxxxxxxxxxx> wrote:
On Wed, 2020-03-25 at 13:47 +0100, Erik P. Olsen wrote:
there is nothing in BOIS settings regarding closing of the lid.
However, it's not terribly important, so I can live with it.

Just be aware that if you close the lid (on *some* laptops) and leave
them running, they can overheat.  *They* rely on the lid being open for
sufficient airflow.

Aye. Particularly if you're running something CPU intensive as well.

For this reason I keep a little shell script called "zz" around, to sleep the laptop. So named to make it trivial to type and therefore easy to prefer to just shutting the lid. Here:

   #!/bin/sh
   #
   # Sleep the machine. - Cameron Simpson <cs@xxxxxxxxxx>

   pf -d
   sync
   if [ "x$OS" = xdarwin ]
   then
     pmset sleepnow
   else
     set-x sudo hibernate \
     || { echo "Hibernate fails, exit status $?" >&2
          exit 1
        }
   fi

The "pf -d" just shuts down my active ssh port forwards (other script automation there, ignore it). The if-statement is what you want. Hmm, it could do with an:

   : ${OS:=`uname -s | tr '[A-Z]' '[a-z]'`}

up the top, too. I set $OS in my environment anyway, which is why I hadn't noticed.

Cheers,
Cameron Simpson <cs@xxxxxxxxxx>
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux