• FedX@quokk.au
    link
    fedilink
    English
    arrow-up
    4
    ·
    2 hours ago

    As everyone is saying, to can get a laptop to run with the screen closed, but, in the off chance you are wondering how to do that, let me inform you!

    If you are using systemd, then edit /etc/systemd/logind.conf and add (on uncomment) a line HandleLidSwitch=ignore. If, like me, you use elogind, than it’s the exact same process, except you edit the file /etc/elogind/logind.conf. If it’s something else, then IDK, read the manual.

    However, the screen will keep running. There are quite a number of ways of doing this, but the most efficient would probably be using a simple daemon to disable the screen after a timeout for systemd:

    [Service]  
    ExecStartPost=-/usr/bin/setterm --blank 1 --powerdown 2 --powersave on  
    

    Or for the much superior dinit:

    type = scripted  
    command = /usr/bin/setterm --blank 1 --powerdown 2 --powersave on  
    

    Although, there are quite a number of ways of doing this. ACPI will give you more flexibility in the execution; your able to intercept precise key-codes and change how they interact in various ways, but this is probably the way I would do it.

    • Honytawk@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      2
      ·
      1 hour ago

      If you want to do it on Windows you go:

      Settings > System > Power & Battery > Lid, Power & Sleep button controls and set it to “nothing”

  • Saryn@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    3 hours ago

    Yooo I use the exact same laptop for a home server also! (One of its fans needs to be replaced though and I’ve been putting that off for a while now so the thing sounds like a goddamn lawnmower while hidden away at the back of a half empty closet)

    • boonhet@sopuli.xyz
      link
      fedilink
      arrow-up
      7
      arrow-down
      1
      ·
      9 hours ago

      Well that’s bad for thermals, they’re not really meant to run like that. Better to keep it open even if it’s set up that way

  • Wirlocke@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    34
    ·
    15 hours ago

    Don’t let server-normativity get you down! Servers can have all kinds of body types.

    A laptop can be a server, a raspberry pi can be a server, a cluster of junk phones can be a server, a smart fridge can be a server.

    Be sure to spread server body positivity!

    • BillionaireStew@lemmy.world
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      3 hours ago

      set it to run with the screen closed

      Macbooks provide no GUI setting to do that.

      It either requires third party software, a dummy HDMI hardware dongle, or a console command to disable sleep entirely.

      • RustyNova@lemmy.world
        link
        fedilink
        arrow-up
        23
        ·
        19 hours ago

        Burn the display.

        … it’s actually what happened to my first (and main) homeserver. Good ol’ laptop, screen short circuited and burned. Removed the screen and it’s running my containers. Maintenance? Unplug second display and plug it into the slab (Still haven’t gotten around to setup ssh, although I’d rather convert it to NixOs first)

        • Carl@anarchist.nexus
          link
          fedilink
          English
          arrow-up
          5
          ·
          18 hours ago

          Could also Remote Desktop into it, if you’re able to get that set up. That’s how I manage my home server. I just Remote Desktop into it from my regular conputer. Only over LAN, so I don’t need to deal with the security nightmare of having a Remote Desktop pointed at my WAN.

          Something like Guacamole may be worth looking into, if you end up switching to a distro. Or hell, Windows 11 Pro can do it right out of the box, if you already have that installed and don’t want to deal with the “my entire server is down until I manage to get the distro up and running” hassle right away. I know the whole point of running headless is to be able to reduce resources, but managing things with a proper desktop environment is so much more familiar compared to SSH.

    • Great Blue@infosec.pub
      link
      fedilink
      arrow-up
      26
      arrow-down
      4
      ·
      19 hours ago

      Most laptops are designed to be run with the lid open. Closing the lid and letting it run for a prolonged time can lead to overheating.

      • forbiddencherry@lemmy.today
        link
        fedilink
        arrow-up
        32
        ·
        19 hours ago

        Is that presently true or a historic footnote? All of the laptops I used at work would be docked with the lid closed. And even my cheap Acer from Walmart has the cooling set up so that it doesn’t matter if the lid is closed. Temps actually even drop a little with it closed.

        • atomicbocks@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          17
          ·
          17 hours ago

          Lots of very thin laptops, like my spouse’s XPS, have the exhaust in the hinges and are blocked when the lid is closed (picture sourced from random website):

          Keyboard side of an XPS 13 hinge.

          • adarza@lemmy.ca
            link
            fedilink
            English
            arrow-up
            9
            ·
            16 hours ago

            not just ‘thin’ ones. for the last 6-8 years at least, a fair number of mainstream laptop models have vents that would be blocked when closed.

        • Chronographs@lemmy.zip
          link
          fedilink
          English
          arrow-up
          13
          arrow-down
          1
          ·
          19 hours ago

          It’s more relevant for gaming laptops in my experience with more heat to dissipate. Something cheap just running a server like this wouldn’t likely be an issue.

        • fuckwit_mcbumcrumble@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          6
          ·
          19 hours ago

          My ThinkPad P1 (Thin workstation with an i9 and rtx 4090) would probably cook the screen if I left it running full bore for years on end. But the CPU/GPU don’t run appreciably hotter/slower because of it. I have seen other laptops with a fucked up display from presumably being run like that for years. But those are all high end thin workstations similar to mine (and also only Dells so far)

        • 14th_cylon@lemmy.zip
          link
          fedilink
          arrow-up
          1
          ·
          14 hours ago

          Is that presently true or a historic footnote? All of the laptops I used at work would be docked with the lid closed.

          the new ones are intentionally designed to fail after two years, so good job keeping the market running 😆

        • arudesalad@piefed.ca
          link
          fedilink
          English
          arrow-up
          3
          ·
          19 hours ago

          In the present laptops overheat themselves whenever so you have to buy a new one sooner

        • From personal experience, my acer gaming laptop will overheat and throttle its performance if the lid is closed and it’s trying to run a game, even with increased ambient airflow from case fans. Haven’t tried it with the lid closed and putting a fan to force air directly over the hotspots, but running the same things opened in the same spot and it runs fine

      • fuckwit_mcbumcrumble@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        7
        ·
        19 hours ago

        Unless you’re running extremely high workloads for hours it shouldn’t matter.

        Laptops intake from the bottom/sides and exhaust from the back. The display may get cooked, but the laptop shouldn’t run appreciably hotter because the lid is closed. Especially a thick gamer laptop like that.

      • 0ops@piefed.zip
        link
        fedilink
        English
        arrow-up
        2
        ·
        17 hours ago

        This is worth checking for sure, I believe some laptops are like this, but I’m not sure about most laptops.

        Maybe I’m just lucky, but none of my three laptops have this problem. Laptops A and B have air coming in the bottom and out one of the sides, and laptop C (my current main server) has air coming in through the bottom and it’s hinge is shaped so that when it’s open air goes out the front of the display and when it’s closed out the bottom/back.

      • moth@anarchist.nexus
        link
        fedilink
        English
        arrow-up
        1
        ·
        16 hours ago

        can lead to overheating

        so can sitting it on the carpet, which is what they’ve done.

    • dbx12@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      19 hours ago

      It likely has its WiFi antenna in the lid, so flipping it up and away from all the other metal parts probably improves the throughput.

  • moth@anarchist.nexus
    link
    fedilink
    English
    arrow-up
    38
    ·
    16 hours ago

    I love how everyone is debating the best way to run a server on a laptop, but only one other person has noticed they’ve got it sitting directly on the carpet with no airflow. poor thing probably has idle temps of 90 degrees.

    • leftzero@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      9
      ·
      16 hours ago

      Not enough pixels to identify it as carpet, could just as well be tile, or some particularly ugly linoleum.

      Maybe it’s not even the floor and it’s on a chipboard table, or a particularly ugly formica one.

      • Test_Tickles@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        12 hours ago

        Given what looks like a bullnose edge at the bottom of the pic, I assumed it must be just an ugly countertop.

  • bitfucker@programming.dev
    link
    fedilink
    arrow-up
    9
    ·
    18 hours ago

    You jest, but that’s my home assistant server. An old, god knows when, toshiba laptop that still has a lid latch and cd reader. The battery is still good and having a battery means free UPS (I hooked it to external mcu that can cut power at around 80% because it doesn’t have charge control feature yet).

    • soaringbirdie@lemmy.zip
      link
      fedilink
      arrow-up
      1
      ·
      9 hours ago

      Do not trust your 80% limit! I had such a limit too but my Dell XPS 13’s battery expanded a lot and became a fire hazard! No one should run their home server on a laptop unless you can do it without the battery.

      • bitfucker@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        9 hours ago

        Well, 80% is just the charge end threshold. After that I let it go down to 60% then charge to 80% again. So I never hold the charge at 80% (the MCU cut the charger via relay)

    • queerlilhayseed@piefed.blahaj.zone
      link
      fedilink
      English
      arrow-up
      5
      ·
      17 hours ago

      Almost all of my servers are former PCs and laptops that got too old to be comfortable daily drivers. lots of stuff, like DNS or file syncing, can be run on machines with hardly any computing power.

      Home server is a natural retirement plan for hardware that’s old but still works. Especially because you kind of have to start small if you only have one dinky machine, and you can grow your setup organically as you get newer gear.

      • bitfucker@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        17 hours ago

        Agree. This is the main reason why I sweep up old laptop whenever I can. Because those got batteries that can prove useful when the power goes out AND you’re using a consumer grade storage device (learned that the hard way lol)

        • queerlilhayseed@piefed.blahaj.zone
          link
          fedilink
          English
          arrow-up
          2
          ·
          17 hours ago

          I do that too, just make sure you look at the batteries at regular intervals because I’ve had a few that got alarmingly swollen before I found and delicately extracted them. the laptops are still going strong, they just share a communal battery now (the UPS).

          • bitfucker@programming.dev
            link
            fedilink
            arrow-up
            1
            ·
            9 hours ago

            Huh, interesring. I never have any issue with swollen batteries so far. I do have issue with them losing charge quickly and I replaced them (yay for old removeable battery which is a bunch of 18650 cell inside)

  • QuadratureSurfer@piefed.zip
    link
    fedilink
    English
    arrow-up
    10
    ·
    19 hours ago

    Well, there are settings so that you can keep the server on even when the lid is closed. The sign would still be useful on the lid, but you could make the text a little larger with less lines to display.