gamescope icon indicating copy to clipboard operation
gamescope copied to clipboard

gamescope cursor in not render correctly

Open l12436 opened this issue 1 year ago • 16 comments

If you run "gamescope chromium-browser" and let cursor change to other type like click URL the cursor is not render correctly

image

l12436 avatar Jan 14 '24 14:01 l12436

I have the same issue in many games. Anything with animated cursors and half the cursor is missing, but they don't always need to be animated to cause the issue. Sims 3 is a game that reliably reproduces it for me, Titan Quest Anniversary Edition also has the issue but it is less noticeable as their cursors seem to be offset so only have a small part cut off.

NolanSyKinsley avatar Jan 25 '24 16:01 NolanSyKinsley

Magic The Gathering Arena is another game which exhibits this behavior. It is a free-to-play game, so it may serve as a useful test case.

AlexFolland avatar Feb 14 '24 04:02 AlexFolland

OS: Arch Linux Display Server: X11 Desktop: BSPWM GPU Driver: nvidia 550.78 Gamescope: 3.14.12.r0.gfb5e86b-1 (latest master branch commit) Mode: nested

I have this issue in every application with a cursor. Applications with the cursor as a primary interaction method are not pleasant to use—and borderline unusable—through gamescope with up to half the cursor glyph missing.

A couple examples:

Helldivers 2 gamescope-helldivers2-cursor gamescope-helldivers2-cursor2

Guildwars 2 gamescope-guildwars2-cursor1 gamescope-guildwars2-cursor2

Neurognostic avatar May 04 '24 17:05 Neurognostic

OS: Fedora 41 Display Server: X11 Desktop: Gnome GPU Driver: nvidia 550.78 Gamescope: 3.14.12 Mode: Fullscreen

Same issue over here

nodgear avatar May 12 '24 11:05 nodgear

This only affects NVIDIA proprietary and not AMD or NVK. I don't see anything obvious, so probably some driver bug there?

misyltoad avatar May 12 '24 20:05 misyltoad

This only affects gamescope and not when running the same games outside gamescope. What's the difference in how the cursor image is displayed in those cases? Discovering that may lead to a solution.

By the way, I tested Magic The Gathering Arena on my Steam Deck in gaming mode, just to confirm this doesn't happen with that AMD GPU (if that's the only difference that matters). I confirmed it, as the cursor image was not cropped there.

AlexFolland avatar May 12 '24 21:05 AlexFolland

It's just a small linear image sampled normally.

misyltoad avatar May 12 '24 22:05 misyltoad

@esullivan-nvidia Is this something Nvidia can look into in the proprietary driver? It sounds like the fix may be relatively simple if identified. Also, sorry if pinging you is incorrect. You were the first Nvidia employee I could find with contributions here.

AlexFolland avatar May 13 '24 02:05 AlexFolland

I think its related to this (also addressed here) - the Nvidia driver can't render to linear, so I guess this is causing the cursor image to get corrupted. Maybe vulkan_create_texture_from_bits() could detect that and convert it on the CPU instead ?

I've also noticed that the cursor always causes composition (never uses the hardware plane), could be related.

brain-anti-freeze avatar May 13 '24 06:05 brain-anti-freeze

We don't render to linear, we upload as-linear.

I've also noticed that the cursor always causes composition (never uses the hardware plane), could be related.

We never use the cursor plane

misyltoad avatar May 13 '24 08:05 misyltoad

@esullivan-nvidia Is this something Nvidia can look into in the proprietary driver? It sounds like the fix may be relatively simple if identified. Also, sorry if pinging you is incorrect. You were the first Nvidia employee I could find with contributions here.

Yes, I have created NVIDIA bug 4646690 for investigating this issue. Thank you for the ping. I will provide an update here when I have more information.

esullivan-nvidia avatar May 13 '24 16:05 esullivan-nvidia

@esullivan-nvidia Is this something Nvidia can look into in the proprietary driver? It sounds like the fix may be relatively simple if identified. Also, sorry if pinging you is incorrect. You were the first Nvidia employee I could find with contributions here.

Yes, I have created NVIDIA bug 4646690 for investigating this issue. Thank you for the ping. I will provide an update here when I have more information.

Hi! Do you have any update on this bug report? Could you link it to follow its progress please?

Rodancoci avatar Jun 30 '24 21:06 Rodancoci

Sorry for the delay. We have root caused the issue in the driver and are still working on a fix. I will let you know when a driver is available for you to test.

esullivan-nvidia avatar Jul 16 '24 22:07 esullivan-nvidia

This only affects NVIDIA proprietary and not AMD or NVK. I don't see anything obvious, so probably some driver bug there?

nvidia-open is also affected from my testing.

Martmists-GH avatar Sep 01 '24 11:09 Martmists-GH

Sorry for the delay. We have root caused the issue in the driver and are still working on a fix. I will let you know when a driver is available for you to test.

Any update on this? Still got the issue on driver 560.35.03 in Dota

MisterrrX avatar Sep 03 '24 15:09 MisterrrX

I have an additional data point about this issue, in case it matters. I have a new AMD GPU in my exact same PC with the same OS setup (so, specifically not a separate device like a Steam Deck, but just a change of GPU from Nvidia GTX 1080 Ti to AMD Radeon 7900 XT), and have confirmed that the issue is not reproducible with that AMD GPU.

AlexFolland avatar Sep 03 '24 15:09 AlexFolland

still affected with gamescope and nvidia-open-dkms Driver Version: 560.35.03

z3r0d0n3 avatar Oct 16 '24 13:10 z3r0d0n3

Hi @esullivan-nvidia how is the fix going? Will it be provided in the next series of driver updates? (565 i assume)

fxzzi avatar Oct 20 '24 11:10 fxzzi

Hi @esullivan-nvidia how is the fix going? Will it be provided in the next series of driver updates? (565 i assume)

Yes, 565 will contain a fix for this issue.

esullivan-nvidia avatar Oct 22 '24 05:10 esullivan-nvidia

https://www.nvidia.com/en-us/drivers/details/233008/

Fixed a bug that caused the cursor image to be truncated on Gamescope: https://github.com/ValveSoftware/gamescope/issues/1099

notpentadactyl avatar Oct 22 '24 13:10 notpentadactyl

I had a similar case of the half cursor being rendered when I used gamescope and solved it by setting:

~/.Xdefaults:

Xcursor.size: 24

sfjuocekr avatar Oct 31 '24 19:10 sfjuocekr