WDDM 's resolution always 1024x768x24

I am implementing a virtual wddm driver (wddm 1.0) for win7 run on virtualbox.

at the moment. I can see the content(pictures), but can’t change resolution .

Q1:
I try the follow setting, but nothing happen, and i can’t see the content, resolution remains 1024x768x24 .
source : 1440x900x32
target : 1440x900x32
monitor: 1440x900x32

I am not sure if this is helpful. But there is a user mode executable named VBoxTray.exe that runs.
This tray has a display thread, which keeps track of the change in resolution.
You can see the ‘VBoxDisplayThread’ in this source file “src/VBox/Additions/WINNT/VBoxTray/VBoxDisplay.cpp”.

What this thread does is waits on the event display change, if it gets that event it eventually calls “ChangeDisplaySettingsExA” from the User32.dll.

Before calling this function it also evaluates the Display devices.

See if this can be of any help to you.

Thanks.

@Rohit Magdum

thank you for u quick reply.
I will try it now.

xxxxx@gmail.com wrote:

I am not sure if this is helpful. But there is a user mode executable named VBoxTray.exe that runs.
This tray has a display thread, which keeps track of the change in resolution.
You can see the ‘VBoxDisplayThread’ in this source file “src/VBox/Additions/WINNT/VBoxTray/VBoxDisplay.cpp”.

What this thread does is waits on the event display change, if it gets that event it eventually calls “ChangeDisplaySettingsExA” from the User32.dll.

Those tools are part of the open source VirtualBox virtual machine
host. Does that work with real hardware?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

If I understand correctly, what is happening is kelsel is trying to change the resolution of the display, but those changes are not reflected in his VM.
So as I said in my answer, to adjust with the new resolution the VBox needs to be told that there is a change in resolution and it should adjust to the new resolution. For which I said there is a display thread and it takes care of these things.

Here my understanding is that he is trying to change the resolution of the VM, which as you right said is not working with real hardware but a emulated one.

Does that makes sense? Please let me know if I have missed something.

I did a virtual WDDM driver several(>2) years ago that run on Linux QEMU
hypervisor. Here is my feedback:

  1. In your virtual WDDM driver, make sure the resolution list contains
    1440x900 from the Windows UI. The resolutions are reported by WDDM driver’s
    DxgkDdiEnumVidPnCofuncModality.

  2. If 1440x900 is listed in the drop down box, and you select the
    resolution in UI, but the UI bounce the configuration back to 1024x768,
    make sure your DxgkDdiIsSupportedVidPn not veto the pinned resolution.

  3. Make sure you see DxgkDdiCommitVidPn downcall in which the selected
    topology as well as the pinned mode matches with the selected configuration.

  4. The last step, the virtual WDDM driver must notify the hypervisor which
    mode is currently selected(committed). The selected resolution is the
    pinned source mode associated with the source mode set in the committed
    topology. I don’t know about virtual hardware interface on virtual box.
    But you could definitely tell the hypervisor about the resolution change
    event.

  5. Also check for DxgkDdiSetVidPnSourceAddress. This routine is supposed to
    program the RAMDAC . In your case, this is also a good place on resolution
    notification…

2016-05-05 16:26 GMT+08:00 :

> I am implementing a virtual wddm driver (wddm 1.0) for win7 run on
> virtualbox.
>
> at the moment. I can see the content(pictures), but can’t change
> resolution .
>
> Q1:
> I try the follow setting, but nothing happen, and i can’t see the content,
> resolution remains 1024x768x24 .
> source : 1440x900x32
> target : 1440x900x32
> monitor: 1440x900x32
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: <
> http://www.osronline.com/showlists.cfm?list=ntdev&gt;
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:>

@JiaBang Lin

thank you very much! I change resultion successful.

you do know that there already is a win7 wddm driver for vbox, right?

Mark Roddy

On Thu, May 5, 2016 at 4:26 AM, wrote:

> I am implementing a virtual wddm driver (wddm 1.0) for win7 run on
> virtualbox.
>
> at the moment. I can see the content(pictures), but can’t change
> resolution .
>
> Q1:
> I try the follow setting, but nothing happen, and i can’t see the content,
> resolution remains 1024x768x24 .
> source : 1440x900x32
> target : 1440x900x32
> monitor: 1440x900x32
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: <
> http://www.osronline.com/showlists.cfm?list=ntdev&gt;
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:>

@Mark Roddy

Yes, I do.
VBox is opensource, and I can see the wddm driver source codes.

I can choose vmware too, but now I choose vbox for Personal preferences. Also, vmware and vbox are both easy to debug.

The ultimate goal is develop a wddm driver can run on xenserver or kvm

Ah, ok. That makes sense.

Mark Roddy

On Sun, May 8, 2016 at 9:47 PM, wrote:

> @Mark Roddy
>
> Yes, I do.
> VBox is opensource, and I can see the wddm driver source codes.
>
> I can choose vmware too, but now I choose vbox for Personal preferences.
> Also, vmware and vbox are both easy to debug.
>
> The ultimate goal is develop a wddm driver can run on xenserver or kvm
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: <
> http://www.osronline.com/showlists.cfm?list=ntdev&gt;
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:>