Repurposing a Laptop

Repurposing a Laptop

Throwing away electronics always leaves a bad taste in my mouth. I recently acquired a 2019 MacBook Pro. My previous laptop was a Lenovo Ideapad 3 15IIL05 with a i3-1005G1. The idea was to repurpose the the notebook into a server that will house some docker containers and services.


Some of the services I have running right now include:
- Nginx Proxy Manager
- Portainer CE
- Ghost CMS
- Glances
- Mysql
- MariaDB

Future services I'd like to install on the server/laptop:
- Jellyfin
- Adguard / PiHole
- Paperless-NGX


The hardware being used is: A Lenovo IdeaPad3 15IIL05, with a USB3.0 to 1GBit ethenet adapter, since the unit doesn't come with a ethernet NIC. The Lenovo IdeaPad3 comes with a Intel i3-1005G1 with a QuickSync capable GPU. With 20GB of RAM and 500GB of NVMe for storage. The IdeaPad3 also has room for an SATA laptop drive. Concerns for the battery with long term AC connections was high. Limiting the battery to not charge past 60% was to prevent the battery from doing hazardous things and to prolong the battery life. Using a laptop has some perks: a built in display and a built in battery uninterrupted power supply, if power went out then for a few hours the server could still have power and power down safely the devices and containers.


If you're interested in limiting the charging rate for your Lenovo battery then you could use the follow:

lsmod | grep ideapad_laptop

To see if you have the ideapad_laptop module loaded on your linux install

ls /sys/bus/platform/drivers/ideapad_acpi

You're looking for the VPC2004:00, if you have something else that's fine. Replace it in the next command

cat /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode

This command reads if conservation_mode is enabled or not.

echo 1 > /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode
# To enable = 1

echo 1 > /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode
# To disable = 0
echo 1 | sudo tee /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode
# Use this if the above does not work

With the above commands your battery should never get more than 60-70%. If you have your battery at 100% at the start of the commands then your battery will slowly drain over time.


As always take care