You are not logged in.

#1 2022-03-15 22:22:55

Xiaoming94
Member
Registered: 2014-10-13
Posts: 3

External Primary Monitor makes application less responsive

Laptop Model: MSI Delta 15 A5EFK

Connecting and using an external monitor works fine. However if I set it to my primary monitor some applications becomes very choppy and borderline unusable.
This includes most of the Desktop Elements in KDE Plasma and Steam - Including the games.

I can recreate this in i3 and KDE Plasma on X11, I haven't tried wayland yet though.

CPU: AMD Ryzen 7 5800H with (with on board Radeon graphics)
dedicated GPU: AMD Radeon RX6700M

Has anyone ran into, or perhaps knows about a workaround for this issue?

I wish I could provide some logs, but I am, admittedly, a bit rusty in this department. Should I provide DMesg or X.org.log for instance?

Offline

#2 2022-03-25 15:24:38

GTRONICK
Member
Registered: 2016-07-17
Posts: 25

Re: External Primary Monitor makes application less responsive

I'm having a similar issue with Asus ROG Strix Advantage Edition:
CPU: AMD Ryzen 9 5980H (with on board Radeon graphics)
Dedicated GPU: AMD Radeon RX6800M
Monitor specs: 3440x1440px 165Hz, USB-C Connection.
Desktop: KDE Plasma Desktop 5.24.3 on X11

My monitor is connected to USB-C, and when I select it to be my primary screen, the desktop and applications become so laggy, taking like 10 seconds delay per action. So I applied the following config:

cat /etc/X11/xorg.conf.d/20-radeon.conf

Section "OutputClass"
        Identifier "AMD"
        MatchDriver "amdgpu"
        Driver "amdgpu"
        Option "PrimaryGPU" "yes"
EndSection

This config file gets rid of the lag in the external monitor when it is selected as primary, but then the laptop screen becomes laggy when you select "Expand to left" or "Expand to right" options. Also sometimes, the FPS's decrease a lot on external monitor in games but  I'm still trying to replicate the error.  I can see some screen flickering in after closing the games.

I have also noticed that the monitor is only recognized when I boot the PC with it connected. If I boot the PC and then connect the monitor to the USB-C port, it does not give any picture, and doesn't detect any signal form USB-C.

Also the 165Hz refresh rate is not recognized for the maximum resolution (3440x1440), it is recognized in Windows tough. In ArchLinux it only reaches 144Hz:

xrandr -d :0
Screen 0: minimum 320 x 200, current 3440 x 1440, maximum 16384 x 16384
DisplayPort-0 connected primary 3440x1440+0+0 (normal left inverted right x axis y axis) 797mm x 334mm
   3440x1440     99.98 + 144.00*  120.00    59.97  
   2560x1440     59.95  
   2580x1080    164.69    59.94  
   1920x1080    120.00   119.88    60.00    60.00    50.00    59.94  
   1680x1050     59.95  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    70.07    60.00  
   800x600       72.19    75.00    60.32    56.25  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    72.81    66.67    60.00    59.94  
   720x400       70.08  
eDP-1-0 connected (normal left inverted right x axis y axis)
   2560x1440    165.00 +  60.00 +
   1920x1200    165.00  
   1920x1080    165.00  
   1600x1200    165.00  
   1680x1050    165.00  
   1280x1024    165.00  
   1440x900     165.00  
   1280x800     165.00  
   1280x720     165.00  
   1024x768     165.00  
   800x600      165.00  
   640x480      165.00  
HDMI-A-1-0 disconnected (normal left inverted right x axis y axis)
xrandr --listproviders

Providers: number : 2
Provider 0: id: 0x55 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 6 outputs: 1 associated providers: 1 name:AMD Radeon RX 6800M @ pci:0000:03:00.0
Provider 1: id: 0x7a cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 2 associated providers: 1 name:Unknown AMD Radeon GPU @ pci:0000:08:00.0
glxinfo | grep "OpenGL renderer"

OpenGL renderer string: AMD Radeon RX 6800M (NAVY_FLOUNDER, DRM 3.44.0, 5.16.16-arch1-1, LLVM 13.0.1)

