Issues multitasking while playing Borderlands 3 on Steam

Hello I've been trying to find an answer to this problem the last couple days and haven't turned up anything helpful.

I'm trying to play Borderlands 3 and I got that working just fine but any time I tab out to check on Discord to use my web browser (or anything else for that matter) my windows lag, my mouse pointer skips, and my audio stutters.

I'm not sure if its related to XOrg, nvidia, Plasma, or what. I'm using 440.82 nvidia driver and 5.6.3-2 kernel.
So far changing the compositor settings and Proton version has had no effect, I'm at a complete loss at this point

That could be, because your pc is under full load and/or compositing is deactivated.
You can turn it on even while gaming in the settings under compositor Allow applications to block compositing.
Another reason for a skipping mouse pointer could be a really high polling rate.

I've tried every combination of settings in the compositer and nothing has made any difference, native Linux games and other steam-play/Proton games don't seem to have this issue either.

Well then let's give the people something to look at shall we.
Could you post your inxi -Fxxxza and nvidia-smi and htop while it occurs?
Please encase the terminal outputs in ``` in a seperate line.

And now a hearty welcome to the forum for you.

Thank you for the welcome!
Here is the output

Thu Apr 16 12:05:57 2020       
| NVIDIA-SMI 440.82       Driver Version: 440.82       CUDA Version: 10.2     |
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|   0  GeForce GTX 1080    Off  | 00000000:0B:00.0  On |                  N/A |
| 53%   70C    P0   205W / 250W |   3762MiB /  8105MiB |     99%      Default |
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|    0      1457      G   /usr/lib/Xorg                                341MiB |
|    0      1955      G   /usr/bin/kwin_x11                             79MiB |
|    0      1964      G   /usr/bin/plasmashell                         108MiB |
|    0      2512      G   ...te/.local/share/Steam/ubuntu12_32/steam    36MiB |
|    0      2523      G   ./steamwebhelper                               2MiB |
|    0      2539      G   ...ent --lang=en_US.UTF-8 --gpu-preference  1041MiB |
|    0      8647      G   /usr/lib/firefox/firefox                       1MiB |
|    0      8714      G   /usr/lib/firefox/firefox                       1MiB |
|    0     10437    C+G   ...OakGame\Binaries\Win64\Borderlands3.exe  2138MiB |
System:    Host: redbyte-manjaro Kernel: 5.6.3-2-MANJARO x86_64 bits: 64 compiler: gcc 
           v: 9.3.0 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.6-x86_64 
           root=UUID=98826957-a94d-48cd-9930-a5945f61c2f8 rw quiet apparmor=1 
           security=apparmor resume=UUID=d60d8f18-dbc6-4394-b011-d9cc228aaab8 
           Desktop: KDE Plasma 5.18.4 tk: Qt 5.14.2 wm: kwin_x11 dm: SDDM 
           Distro: Manjaro Linux 
Machine:   Type: Desktop Mobo: ASUSTeK model: ROG CROSSHAIR VIII HERO (WI-FI) v: Rev X.0x 
           serial: <filter> UEFI: American Megatrends v: 1302 date: 01/20/2020 
CPU:       Topology: 16-Core (2-Die) model: AMD Ryzen 9 3950X bits: 64 type: MT MCP MCM 
           arch: Zen family: 17 (23) model-id: 71 (113) stepping: N/A microcode: 8701013 
           L2 cache: 8192 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm 
           bogomips: 223652 
           Speed: 4238 MHz min/max: 2200/3500 MHz boost: enabled Core speeds (MHz): 1: 4235 
           2: 3937 3: 2196 4: 2195 5: 2130 6: 4167 7: 2122 8: 2121 9: 4280 10: 3628 11: 4282 
           12: 2135 13: 4268 14: 2196 15: 2195 16: 2194 17: 2195 18: 2194 19: 2196 20: 2195 
           21: 2195 22: 2132 23: 4118 24: 2140 25: 2100 26: 2122 27: 2200 28: 2196 29: 2196 
           30: 2196 31: 2196 32: 2195 
           Vulnerabilities: Type: itlb_multihit status: Not affected 
           Type: l1tf status: Not affected 
           Type: mds status: Not affected 
           Type: meltdown status: Not affected 
           Type: spec_store_bypass 
           mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 
           mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 
           mitigation: Full AMD retpoline, IBPB: conditional, STIBP: conditional, RSB filling 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: NVIDIA GP104 [GeForce GTX 1080] vendor: Gigabyte driver: nvidia 
           v: 440.82 bus ID: 0b:00.0 chip ID: 10de:1b80 
           Display: x11 server: X.Org 1.20.8 driver: nvidia compositor: kwin_x11 tty: N/A 
           OpenGL: renderer: GeForce GTX 1080/PCIe/SSE2 v: 4.6.0 NVIDIA 440.82 
           direct render: Yes 
Audio:     Device-1: NVIDIA GP104 High Definition Audio vendor: Gigabyte 
           driver: snd_hda_intel v: kernel bus ID: 0b:00.1 chip ID: 10de:10f0 
           Device-2: AMD Starship/Matisse HD Audio vendor: ASUSTeK driver: snd_hda_intel 
           v: kernel bus ID: 0d:00.4 chip ID: 1022:1487 
           Device-3: Logitech HD Pro Webcam C920 type: USB driver: snd-usb-audio,uvcvideo 
           bus ID: 5-2.4:7 chip ID: 046d:082d serial: <filter> 
           Device-4: Focusrite-Novation type: USB driver: snd-usb-audio bus ID: 5-2.1:4 
           chip ID: 1235:8205 
           Sound Server: ALSA v: k5.6.3-2-MANJARO 
Network:   Device-1: Realtek RTL8125 2.5GbE vendor: ASUSTeK driver: r8169 v: kernel 
           port: e000 bus ID: 04:00.0 chip ID: 10ec:8125 
           IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           Device-2: Intel I211 Gigabit Network vendor: ASUSTeK driver: igb v: 5.6.0-k 
           port: d000 bus ID: 06:00.0 chip ID: 8086:1539 
           IF: enp6s0 state: down mac: <filter> 
           Device-3: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel port: d000 bus ID: 07:00.0 
           chip ID: 8086:2723 
           IF: wlp7s0 state: down mac: <filter> 
Drives:    Local Storage: total: 8.19 TiB used: 336.49 GiB (4.0%) 
           ID-1: /dev/nvme0n1 vendor: Corsair model: Force MP600 size: 931.51 GiB block size: 
           physical: 512 B logical: 512 B speed: 63.2 Gb/s lanes: 4 serial: <filter> 
           rev: EGFM11.1 scheme: GPT 
           ID-2: /dev/sda vendor: Samsung model: SSD 860 EVO 1TB size: 931.51 GiB block size: 
           physical: 512 B logical: 512 B speed: 6.0 Gb/s serial: <filter> rev: 2B6Q 
           scheme: GPT 
           ID-3: /dev/sdb vendor: Toshiba model: DT01ACA300 size: 2.73 TiB block size: 
           physical: 4096 B logical: 512 B speed: 6.0 Gb/s rotation: 7200 rpm 
           serial: <filter> rev: ABB0 scheme: GPT 
           ID-4: /dev/sdc vendor: Seagate model: ST3000DM008-2DM166 size: 2.73 TiB 
           block size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s rotation: 7200 rpm 
           serial: <filter> rev: CC26 scheme: GPT 
           ID-5: /dev/sdd vendor: Seagate model: ST1000DM003-1SB10C size: 931.51 GiB 
           block size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s rotation: 7200 rpm 
           serial: <filter> rev: CC43 scheme: MBR 
Partition: ID-1: / raw size: 899.77 GiB size: 884.65 GiB (98.32%) used: 145.15 GiB (16.4%) 
           fs: ext4 dev: /dev/sda2 
           ID-2: swap-1 size: 31.25 GiB used: 0 KiB (0.0%) fs: swap swappiness: 60 (default) 
           cache pressure: 100 (default) dev: /dev/sda3 
Sensors:   System Temperatures: cpu: 63.2 C mobo: N/A gpu: nvidia temp: 70 C 
           Fan Speeds (RPM): N/A gpu: nvidia fan: 53% 
Info:      Processes: 507 Uptime: 1h 54m Memory: 62.79 GiB used: 6.94 GiB (11.1%) 
           Init: systemd v: 244 Compilers: gcc: 9.3.0 Shell: bash v: 5.0.16 
           running in: konsole inxi: 3.0.37

And here's htop recorded in asciiema for clarity

Yeah gc is under full load. Your best bet to mitigate all the issues would probably be to reduce the details to a level where you could limit the fps and disallow the blocking of the compositing.

The odd thing to me about it is that the game runs 60-90fps depending on the area in my current settings.. Is the game being prioritized over the system UI?

Yes or to be more exact the system tries to run the game as fast as possible, unless you limit it.
It's different from windows in that regard, that just makes a somewhat best effort, but only with the resources it has left over after videos etc.

Is there perhaps a way to de-prioritize an application when its unfocused? Limiting it to 30fps does fix the issue but 60fps doesn't. I tried changing the Nice value but that didn't appear to make a difference unless I picked the wrong process

The nice value only applies to the cpu/i.o sadly, i.e. resources of which you have plenty.

Ah, That makes sense then.

...makes a compositor related issue rather unlikely, which wouldn't explain audio stuttering either. Did you try this custom proton version:

Yes I am using Proton-5.6-GE-1

Is there a difference between fullscreen and fullscreen-windowed?

There is not

Play Borderlands 2 then. : ) just kiddin'
I'm out of ideas.

Forum kindly sponsored by