ValveSoftware / gamescope

SteamOS session compositing window manager
Other
2.87k stars 190 forks source link

gamescope cursor in not render correctly #1099

Open l12436 opened 6 months ago

l12436 commented 6 months ago

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

image

NolanSyKinsley commented 5 months ago

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.

AlexFolland commented 5 months ago

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.

Neurognostic commented 2 months ago

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

nodgear commented 2 months ago

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

Same issue over here

Joshua-Ashton commented 2 months ago

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

AlexFolland commented 2 months ago

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.

Joshua-Ashton commented 2 months ago

It's just a small linear image sampled normally.

AlexFolland commented 2 months ago

@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.

brain-anti-freeze commented 2 months ago

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.

Joshua-Ashton commented 2 months ago

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

esullivan-nvidia commented 2 months ago

@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.

Rodancoci commented 3 weeks ago

@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?

esullivan-nvidia commented 5 days ago

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.