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

Fix the X11 error when trying to run the template on Linux #14

Merged
merged 4 commits into from
Nov 6, 2024

Conversation

Ljiong201108
Copy link

@Ljiong201108 Ljiong201108 commented Nov 4, 2024

Resolves #8

In order to keep the original behavior as much as possible, I introduce a CMake option that enables selection of the high-performance GPU. This will enable the marco in Render to set up the option correctly. I’ve also added a brief tip in the README for guidance. Feel free to make any adjustments as needed!

@Ceyron Ceyron requested a review from wi-re November 5, 2024 07:16
@wi-re
Copy link
Collaborator

wi-re commented Nov 5, 2024

Hey Lijong,

good catch on that setup issue, this should not cause issues in general, however, I'd like to first test this on a few systems to make sure it doesn't cause unexpected behavior on other setups with multiple GPUs like this. Could you @Ljiong201108 try running it with this variant but with the display plugged into your onboard GPU? The code should still work in that case.

The tip in the readme will most likely need to get moved to another file where we hope to collect more tips and tricks on setting this up on different systems.

@Ljiong201108
Copy link
Author

Ljiong201108 commented Nov 5, 2024

Yes, here are the experiment results of the 4 combinations:

  1. display plugged on onboard GPU + without WGPUPowerPreference_HighPerformance option:

Screenshot_20241105_180409

It works with a low FPS.

  1. display plugged on onboard GPU + with WGPUPowerPreference_HighPerformance option:

Screenshot_20241105_180512

It works with a higher FPS. I think in this case, webGPU still distribute the rendering target on the discrete GPU, but it's finally displayed using the onboard one.

  1. display plugged on discrete GPU + without WGPUPowerPreference_HighPerformance option:

As mentioned in #8, it reports an error.

  1. display plugged on discrete GPU + with WGPUPowerPreference_HighPerformance option:

Screenshot_20241105_180939

It works with the highest FPS.

As a summary, enabling the WGPUPowerPreference_HighPerformance option is always able to work.

@wi-re
Copy link
Collaborator

wi-re commented Nov 5, 2024

Looks good to me, thanks for checking these things.

Before merging the PR (which we will most likely do tomorrow after the exercise 0 deadline finally lapses), could you make 2 changes:

There is a typo in the CmakeLists file:

option(USE_HIGH_PERFORMANCE_GPU "Use high performance gpu by default, mostly the dircrete gpu" ON) 

should read discrete and not dircrete. Also with some modified wording I'd recommend:

option(USE_HIGH_PERFORMANCE_GPU "Use high performance GPU, most likely a discrete GPU, should be left ON except for trouble shooting purposes." ON)

Can you also remove the changes to the README.md file? We will collect more information regarding setups and related issues in #15, where you could also add this as a comment.

Thank you again for all the trouble shooting!

Copy link
Collaborator

@wi-re wi-re left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you again, we will be merging this soon.

@wi-re wi-re merged commit 245163b into tum-pbs:main Nov 6, 2024
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.

Error when trying to run the template on Linux
2 participants