╰─λ sudo mhwd -i pci video-nvidia-prime-render-offload
Error: config 'video-nvidia-prime-render-offload' conflicts with config(s): video-nvidia-dkms
Should I uninstall dkms, then?
╰─λ sudo mhwd -i pci video-nvidia-prime-render-offload
Error: config 'video-nvidia-prime-render-offload' conflicts with config(s): video-nvidia-dkms
Should I uninstall dkms, then?
Yes, please.
Just in case, here's the log of the removal of dkms.
https://bin.garudalinux.org/?30539da9c2ab5292#a5U5j9a4K2UE55SRhpBwSzGsHp6WkauTxM6c9YTdqdW
And here's the log of the installation of prime.
https://bin.garudalinux.org/?89bbf2d1f804ed0f#J4Ct8YUxpwp5jupNdyFmjGyu7XquSSvik2Dh7HU7MnzQ
Apparently, it finished both tasks successfully.
It looks as expected.
Waiting for reboot...
Okay! I rebooted and now it recognizes my monitor again. However, it's the same as the beginning: I put it on the left and half of my laptop screen goes black.
╰─λ bash -c 'xrandr --prop | grep -E "connected|PRIME" '
eDP connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 382mm x 215mm
DP-1-0 disconnected (normal left inverted right x axis y axis)
PRIME Synchronization: 1
DP-1-1 disconnected (normal left inverted right x axis y axis)
PRIME Synchronization: 1
DP-1-2 disconnected (normal left inverted right x axis y axis)
PRIME Synchronization: 1
DP-1-3 disconnected (normal left inverted right x axis y axis)
PRIME Synchronization: 1
HDMI-1-0 connected (normal left inverted right x axis y axis)
PRIME Synchronization: 1
I also generated the xorg.conf file.
╰─λ cat ~/Escritorio/xorg.conf
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 460.39
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection
Section "Files"
EndSection
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection
Post xorg log (/var/log) in bin.
Possibly in this path
~/.local/share/xorg/Xorg.0.log
Here it is!
https://bin.garudalinux.org/?ec2d8edf33c84490#DXaYmsxEkAM7qjCUW16yvNRh9FkQ59mkJ5p9gcypAVnH
Is this your actual time?
Time: Tue Feb 2 15:10:42 2021
Also check
xrandr --listproviders
Time: Tue Feb 2 15:10:42 2021
Yup, it's 15:50pm now.
╰─λ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x54 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 1 associated providers: 1 name:Unknown AMD Radeon GPU @ pci:0000:05:00.0
Provider 1: id: 0x1f7 cap: 0x2, Sink Output crtcs: 4 outputs: 5 associated providers: 1 name:NVIDIA-G0
Try this in terminal and then check if both monitors are usable
xrandr --setprovideroutputsource 0 1
This is the output:
╰─λ xrandr --setprovideroutputsource 0 1
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 35 (RRSetProviderOutputSource)
Value in failed request: 0x1f7
Serial number of failed request: 16
Current serial number in output stream: 17
xrandr --setprovideroutputsource 0x1f7 0x54
There was no output, so I guess it did work without problems. Put the monitor to the left and still get half a black screen on the laptop.
Maybe the monitor EDID is not proper, or the nvidia pccid needed.
Post the last part of xorg log, so we see the new messages.
And
xrandr --listmonitors
Here it is!
https://bin.garudalinux.org/?036188c32c808e4b#HpuHiznGhSchtWRNzEZMYaaj5YNvuxgYuxo2M5ELVUww
╰─λ xrandr --listmonitors
Monitors: 1
0: +*eDP 1920/382x1080/215+0+0 eDP
Is there any conf file in /etc/X11/xorg.conf.d/ ?
If there is one (not keyboard), post contents.
If not you should try create one custom, not from nvidia settings.
I still think this
From research, it seems that Reverse-Prime does not work yet on amdgpu/nvidia, so this might be the problem here.
A couple of articles on nvidia support discuss about it.
I wonder if your HW can have a setting for nvidia-only, if it suites your needs.
You could try if a xorg.conf file with minimum contents for gpus, trying setting nvidia as PrimaryGPU or/and other settings.
As it seems the day is over, we may continue tomorrow...
Give me a couple of mins to make one (out of Archwiki...)
There's nothing in that folder, except for keyboard. How do I build the custom xorg.conf? I mean, what should it have as content?
Try this to see if it solves something.
Save as filename.conf
in xorg.conf.d/
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "AMD"
Inactive "nvidia"
Option "AllowNVIDIAGPUScreens"
EndSection
Section "Device"
Identifier "AMD"
Driver "amdgpu"
# Driver "modesetting" # alternative
BusID "PCI:05:0:0"
Option "DRI" "3"
Option "TearFree" "true"
EndSection
Section "Screen"
Identifier "AMD"
Device "AMD"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration"
BusID "PCI:01:0:0"
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
Option "DPI" "96 x 96"
EndSection
Section "ServerFlags"
Option "IgnoreABI" "1"
EndSection
This one (use another filename.conf
, rename the other one adding.disabled
extension) makes Nvidia as Primary, possibly external monitor will work, but maybe with more power consumption.
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "AMD"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:01:0:0"
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
Option "DPI" "96 x 96"
EndSection
Section "Device"
Identifier "AMD"
Driver "amdgpu"
BusID "PCI:05:0:0"
Option "DRI" "3"
Option "TearFree" "true"
EndSection
Section "Screen"
Identifier "AMD"
Device "amdgpu"
EndSection
That's awesome! The second file did the trick! Not only that, but I did a fresh install one last time and just put that second file and it works. Thanks a lot!
You are lucky, considering others that this didn't work.
Save this file, in case it's lost by mistake. If you (re)install using mhwd, you should confirm there is no other file conflicting, or just merge if you change something.
You should be aware that this makes nvidia the "primary" gpu and this may affect battery life, although lately nvidia is improved a little bit on that.
Just keep an eye.