Monthly Archives: September 2023

LG GRAM 16 (16Z90P): Adding a second SSD

I am writing this report about my (nice) experience adding a second SSD (an NVMe, 1 Tb) to my LG GRAM 16, my main laptop that I’ve enjoyed for two years.

DISCLAIMER: This is NOT meant to be a tutorial; it’s just a report. You will do that at your own risk if you perform these operations! Ensure you did not void the warranty by opening your laptop.

I wrote this blog post as a reminder for myself in case I have to open the laptop again in the future!

I also decided to describe my experience because there seems to be some confusion and doubts about which kind of SSD you can add in the second slot (SATA? or PCI?). At least for this model, LG GRAM 16 (16Z90P), I could successfully and seamlessly insert an NVMe M.2 PCIe3. This is the SSD I added, Samsung SSD 970 EVO Plus (NOTE: this SSD does NOT include a screw for securing the SSD to the board; however, the LG GRAM has a screw in the second slot, so no problem!):

You can also see the internal of the laptop below and what’s written in the second slot.

These are the tools I’ve used:

It’s time to open the back cover. That’s the first time I did that, and I found it not very easy… not impossible, but not even as easy as I thought. Fortunately, there are several videos that show this procedure. In particular, there’s an “official” one from LG, which I suggest to follow:

Removing the rubber feet (there are three types) was not easy from the beginning: they are “sticky”, but with a proper tool (the grey one in the picture above), I managed to remove the bigger ones and the one at the top.

For the other smaller ones, I had to use a cutter. Be careful because they tend to jump on your face (mind your eyes). πŸ˜‰ Moreover, you have to be careful not to use too much force because you might break the bigger ones (in the linked video, you can see that the person breaks the one in the low left corner)

And here’s the back cover with all the screws revealed:

The screws are not of the same type either, so I ensured to remember their places:

Again, removing the cover after removing all the screws might not be straightforward: take inspiration from the linked video above! It took me some effort and a few attempts, but I finally made it! Here’s the removed cover and the internal of the laptop (well organized and neat, isn’t it?):

Now, let’s zoom in on the second SLOT:

You can see that it says NVME and SATA3. I haven’t tried with a SATA3, but, as I said, I had no problem with the Samsung NVME!

IMPORTANT: unplug the battery cable before continuing (at least, that’s what the LG video says). That’s easy: pull it gently.

Remove the screw from the second slot:

Insert the SSD (that’s easy):

And secure it with the screw:

Of course, now we have to reconnect the battery cable!

Let’s take a final look at the result:

OK! Let’s close the laptop: putting the cover back is easier than removing it, but you still have to ensure you close the cover correctly. Put the screws back and the rubber feet (that’s also easy because they are still sticky).

The moment of truth… will the computer recognize the added SSD? Let’s enter the BIOS and… suspense… πŸ˜€

IT DOES!!! (see that at the bottom. Yes, I have several Linux distributions installed on this laptop)

I booted into Linux (sorry, I almost never use Windows, and, to be honest, I still haven’t checked whether Windows is happy with the new SSD) and used the KDE partition manager to create a new partition to make a few experiments:

Everything looks fine! In the meantime, I’ve also created another partition for virtual machines on the new SSD, which works like a charm! I haven’t checked whether it’s faster than the primary SSD, which comes with the laptop.

That’s all! πŸ™‚

Hyprland and ssh-agent

In this post, I’d like to document how to use ssh-agent in Hyprland to store SSH key passphrases.

This is part of my blog series on Hyprland.

Assuming you use SSH keys protected with a passphrase, each time you use an SSH connection with the SSH key, you are prompted for the passphrase.

You can use ssh-agent and ssh-add.

First, start the agent:

Then, use ssh-add to add a specific key (see the documentation) or all the keys:

You are prompted for the passphrase, but then, the passphrase is remembered, and you are not asked anymore (unless the lifetime expires, by default, 1 hour).

Unfortunately, this holds only in the current terminal. It works for other applications started from that terminal. For example, if you start Visual Studio from that terminal and you access a Git repository with your SSH key, the passphrase is reused without prompting you. If you start another terminal or program using its launcher, you are prompted for the passphrase again; moreover, in such a situation, the passphrase is not remembered since you should rerun ssh-add.

Instead, I’d like to be prompted for the passphrase only the first time I use ssh; for the current desktop session, I don’t want to enter the passphrase again. Of course, if I reboot, I’m OK with re-entering the passphrase the first time I need it.

In GNOME, you can rely on its keyring to prompt you for the passphrase and store it for the current session or permanently. In KDE, you have a similar mechanism, which, however, has to be appropriately configured (that’s out of the scope of this post).

In Hyprland, you have to set up such mechanisms manually.

The Arch Wiki, as usual, documents an easy solution, which I’ll report here (I haven’t tried alternatives, but this one is pretty easy to set up).

First (, add this option to your “~/.ssh/config”:

This way, all SSH clients, including Git, store keys in the agent on first use.

We must ensure an ssh-agent is automatically started when you enter Hyprland.

Again, the Arch Wiki ( tells you how to do that by starting ssh-agent a systemd user service.

Create this file “~/.config/systemd/user/ssh-agent.service” with these contents:

Then ensure the environment variable “SSH_AUTH_SOCK” is set to “$XDG_RUNTIME_DIR/ssh-agent.socket”. For example, in the Hyperland configuration file:

Now, start the service for your user at boot:

Reboot to ensure the environment variable is set correctly and the service is started.

Try to use ssh, and you will be prompted for your passphrase. Try to use ssh again for that passphrase, and you should not be asked for the passphrase. Start a new terminal, use SSH again, even with Git, and you will not be asked for the passphrase. This also works for other programs that need SSH, for example, Visual Studio Code when accessing a Git repository or Unison when connecting through SSH.

From now on, you’ll be asked for the passphrase only the first time you use ssh from any program and never more for that session.

Stay tuned for more posts about Hyprland. πŸ™‚