r/swaywm•
TheJosh

Easier way for unsupported-gpu, even if main GPU is AMDGPU?

Question

Ahoy!

I've been using sway for a while, and it's great. My primary GPU for Linux has been Radeon for a while, my current card is a 5600XT.

I've recently plugged in my nVidia card into another PCIe slot, to use for various workloads where I can offload a task to that when required. My monitor however is plugged into the AMD card, and it "renders" (is this called framebuffering or something?) through my AMD card.

This works absolutely fine when using sway -V --unsupported-gpu, but is there a way to login to via a login manager and ignore this message?

I believe it is because sway is picking up the fact that I have the nVidia proprietary drivers installed and warns that you're going to have a bad time.

edit: Reading the source code it checks /proc/modules for an nVidia card, so I guess not. Bummer.

Posted Nov 13, 2022, 11:58 AM UTC

64
bjkillas•

could just not use a login manager and setup a bash_profile to run sway when its whatever tty you use
but if you want to use a login manager check your login managers man page

1
LightweaverNaamah•

You can make a script to run sway with that option and put it in the right place for your login manager to find, or you can edit the entry for sway that your login manager currently would use to have that option.

1
TheJoshOP•

Yeah, that's what I think I need to end up doing. Cheers.

Workaround for now was to fork and remove that line, but I'll get my login manager to just use that, cheers.

1
[deleted]•

[deleted]

1
r1v3rx•

Go to /usr/share/wayland-sessions/sway.desktop and add --unsupported-gpu after exec=sway now starting sway through anything will ignore it using nvidia

1