Hello,
I would like to share a solution that I am currently sticking to.
While we are waiting for NVIDIA to fix HDMI support, I believe that following workaround is the best way to handle the issue.
The idea is to switch whole X session to NVIDIA but not all the time.
My point was to switch only when HDMI output is being used.
Unfortunately switching to NVIDIA requires X-Server to be restarted.
Also, the switch needs to be triggered manually.
It’s not a perfect solution, but at least it allows me to use external monitor when I need it.
If you are interested in such solution, please follow these steps:
- Create new config file (note “.disabled” suffix, we will need this settings to be disabled by default):
nano '/etc/X11/xorg.conf.d/999-zzz_custom_nv_multiscreen.conf.disabled'
### @KD Custom ###
# dGPU only, fixes nvidia HDMI support, breaks dGPU powersaving
# NOTE: more tweaks required at: /usr/share/sddm/scripts/Xsetup
Section "Module"
Load "modesetting"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
# NOTE: verify your BusID with command: `lspci | grep -E "VGA|3D"`
BusID "PCI:1:0:0"
Option "AllowEmptyInitialConfiguration"
EndSection
- Edit SDDM config file (if you don’t use SDDM it will be a different file):
nano '/usr/share/sddm/scripts/Xsetup'
#!/bin/sh
# Xsetup - run as root before the login dialog appears
### @KD Custom ###
if [[ -f '/etc/X11/xorg.conf.d/999-zzz_custom_nv_multiscreen.conf' ]]; then
# NOTE: verify provider names with command: `xrandr --listproviders`
xrandr --setprovideroutputsource modesetting NVIDIA-G0
xrandr --auto
xrandr --dpi 96
fi
- Then you can use following commands to switch:
- from Intel to NVIDIA (enable HDMI, disable power-saving):
ln -s '/etc/X11/xorg.conf.d/999-zzz_custom_nv_multiscreen.conf.disabled' '/etc/X11/xorg.conf.d/999-zzz_custom_nv_multiscreen.conf' && systemctl restart sddm
from NVIDIA to Intel (disable HDMI, enable power-saving):
rm '/etc/X11/xorg.conf.d/999-zzz_custom_nv_multiscreen.conf' && systemctl restart sddm
Basically that’s all.
You might want to save above commands as scripts.
By the way - I think that similar behavior might be achieved with optimus-manager:
https://github.com/Askannz/optimus-manager/wiki
However I am not sure about this one. I have never used it. And for the current issue - I wanted to avoid installing external software.
Regards,
KD.