-
Notifications
You must be signed in to change notification settings - Fork 2
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
Automatic headless outputs #6
Conversation
Just tried merging this. It all built fine, but even without the changes to wayfire.ini and wayfire-pi, I am still getting a valid output when headless. My understanding based on the above is that that should not happen? |
I am not sure what you mean by "valid output". Before these changes, you should see "NOOP-1" when there is no output connected. After the change, you should see "HEADLESS-N" where N is a positive integer. When there is an output connected you should not see either of "NOOP-1" or "HEADLESS-N". There are two separate protocols for enumerating outputs. One is the core object registry and the other is wlr-output-management-v1. The former will always show you all physical and virtual outputs including the noop, but the latter excludes the noop. For enumerating For enumerating output-management outputs, one can call |
I was expecting that the new changes would mean that I would only get an output when headless if I made the corresponding changes to the config to enable the new behaviour. But from what you say above, I assume that I am getting the NOOP output when I haven’t made the changes, and will get the new HEADLESS output if I do make the config changes? |
Yes, that appears to be the most likely outcome, but this can be tested by calling |
This doesn't seem to be working all that well for me. Without the auto-headless plugin and those environment variables, I get the same behaviour as before. With those changes, I can indeed see a display labelled as HEADLESS-2 in wlr-randr. But a lot of other things seem to be broken:
|
Looks like this needs more work. |
This makes the NOOP output available to output management when there's no other output connected. This makes it possible for VNC clients to resize the output to fit their window size.
I'm taking a different approach to this now being that things are somewhat fragile w.r.t. outputs coming and going. Now the NOOP output is just resizeable. I also fixed a potential crash due to uninitialised pointer. Edit: I should also mention that config changes and changes to the script are no longer required, nor will they do any good. |
OK, this now means that I can see the HEADLESS-2 output in wlr-randr, which is good. You say it is resizeable, but the only mode offered by wlr-randr is 1920x1080, and if I try to force it to another size, I get told that the size requested is an "unknown mode". I can set the orientation to inverted, and that seems to work, so the output is responding to wlr-randr - it just cannot be resized with it. Edit - which may, of course, be a wlr-randr problem? Edit2 - ah, need to use the "custom-mode" option in wlr-randr, not "mode"! That works fine. |
You shouldn't be seeing HEADLESS-2. This is a completely different approach where instead of creating headless outputs, the NOOP-1 output is now resizeable. I force pushed the changes. Did you pull fail? |
Hmm. OK, I am now seeing the NOOP-1 output, and it is resizeable. Not sure why I was still seeing the HEADLESS-2 output when I tried earlier - I might have forgotten to reboot. But it all seems to work fine for me now. |
Looks fine - many thanks! |
This automatically creates a headless output instead of relying on NOOP-1.
Headless outputs can be resized, so this will allow VNC clients to set arbitrary modes on the output.
The
auto-headless
plugin will need to be added to the relevant configuration files and thewayfire-pi
script needs to be modified to enable the headless outputs. Mine looks like this: