You are not logged in.
This only happened as of installing NVidia Graphic Drivers for my ASUS laptop, to make use of Hybrid graphics for better performance while playing, the issue is, that it is VERY slow when navigating through my desktop (Hyprland). And as far as I know, there is no way to use only discrete graphics, there is no switch in my BIOS that allows me to do so, and Hyprland explicitly refrains the use of optimus-manager, a tool I used previously to control this behavior, so whenever I'm running on my battery, I tend to use Integrated Graphics and get better performance in my desktop.
The issue is that any game that uses OpenGL, as in the case for Terraria or Minecraft, it refrains from starting, Minecraft actually printed the following issue "GLFW error 65543: GLX: Failed to create context: GLXBadFBConfig", after digging around, I found out that I had to use a environment variable to force my OpenGL version to be 4.3, this however, did not work in the slightest, so whenever I want to play games, I have to switch to Hybrid and plug my AC cable.
How would I be able to fix this? Thanks for your support, I'm still trying to dig deeper into this, I'll try to keep you guys updated.
Last edited by ItsFireStorm (2024-10-26 10:16:27)
Offline
glxinfo -B
prime-run glxinfo -B
https://wiki.hyprland.org/Configuring/Multi-GPU/
Afaik OM only writes xorg configs (and, as a matter of fact, a stale one might get in the way when trying to run opengl on xwayland)
Offline
When running the command glxinfo -B on Integrated Graphics I get this.
> glxinfo -B
name of display: :1
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 150 (GLX)
Minor opcode of failed request: 24 (X_GLXCreateNewContext)
Value in failed request: 0x0
Serial number of failed request: 62
Current serial number in output stream: 63
prime-run also returns this, but it may as well be because the dGPU is disabled while in this state.
Afaik OM only writes xorg configs (and, as a matter of fact, a stale one might get in the way when trying to run opengl on xwayland)
How would I be able to check if this is the case?
Offline
Issue was solved by removing these lines in my hyprland.conf
env = LIBVA_DRIVER_NAME,nvidia
env = XDG_SESSION_TYPE,wayland
env = GBM_BACKEND,nvidia-drm
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
Yet, the current issue now is that its using the Intel Graphics on Hybrid Mode, so the issue is still not entirely solved.
Offline
You can and probably should retain XDG_SESSION_TYPE but don't set the others globally.
Install nvidia-prime, go to programs that actually require the nvidia GPU do "prime-run $applicationthatactuallyrequirestheGPU" ??? profit
Last edited by V1del (2024-10-26 09:44:16)
Offline
This works, would there be a way to automate prime-run to open applications with NVidia Graphics (when available) or is this not possible?
Offline
This works, would there be a way to automate prime-run to open applications with NVidia Graphics (when available) or is this not possible?
If you just mean to condition prime-run on whether there's an nvidia GPU, try sth. like
if lsmod | grep nvidia > /dev/null; then prime-run exec "$@"; else exec "$@"
If you mean "programs i want to run on the nvidia chip in my head" it depends on whether you've your brain wired up as input device for the computer.
Offline
If you just mean to condition prime-run on whether there's an nvidia GPU, try sth. like
if lsmod | grep nvidia > /dev/null; then prime-run exec "$@"; else exec "$@"
Where should I implement this code in?
Offline
Wherever you start stuff, it's basically a script that executes it's parameters via prime-run or not.
Offline
I've been digging around, and I use wofi as my application launcher, and sadly it does not support the use of custom scripts. Meaning I should probably still follow V1del's advice.
Offline
If wofi processes entries through $SHELL you could try to redefine that.
Offline
I ended up adding this condition to the binary file corresponding to the one showing up in my Application launcher, it is now working as intended. Thanks for helping out!
Offline