vinegarhq / vinegar

An open-source, minimal, configurable, fast bootstrapper for running Roblox on Linux.
https://vinegarhq.org
GNU General Public License v3.0
375 stars 34 forks source link

Commit d6091d7 breaks automatic prime detection #379

Closed karimrir1 closed 4 months ago

karimrir1 commented 4 months ago

Describe the bug

A clear and concise description of what the bug is.

Commit d6091d75522c9c769a2bf6ac1af32d22528ca1f2 (use PCI device for prime) breaks automatic Prime detection for iGPU and dGPU systems

To Reproduce

Steps to reproduce the behavior.

Use any Vinegar version after that commit on an Optimus system

Logs

Reference log file contents, which are usually located in ~/.cache/vinegar/logs or ~/.var/app/org.vinegarhq.Vinegar/cache/vinegar/logs/ for Flatpak, of a run reproducing the bug Roblox log output with HEAD (v1.7.3) 2024-02-20T19:17:33.948Z,2.948689,0024,6 [FLog::Graphics] Vulkan Device: Intel(R) UHD Graphics 630 (CFL GT2) 2024-02-20T19:17:33.948Z,2.948689,0024,6 [FLog::Graphics] Vulkan Device: Vendor 8086 Device 3e9b 2024-02-20T19:17:33.948Z,2.948689,0024,6 [FLog::Graphics] Vulkan Device: Driver 23.0.2 (9 6468994)

Roblox log output with ad15f4b7d64880d557b5f4bd40e9f2d23640c087 (before d6091d7)

X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 155 (NV-GLX) Minor opcode of failed request: 6 () Value in failed request: 0x0 Serial number of failed request: 98 Current serial number in output stream: 98

For some reason Roblox does not work with ad15f4b7d64880d557b5f4bd40e9f2d23640c087 but the NV-GLX string indicates that the NVIDIA GPU is being currently used.

System information

vinegar sysinfo with HEAD

Additional context

Add any other context about the problem here

Config file (unchanged between version changes) wineroot = "/home/karim/lutris-GE-Proton8-13-x86_64 sanitize_env = true [player]

channel = "zintegration"

dxvk = false renderer = "Vulkan"

gpu = "prime-discrete"

[player.env] WINEDEBUG= "+wgl" DXVK_HUD = "1" WINEFSYNC = "1"

jrelvas-ipc commented 4 months ago

This left me kinda confused because I'm not running into any out of the ordinary issue with my hybrid graphics laptop...

However, I have a feeling that changes to the gpu detection code over time may have broken the default device assumption. Could you set DRI_PRIME to 1 in your env manually and see if the issue still occurs?

karimrir1 commented 4 months ago

It fixes the issue, also doing gpu = "" fixes it, What I mean is that the the gpu option is set to prime-discrete by default, Which should mean that the NVIDIA GPU gets used by default. but ever since that commit which changed the NVIDIA detection code you have to set DRI_PRIME manually, which could throw off users if they don't know about the environment variable

jrelvas-ipc commented 4 months ago

@apprehensions I have a feeling the DRI_PRIME string is being formatted wrong, so it falls back to the default device (igpu)

jrelvas-ipc commented 4 months ago

imagem

Also tested on a spare machine, just for good measure. Still no signs of any issue.

jrelvas-ipc commented 4 months ago

I'm assuming this has been closed because the issue no longer occurs? Please confirm.

Message ID: @.***>

karimrir1 commented 4 months ago

On February 26, 2024 4:15:11 PM GMT+03:00, Jrelvas @.***> wrote:

I'm assuming this has been closed because the issue no longer occurs? Please confirm.

Message ID: @.***>

Yep, turns out it was a wine issue.