Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gamescope cursor in not render correctly #1099

Closed
l12436 opened this issue Jan 14, 2024 · 21 comments
Closed

gamescope cursor in not render correctly #1099

l12436 opened this issue Jan 14, 2024 · 21 comments

Comments

@l12436
Copy link

l12436 commented Jan 14, 2024

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

image

@NolanSyKinsley
Copy link

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
Copy link

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
Copy link

Neurognostic commented May 4, 2024

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
Copy link

nodgear commented May 12, 2024

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

Same issue over here

@misyltoad
Copy link
Collaborator

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

@AlexFolland
Copy link

AlexFolland commented May 12, 2024

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.

@misyltoad
Copy link
Collaborator

It's just a small linear image sampled normally.

@AlexFolland
Copy link

@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
Copy link

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.

@misyltoad
Copy link
Collaborator

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
Copy link

@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
Copy link

@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
Copy link

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.

@Martmists-GH
Copy link

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.

@MisterrrX
Copy link

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

@AlexFolland
Copy link

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.

@z3r0d0n3
Copy link

z3r0d0n3 commented Oct 16, 2024

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

@Fxzzi
Copy link

Fxzzi commented Oct 20, 2024

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

@esullivan-nvidia
Copy link

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.

@notpentadactyl
Copy link

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

Fixed a bug that caused the cursor image to be truncated on Gamescope: #1099

@sfjuocekr
Copy link

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

~/.Xdefaults:

Xcursor.size: 24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests