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

XRandR reports 0mm display size #9578

Open
DemiMarie opened this issue Nov 13, 2024 · 3 comments · May be fixed by QubesOS/qubes-core-admin-client#319
Open

XRandR reports 0mm display size #9578

DemiMarie opened this issue Nov 13, 2024 · 3 comments · May be fixed by QubesOS/qubes-core-admin-client#319
Labels
P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@DemiMarie
Copy link

How to file a helpful issue

Qubes OS release

R4.2

Brief summary

Qubes OS trips this warning from winit:

    // See http://xpra.org/trac/ticket/728 for more information.
    if width_mm == 0 || height_mm == 0 {
        warn!("XRandR reported that the display's 0mm in size, which is certifiably insane");
        return 1.0;
    }

This means that the display size is zero, which is obviously nonsense.

Steps to reproduce

Run xrandr. I get the following:

$ xrandr
Screen 0: minimum 64 x 64, current 1920 x 1080, maximum 32767 x 32767
DUMMY0 connected primary 1920x1080+0+0 0mm x 0mm
   QB1920x1080   46.10*+
DUMMY1 disconnected
DUMMY2 disconnected
DUMMY3 disconnected
DUMMY4 disconnected
DUMMY5 disconnected
DUMMY6 disconnected
DUMMY7 disconnected
DUMMY8 disconnected
DUMMY9 disconnected
DUMMY10 disconnected
DUMMY11 disconnected
DUMMY12 disconnected
DUMMY13 disconnected
DUMMY14 disconnected
DUMMY15 disconnected

Expected behavior

Display size is accurate (outside Whonix), or at least non-zero.

Actual behavior

Display size is zero.

@DemiMarie DemiMarie added T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. labels Nov 13, 2024
@alimirjamali
Copy link

The two width_mm_atom and height_mm_atom are currently set to 0 in dummy driver. Hard coding them to a reference display size is not ideal. I guess a protocol bump should allow vmside to query the actual size from the xside.

@marmarek
Copy link
Member

Not necessarily. qubes.SetMonitorLayout service should set appropriate size, when it receives it from dom0 (or gui domain). I guess it doesn't get it for some reason.

@alimirjamali
Copy link

alimirjamali commented Nov 15, 2024

The unittests for qvm_start_daemon.py makes it evident. The w_mm and h_mm is calculated only for hidpi screens. Overall very easy to fix. This else case should be fixed and unittests should be readjusted. Could I select 96DPI for non-hidpi screens? Arch Wiki mentions it as the most common non-hidpi resolution.

p.s. and while I am at it, maybe switch to Xlib library instead of parsing the xrandr output?

alimirjamali added a commit to alimirjamali/qubes-core-admin-client that referenced this issue Nov 15, 2024
alimirjamali added a commit to alimirjamali/qubes-core-admin-client that referenced this issue Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants