alacritty / alacritty

A cross-platform, OpenGL terminal emulator.
https://alacritty.org
Apache License 2.0
54.36k stars 2.96k forks source link

Using integrated graphics rather than dedicated card #7756

Open dougg0k opened 4 months ago

dougg0k commented 4 months ago

Hi,

Pretty much the title, why alacritty are using Intel (integrated graphics) instead of nvidia, which I have confirmed to be the one that the system are using.

ver

It uses the gpu on the desktop, since it's only the GPU, but not the laptop.

chrisduerr commented 4 months ago

@kchibisov Afaik glutin does nothing to select which GPU should be used, correct? So should just be up to the OS to pick?

If you want to run it on your nvidia card, I'm pretty sure there's tools to select which graphics card you want to run an application on.

kchibisov commented 4 months ago

We can try to ask for faster config, so it'll try to pick nvidia, but we don't control which GPU to render to, since it's not generally present in OpenGL (with the way we pick configs).

chrisduerr commented 4 months ago

The thing is we also had people with the opposite issue in the past. So I don't think people would be happy about either.

kchibisov commented 4 months ago

I'm pretty sure they can force a particular vendor via libglvnd's env variable, I just forgot how to do that. One can also force specific driver for everyone there.

dougg0k commented 4 months ago

Why force rather than just follow what the OS are using as the main card? Or maybe even provide an option if anyone would ever need to force to a specific card due to whatever reason.

kchibisov commented 4 months ago

We don't pass preference or force anything. We explicitly pass that it should be picked automatically.

So your automatically is not what you like and you want to force it into faster GPU, besides the fact that the default is integrated.

dougg0k commented 4 months ago

I didnt mentioned anything about automatically, but the main gpu being used by the OS.

Not in my case, default has always been nvidia, nothing was set by me.

chrisduerr commented 4 months ago

The default on multi-GPU systems is pretty much always the integrated graphics.

dougg0k commented 4 months ago

I suppose that can be so in some OSs in laptops, as they consume less power.

Maybe this is not a problem, since they didnt provide a way to disable the integrated using the bios setup.

nixpulvis commented 4 months ago

Didn't we used to have a setting for this, or am I misremembering?

kchibisov commented 4 months ago

We never had explicit setting, but we always passed that we don't prefer any special config.

We can request faster OpenGL config, but it means just always pick more performant, which doesn't mean faster, since it can require GPU to GPU copies.

kchibisov commented 4 months ago

The thing is that if you really want your nvidia card you can do that yourself with libglvnd's variable iirc, you don't even need anything special from alacritty, the mechanism to make alacritty use specific GPU are already in place.

chrisduerr commented 4 months ago

Didn't we used to have a setting for this, or am I misremembering?

I believe there was something in the Info.plist on macOS, but IIRC that doesn't work properly? Certainly wouldn't work on Linux.