[platforms/drm] introduce env var to select GPU
ClosedPublic

Authored by bshah on Sep 18 2019, 1:13 PM.

Details

Summary

In some environemnts it is possible that udev detection of primary GPU
fails and it picks the first available card (normally card0). But it is
not desired, and it would be required to use different card (card1).

Introduce environment variable, which when used, will make it possible
to use different card node then one selected by udev.

You can use it like KWIN_DRM_DEVICE=/dev/dri/card1 kwin_wayland

Test Plan

Tested on the device where card0 was not usable for kms, but card1

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bshah created this revision.Sep 18 2019, 1:13 PM
Restricted Application added a project: KWin. · View Herald TranscriptSep 18 2019, 1:13 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
bshah requested review of this revision.Sep 18 2019, 1:13 PM
romangg accepted this revision.Sep 18 2019, 1:20 PM
romangg added a subscriber: romangg.

I'm ok with having this as a short-term fix but long-term this env var should go away again and be replaced with a better selection mechanism. So no guarantee that it will be available after 5.18 LTS.

This revision is now accepted and ready to land.Sep 18 2019, 1:20 PM

env var should be called KWIN_DRM_DEVICE_NODE

zzag added a subscriber: zzag.Sep 18 2019, 1:21 PM

I'm ok with having this as a short-term fix but long-term this env var should go away again and be replaced with a better selection mechanism. So no guarantee that it will be available after 5.18 LTS.

+1

This revision was automatically updated to reflect the committed changes.