microsoft / microsoft/wslg

Screen information not available from WSL (need monitor EDID from Windows host).

Open
#511 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
11.9k
Forks
429
PR merge metrics
No merged PRs in 30d

Description

Environment

Windows build number: 10.0.22000.258
Your Distribution version: Ubuntu 20.04
Your WSLg version: 1.0.28

Steps to reproduce

Using Qt 5.15.

Fetching the manufacter and model.

  auto screens = QApplication::screens( );
  for ( const auto& item : screens )
  {
    addItem( item->manufacturer( ) + " - " + item->model( ));
  }

Creating a screenshot.

    auto screen = data_->screen;
    auto map = screen->grabWindow( 0 );
    setPixmap( map );

WSL logs:

weston.log
pulseaudio.log

versions.txt

WSLg ( x86_64 ): 1.0.28+Branch.main.Sha.8b5993a2190de8954de59fbca93ff8b4ed5f8330
Mariner: VERSION="1.0.20210224"
FreeRDP: b05321cd4e6a862aef76163a69db4e1910245736
weston: 9a55de1bde7ad5a9774391d83ed3371a68370502
pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5
mesa:

Expected behavior

The application should look like this:
imagen

Actual behavior

Qt's QScreen API is not able to fetch information about the available screens. It is not able to screenshot any of the displays too.
imagen

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the WSLg behavior behind Qt's QApplication::screens(), QScreen::manufacturer(), QScreen::model(), and QScreen::grabWindow() calls. Review the attached weston.log, pulseaudio.log, and versions.txt for related failures. Done means applications can obtain monitor information and capture displays under the reported WSL environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop-dev, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.