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

libddcutil behaves differently/fails after a hotplug compared to ddcutil #418

Open
digitaltrails opened this issue May 18, 2024 · 0 comments

Comments

@digitaltrails
Copy link

digitaltrails commented May 18, 2024

I did a hotplug of the Beng BegQ T2200HD, after which libddcutil correctly detected the new monitor, but an attempt to use libddcutil getvcp failed returning DDCRC_INTERNAL_ERROR. The command-line ddcutil worked fine, both with detect and setvcp.

I traced this back to src/ddc/ddc_displays.c inside

ddc_validate_display_ref(Display_Ref * dref, bool basic_only, bool 
require_not_asleep)

Where it appear that the drm_connector was NULL:

else if (drm_enabled && !basic_only) {
              if (!dref->drm_connector)    <----------------------- NULL
                  ddcrc = DDCRC_INTERNAL_ERROR;

Suspecting the driver had not initialised some aspect of drm, I then hacked the call to ddc_validate_display_ref to force basic_only, and then the setvcp worked.

I then rebooted figuring drm would then be correctly initialised. Sure enough the basic_only hack was no longer required, a getvcp via libddcutil worked just fine.

I don't think you can trust the drm structures if the Nvidia driver is in play. I suppose this could be covered off with documentation. Or maybe an option to completely switch off drm.

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

No branches or pull requests

1 participant