Skip to content

Conversation

@symbiogenesis
Copy link
Contributor

@symbiogenesis symbiogenesis commented Oct 16, 2024

seems logical to determine this dynamically, just as the wayland state is

tested that it adds the appropriate flags and features from the case statement below on my machine in chrome://version

@symbiogenesis symbiogenesis changed the title dynamically set GPU variable in chromium.conf feat: dynamically set GPU variable in chromium.conf Oct 16, 2024
@symbiogenesis
Copy link
Contributor Author

Maybe some of the changes in this file like the dynamic wayland detection could be upstreamed?

https://src.fedoraproject.org/rpms/chromium/blob/rawhide/f/chromium.conf

@RoyalOughtness
Copy link
Contributor

I like this in principle but this would mean taking a hard dependency on egl-utils, which I'm opposed to. Is there a way we can accomplish this without introducing a new package dependency?

@RoyalOughtness
Copy link
Contributor

also, this will have issues on multigpu systems, where we will need to know which gpu chromium is actually going to run on

@RKNF404
Copy link
Collaborator

RKNF404 commented Oct 16, 2024

It's a good change but sigificantly too early. The AMD config is still early since Chromium vulkan support is still in development, and the Nvidia config is also indifferent since the Nvidia VAAPI flag is experimental (last I checked it does nothing). And as @qoijjj mentioned, idk how this would fly on multi-gpu setups.

@RKNF404
Copy link
Collaborator

RKNF404 commented Oct 16, 2024

@symbiogenesis
Copy link
Contributor Author

symbiogenesis commented Oct 16, 2024

May be able to update this using lspci and then fallback to default on heterogeneous multi-GPU setups.

i.e.

GPU_INFO=$(lspci | grep -E "VGA|3D" | grep -o -i -E "amd|intel|nvidia" | sort -u | tr '[:upper:]' '[:lower:]' | xargs)
if [ $(echo "$GPU_INFO" | wc -w) -gt 1 ]; then
    GRAPHIC_DRIVER="default"
else
    GRAPHIC_DRIVER=${GPU_INFO:-default}
fi

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

Successfully merging this pull request may close these issues.

3 participants