Revived Old Laptop To Linux With Local AI
Latest work involved putting back an old laptop back to life with a new version of the AntiX Linux distribution which is based on Debian 13 code base. It is a Lenovo G40 AMD A8 with two GPUs, one integtrated and one dedicated with the latter having 2GB VRAM. Instead of throwing it away, I find it useful for mobile computing having the capability to run small LLMs fast with its dedicated GPU with 2GB RAM.
One of the early challenge after reformatting the hardrive and installing into it AntiX 26 Full Linux is preparing it for GPU offloading by a locally hosted AI model. Had to override the default driver for the GPU which is radeon and replace it with the amdgpu driver and set it for both the GPU as the default. In this way llama.cpp with Vulkan support will work on the GPUs.
Had to build llama.cpp locally in the machine with Vulkan support running a downloaded Qwen model from Hugging Face and started testing for GPU offloading. First runs didn’t offload and it turns out the GPU reverted to using the radeon drivers instead of the amdgpu drivers and this was due to the instability brought about by the DPM module resetting the GPUs. Had to set DPM to zero at the point of radeon override of amdgpu. Things eventually worked fine and local LLM is actually offloading to GPU after the fix.
Once the GPU offloading was stable, proceeded with optimizing the local AI models with llama.cpp with Vulkan support by thinkering on the number of offloading layers to GPU, token size, batch size, and context windows. Later on locally run AI models became smooth and responsive.
Installed the necessary build environment and tools for UV, Python, Jupyter, C, and Java including the IDE for VS Code, VS Code Insiders, Cursor, and IntelliJ but the Cursor IDE is heavy when running with with a local AI model also running in the laptop.
Went to add layers of security first by setting up a firewall, rootkit scannes, anti-virus scanners, securit audit system, and finally VPN.
After the security layers, I went back to continue on the development tools and I had to dump the Cursor IDE because it is already heavy together with the Python runtime and its environment plus the locally running AI model the laptop been doing continues storage pagination slowing the laptop significantly to the point that it was freezing.
Replaced the IDE Cursor with Jupyter Lab run from terminal and development work is done in the Firefox browser. Everything get’s so light since this setup without the Cursor and instead just Jupyter Lab via Firefox with Python and UV.
As an added bonues while running a local AI model in the laptop and doing Python coding with UV and Jupyter Lab, I also loaded the browser with ChatGPT access and did laboratory coding on a Tesla T4 GPU hosted in the cloud and the laptop is just fine.
This site will document work in engineering, computing, artificial intelligence, physics, Linux, and experimental technology.