I have installed the following packages:

mesa 21.3.7-2
lib32-mesa 21.3.7-2
xorg-server 21.1.3-6
xf86-video-amdgpu 22.0.0-1
vulkan-radeon 21.3.7-2
lib32-vulkan-radeon 21.3.7-2
lib32-mesa-vdpau 21.3.7-2
linux 5.16.16.arch1-1
linux-firmware 20220309.cd01f85-1

Any help is appreciated smile

UPDATE 1: I realized that the monitor must be turned on before booting Arch, so It gets always recognized and shows image on login screen.
UPDATE 2: Using the following configuration for Xorg, you can use both the Laptop monitor and external monitor without issues, but PRIME (External GPU) seems not to work even specifying DRI_PRIME=1 for steam for example

cat /etc/X11/xorg.conf.d/10-optimus-manager.conf

Section "Device"
       Identifier "integrated"
       Driver "modesetting"
       BusID "PCI:8:0:0"
       Option "DRI" "3"
#EndSection

As you can see by the name, the file was created by optimus manager when switched to internal graphics only. To determine the PCI bus ID I used:

lspci | grep -ie display -ie vga

03:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT / 6800M] (rev c3)
08:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne (rev c7)

UPDATE 3 (Hybrid Graphics): So after playing around with multiple solutions, I have finally managed to use Internal/External/Both monitors without issues and able to use the dedicated graphic card for games (Steam), this will however impact in performance:

1. Switch to "Extend to left" or "Laptop screen" before the procedure
2. Create the file:

/etc/X11/xorg.conf.d/10-optimus-manager.conf

with the content:

Section "Device"
       Identifier "integrated"
       Driver "modesetting"
       BusID "PCI:8:0:0"
       Option "DRI" "3"
#EndSection

Remember to verify the BusID with

lspci

3. Logout and login again
4. Then I ran the following command:

xrandr --setprovideroffloadsink 1 0

5. Reboot
6. After reboot switch to External monitor

All should be working fine now, but youll see FPS drops on demanding games like Rocket League at FULL graphics.

Steam:
To make steam work with the dedicated GPU (AMD Radeon RX6800M in this case):

From the terminal run:

DRI_PRIME=1 steam

To make it permanent for steam, I created a new entry in the applications launcher and added the respective code:

L9gRb4S.png
a2LlZQ4.png

Im still looking for making the system work without issues with just the external graphics card.

UPDATE 4 (Dedicated GPU only SOLUTION!):
Finally, after a lot of trial and error, I have found the perfect match.

Just create a config file in

/etc/X11/xorg.conf.d/20-dgpu.conf

as follows:

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "amdgpu"
    Inactive "modesetting"
EndSection

Section "Device"
    Identifier  "amdgpu"
    Driver      "modesetting"
    BusID       "PCI:3:0:0" # Sample: "PCI:1:0:0"
    Option      "DRI" "3"
    Option      "PrimaryGPU" "yes"
EndSection

Section "Screen"
    Identifier "amdgpu"
    Device "amdgpu"
EndSection

Section "Device"
    Identifier  "modesetting"
    Driver      "modesetting"
    BusID       "PCI:8:0:0"  # Sample: "PCI:0:2:0"
EndSection

Section "Screen"
    Identifier "modesetting"
    Device "modesetting"
EndSection

The code above can be reduced, but I left it complete as reference. As you can see, I have replaced the amdgpu driver, for the modesetting driver in the amdgpu section, that was the thing that did the trick for me!. Hope this helps someone else. Best regards!

Last edited by GTRONICK (2022-04-08 20:05:05)

Offline

#3 2022-05-25 16:56:30

awes
Member
Registered: 2015-03-13
Posts: 20

Re: External Primary Monitor makes application less responsive

I had the same issue with lagging applications (only some!) on external display. I've used only 10-optimus-manager.conf, since I'm not playing games under Linux.
Thanks GTRONICK for the solution!

Offline

Board footer

Powered by FluxBB