Skip to content

Instantly share code, notes, and snippets.

@ibLeDy
Last active December 20, 2023 11:23
Show Gist options
  • Save ibLeDy/184648318cd78c5ebc5997220fa0faf8 to your computer and use it in GitHub Desktop.
Save ibLeDy/184648318cd78c5ebc5997220fa0faf8 to your computer and use it in GitHub Desktop.
Fix for second monitor with blank screen (Ubuntu 20.04 - HP Pavilion Gaming Laptop 15-ec1xxx, Nvidia GTX 1650, Ryzen 5 4600H)
diff --git a/10-amdgpu.conf b/10-amdgpu.conf
index ef20256..c86f77a 100644
--- a/10-amdgpu.conf
+++ b/10-amdgpu.conf
@@ -1,5 +1,5 @@
Section "OutputClass"
Identifier "AMDgpu"
MatchDriver "amdgpu"
- Driver "amdgpu"
+ Driver "modesetting"
EndSection
diff --git a/10-nvidia.conf b/10-nvidia.conf
index d0869bc..f214034 100644
--- a/10-nvidia.conf
+++ b/10-nvidia.conf
@@ -3,7 +3,6 @@ Section "OutputClass"
MatchDriver "nvidia-drm"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration"
+ Option "PrimaryGPU" "Yes"
ModulePath "/usr/lib/x86_64-linux-gnu/nvidia/xorg"
EndSection
@ibLeDy
Copy link
Author

ibLeDy commented Apr 20, 2021

  • /usr/share/X11/xorg.conf.d/10-amdgpu.conf
  • /usr/share/X11/xorg.conf.d/10-nvidia.conf

@Temisann
Copy link

Does this code also applies to when the hdmi output on the tv shows a white screen which covers the monitor display? if yes how do I execute the code, if no please could you offer any ideas on how to fix it?

@ibLeDy
Copy link
Author

ibLeDy commented Nov 20, 2022

Does this code also applies to when the hdmi output on the tv shows a white screen which covers the monitor display? if yes how do I execute the code, if no please could you offer any ideas on how to fix it?

I don't have an answer to that problem, as I haven't experienced it, you might want to test it by yourself. You can try it by editing the following files (creating a backup before just in case), making the changes suggested in the gist, and then rebooting the system. (Under your own responsibility ofc).

  • /usr/share/X11/xorg.conf.d/10-amdgpu.conf
  • /usr/share/X11/xorg.conf.d/10-nvidia.conf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment