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

video cards on non-zero PCI domains aren't configured correctly #69

Closed
hertg opened this issue Jul 11, 2021 · 3 comments · Fixed by #85
Closed

video cards on non-zero PCI domains aren't configured correctly #69

hertg opened this issue Jul 11, 2021 · 3 comments · Fixed by #85
Assignees
Labels
bug Something isn't working

Comments

@hertg
Copy link
Owner

hertg commented Jul 11, 2021

This is a follow-up issue for issue #59 and PR #68.

The PCI Domain of the lspci -D command is simply ignored right now. Therefore, any video card on a non-zero PCI domain won't be configured correctly in xorg.conf.

The BusID option in xorg.conf should include the PCI domain, to resolve this issue.

Snippet from xorg.conf manpage:

BusID  "bus-id"
        This specifies the bus location of the graphics card.  For PCI/AGP cards,  the  bus-id
        string  has  the form PCI:bus@domain:device:function (e.g., "PCI:1@0:0:0" might be ap-
        propriate for an AGP card). The "@domain" part can be left out for PCI domain 0.  This
        field  is usually optional in single-head configurations when using the primary graph-
        ics card.  In multi-head configurations, or when using a secondary graphics card in  a
        single-head  configuration,  this  entry is mandatory.  Its main purpose is to make an
        unambiguous connection between the device section and the hardware it is representing.
        This information can usually be found by running the pciaccess tool scanpci.

The BusID has the form of PCI:bus@domain:device:function. The @domain part is currently left out, which implicitly sets the domain to 0.

@hertg hertg added the bug Something isn't working label Jul 11, 2021
@hertg hertg self-assigned this Jul 11, 2021
@firleaf
Copy link

firleaf commented Jul 16, 2021

Ok, so if I read your code correctly, only read_gpus and is_egpu_connected need to be extended by the PCI domain number to fix this. I'm currently not able to test this fix, so I won't create a PR for now. I'll get back to this in 2-3 days if it's not done by then.

@firleaf
Copy link

firleaf commented Jul 26, 2021

After some tinkering I think I've finally got it right. I'll submit a PR, but again I've only tested this on my Fedora 34 machine.

@firleaf
Copy link

firleaf commented Aug 5, 2021

#71 is the PR. Somehow GitHub didn't link it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants