Showing posts with label plasma. Show all posts
Showing posts with label plasma. Show all posts

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! 

Friday, October 28, 2016

KDE desktop with no taskbar

Depending on the cause of this issue in your case, you may be able to fix it by editing your plasma-org.kde.plasma.desktop-appletsrc file and then performing

kquitapp plasmashell && kstart plasmashell

One cause I've run into is the buggy multimonitor functionality sometimes "losing" the taskbar from my laptop screen after I've connected to an external monitor and later disconnected (this was in plasma 5.5 or 5.6, I think). In this scenario, I've found the problem to be the lastScreen setting in the taskbar configuration. To fix this, find the section of text in plasma-org.kde.plasma.desktop-appletsrc that looks like:

[Containments][1]
activityId=
formfactor=2
immutability=1
lastScreen=1
location=4
plugin=org.kde.panel
wallpaperplugin=org.kde.image

(Some of these lines may vary in your configuration. In mine, this section was only a dozen lines down in the file, but I have no idea how much that may vary.)

Setting lastscreen=0 fixed the problem for me. I assume that 0 represents my laptop screen, and 1 is the external monitor.

If in doubt, you can always perform the procedure in jozxyqk's answer, and compare the newly generated plasma-org.kde.plasma.desktop-appletsrc with your saved plasma-org.kde.plasma.desktop-appletsrc.bak before restoring an edited version of your saved copy.

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...