• jcs@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    7 days ago

    Disable suspend when the laptop lid is closed:

    sudo sed -i 's/#HandleLidSwitch=suspend/HandleLidSwitch=ignore/g' /etc/systemd/logind.conf
    sudo sed -i 's/#HandleLidSwitchExternalPower=suspend/HandleLidSwitchExternalPower=ignore/g' /etc/systemd/logind.conf
    sudo systemctl restart systemd-logind
    

    If you are in a TTY, you can blank the screen before closing the lid to prevent burn-in. After running this, come back later and press a key to turn the screen on again.

    alias blankscreen='setterm --blank=force; read ans; setterm --blank=poke'

    • Stovetop@lemmy.world
      link
      fedilink
      arrow-up
      80
      ·
      7 days ago

      Could be an overheating concern maybe. Some laptops weren’t designed to run with the lid closed, if it inhibits the air flow.

      • MajorasMaskForever@lemmy.world
        link
        fedilink
        English
        arrow-up
        9
        ·
        7 days ago

        I can’t tell for sure, but it looks like a Lenovo y510p. Or at least it looks very similar to the one I owned back in the day.

        There was a vent in the hinge, and these things would absolutely cook themselves with the lid closed

        • zourn@lemmy.world
          link
          fedilink
          arrow-up
          3
          ·
          7 days ago

          I’m currently using a y510p as a home lab. Every update resets the shutdown-on-lid-close setting. Had to set up a cron job to re-disable it on boot.

      • over_clox@lemmy.world
        link
        fedilink
        arrow-up
        93
        ·
        7 days ago

        As right as that might be, it’s on carpet!

        I don’t believe they put much thought into airflow and overheating…

  • The_v@lemmy.world
    link
    fedilink
    arrow-up
    10
    ·
    7 days ago

    Lol, reminds me of my old setup.

    It was all old W98 laptop that I got used. I installed xunbuntu on it back when it first came out in 2006. It sat on my desk, open like that with a bit of tape over to hold the power cord because it was loose. The battery was completely dead.

    It was the server I used to host all the modded maps I made for a silly little tank game. Thing ran seemlessly only going down when the power went out or somebody juggled the power cord for 5 years.

  • maxwells_daemon@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    7 days ago

    My server is a loose motherboard with a loose PSU, thrown into the living room TV rack, which I leave open for cooling. It’s a repurposed (free) Athlon, DDR2. I only use it for smb and git backups, and project sharing between my desktop and laptop. What amazes me most is my IT coworkers don’t find that a perfectly acceptable scenario.

  • shalafi@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 days ago

    Serious question that I’ve wondered about but never worked on.

    Can you rig a laptop to keep running with the lid closed? Either by software or hardware? I guess you could cut the switch, but an OS-based solution would be neater.

    • mic_check_one_two@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      3
      ·
      6 days ago

      Yes, in most OSes it’s just a setting you can toggle. But even if you can, you may want to leave it open for cooling. Lots of laptops are barely cooled enough to support themselves, and will often rely on radiating heat out of the case as a form of passive cooling. And even when the screen is open, they still struggle to stay cool. Closing the lid often makes these cooling issues much worse.