Saturday, October 18, 2025

Nvidia new hotplug feature on Linux


 If you use nvidia driver for your GPU, you probably wonder why in some config, you can't hotplug your second monitor. You need to reboot to be able to use it. I found out recently with the help of chatgpt that I have been using old feature of nvidia driver all this time. The key settings are in /etc/environment.

 My previous settings:

  __NV_PRIME_RENDER_OFFLOAD=1
__GLX_VENDOR_LIBRARY_NAME=nvidia
LIBVA_DRIVER_NAME=nvidia
GTK_USE_PORTAL=1

KWIN_DRM_USE_EGL_STREAMS=1

If you can see above, I am using KWIN_DRM_USE_EGL_STREAMS=1 which means KDE is using NVIDIA’s old EGLStreams backend, which is notoriously bad at detecting new monitors in Wayland sessions. I should remove it and replace it with    GBM_BACKEND=nvidia-drm which is the modern buffer management backend for NVIDIA + Wayland that supports hotplugging of monitors.

 So i replaced it with this settings:

  
__NV_PRIME_RENDER_OFFLOAD=1
__GLX_VENDOR_LIBRARY_NAME=nvidia
LIBVA_DRIVER_NAME=nvidia
GTK_USE_PORTAL=1  
GBM_BACKEND=nvidia-drm

 I need to reboot once and testing it by unplugging and plugging it back. It works!

 That's all there is to it. Have fun! 

Wednesday, December 18, 2024

Renew letsencrypt ssl certificate for zimbra 8.8.15


 Letsencrypt certs usually consists of these files:

1. cert.pem

2. chain.pem

3. fullchain.pem

4. privkey.pem


I am not going to discuss about how you get those files from letsencrypt. This is for how to renew ssl cert for zimbra specifically version 8.8.15 GA 4717 that i am using. It may or may not work for previous or later version. YMMV

Put the folder containing the certs in /opt/zimbra. Let's say directory named letsencrypt. Make sure it owns by zimbra. 

Step 1:

Download letsencrypt root cert here to the same folder as those letsencrypt certs above. The file name is isrgrootx1.pem.

Step 2:

run this: cat isrgrootx1.pem >> chain.pem

Step 3:

Verify the certs using zmcrtmgr. Run the command as user zimbra. The output as following:

zmcertmgr verifycrt comm privkey.pem cert.pem chain.pem  
** Verifying 'cert.pem' against 'privkey.pem'
Certificate 'cert.pem' and private key 'privkey.pem' match.
** Verifying 'cert.pem' against 'chain.pem'
Valid certificate chain: cert.pem: OK

Step 4: 

If step 3 above is ok. Deploy the certs (asa user zimbra)

zmcertmgr deploycrt comm  cert.pem chain.pem


Step 5: 

If step above is successful. Restart the services (as user zimbra):

zmcontrol restart


If there's no error. Your zimbra's ssl is renewed successfully.


Friday, December 6, 2024

Merge pdf files using command line in Linux

 To merge 2 pdf files for example using command line best using pdfunite.

pdfunite file1.pdf file2.pdf output.pdf

where output.pdf is the resulted merged pdf files


The quality is good. I used convert before but the quality of the resulted pdf was not good.

source: https://www.omglinux.com/merge-pdf-files-on-linux/


Tuesday, October 3, 2023

Second monitor no display after latest update - KDE-neon

 After latest update as of Oct 3, 2023, my second monitor was undetected with latest kernel (6.2.0-33-generic). If I boot with previous kernel, it can be detected. After searching a little bit, one suggestion is to delete kscreenrc directory in .local/share and then reboot.

Voila!... it was detected and the second monitor was running well

TQ for the tip. 

Source: https://forum.endeavouros.com/t/2nd-monitor-disabled-in-kde-plasma/34239


Thursday, September 14, 2023

KDE: bluetooth headset battery percentage

 If you like mine, I can't view my headset's battery percentage in my KDE's bluetooth notification.

To be able to see it, I need to add a line as below to /etc/bluetooth/main.conf under [General] section:

Experimental = true

Then you need to restart bluetooth service thusly:

systemctl restart bluetooth


You can see the percentage as screenshot below:




If you still can't see the percentage, it may mean your device or driver does not support it. 

That's all there is to it


Thursday, September 7, 2023

Installing kde-neon user edition using btrfs for root filesystem

 If you want to install KDE-Neon using btrfs as / filesystem, there is a bug that preventing it to boot successfully to console or to X or Wayland. For simplicity and laziness :)), i won't show here the errors but straight to solution or workaround.

1. Boot to live CD installer

2. Go to Konsole and edit file: sudo vi /calamares/desktop/modules/fstab.conf 

3. find word space_cache and change it to space_cache=v2

4. Start Installer and choose btrfs as filesystem for / 

It should successfully install KDE-Neon and boot to the new system successfully.


That's all there is to it. Have fun

Wednesday, June 14, 2023

How to resize a partition in proxmox 5 or 6

Background

1. The partition is ordinary partition and not LVM

2. The filesystem is ext4

3. The steps tested on proxmox 5 and 6 and maybe applicable to other versions of Proxmox


Step by step

1. Select and resize the disk you want in proxmox gui


2. Login to the VM and type dmesg command to see the relevant device that has changed i.e /dev/vde

3. unmount the partition i.e /dev/vde1 : umount /dev/vde1

4. use parted to extend the disk's size:
    4.1 parted /dev/vde
    4.2 resizepart 1
    4.3 q

5. unmount the partition if it is automatically mounted. If it is not, then proceed to the next step: 
     umount /dev/vde1

6. run filesystem check: e2fsck -f /dev/vde1

7. filesystem resize: resize2fs /dev/vde1

8. mount the partition i.e mount to /data: mount /dev/vde1 /data

9. Check and verify

That's all there is to it. Have fun!







Nvidia new hotplug feature on Linux

 If you use nvidia driver for your GPU, you probably wonder why in some config, you can't hotplug your second monitor. You need to reboo...