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

Add ID_PATH to DRM devices for Xorg #4

Merged
merged 1 commit into from
Jan 16, 2023
Merged

Conversation

amshafer
Copy link
Contributor

In create_drm_handler we add the PCI_ID udev property, but when using PRIME offloading Xorg wants to check ID_PATH in
config_udev_odev_setup_attribs. This is necessary as part of the rube goldberg auto configuration of Nvidia Optimus machines.

To get Xorg to play nice this change defines the ID_PATH property by querying the busid specified for the DRI node in question. This is done with the hw.dri..busid sysctl. With this change we can define dynamic configs in xorg.conf.d and have X automatically use nvidia-drm.

In create_drm_handler we add the PCI_ID udev property, but when using
PRIME offloading Xorg wants to check ID_PATH in
config_udev_odev_setup_attribs. This is necessary as part of the rube
goldberg auto configuration of Nvidia Optimus machines.

To get Xorg to play nice this change defines the ID_PATH property by
querying the busid specified for the DRI node in question. This is done
with the hw.dri.<cardnum>.busid sysctl. With this change we can define
dynamic configs in xorg.conf.d and have X automatically use nvidia-drm.
@wulf7 wulf7 merged commit 774a316 into wulf7:master Jan 16, 2023
@wulf7
Copy link
Owner

wulf7 commented Jan 16, 2023

Merged. Thanks!

@amshafer
Copy link
Contributor Author

Is there any way we can get a new release that includes this? This is needed for PRIME setups with nvidia-drm, so getting this in ports means one less thing for users to manually install when testing.

@wulf7
Copy link
Owner

wulf7 commented Apr 19, 2023

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270937

@wulf7
Copy link
Owner

wulf7 commented Apr 20, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants