jbuchermn / newm

Wayland compositor
MIT License
960 stars 30 forks source link

obs-studio cannot be used inside neem #49

Closed CRAG666 closed 2 years ago

CRAG666 commented 2 years ago

I have always used obs studio with swaywm but with newm it behaves strangely, it does not allow resizing and when if you can, all windows do too, when it is opened it changes the arrangement of the windows among many more problems. Try and see what I say

jbuchermn commented 2 years ago

I noticed some popup misplacements when the output is not located at 0, 0 - I'll take a look into that.

Apart from that obs seems to work fine.

jbuchermn commented 2 years ago

If there are other issues with obs - can you make a video, like in the other issue? That really helps a lot.

CRAG666 commented 2 years ago

Sure I will make a video after my workday

CRAG666 commented 2 years ago

@jbuchermn In the following video I open obs in newm, I press modpress, I also try to resize but where I try it simply does not apply correctly to obs studio, also fortunately you can see the clearest flicker that I speak of but it does not occur those scales only occurs at those scales with obs https://drive.google.com/file/d/1hr63iXtiGRcuo6ojhdBj9q6CEWwcO5Go/view?usp=sharing

jbuchermn commented 2 years ago

Okay, that's very interesting thanks.

Two things:

jbuchermn commented 2 years ago

Btw - what kind of menu are you using to launch OBS? That does look nice

CRAG666 commented 2 years ago

I use some rofi applets (hence my insistence that newm be compatible with rofi :) https://github.com/adi1090x/rofi

CRAG666 commented 2 years ago

I just tried it and if it works well on my main monitor at 0.0 output, except for some inconveniences with the popup where it is impossible for me to use the cursor

CRAG666 commented 2 years ago

I also notice that even in position 0,0, its scale is quite large, the menus look very large

CRAG666 commented 2 years ago

If you like how it looks you can use my configuration of the applets, for example add some for the clipboards and to manage my bookmarks https://github.com/CRAG666/dotfiles/tree/master/config/rofi

jbuchermn commented 2 years ago

Thanks for the configs, I'll try that ;)

jbuchermn commented 2 years ago

The popup issues is something I'm looking into.

What do you mean be large scale? Can you post a screenshot?

jbuchermn commented 2 years ago

By the way, I just noticed, popup misplacement, if output isn't placed at 0,0, happens on sway as well. So I suspect this part is actually an obs bug.

The scaling part however is smething I want to investigate

CRAG666 commented 2 years ago

To make this easier to distinguish, I will upload a photo of audacity and one of obs and see how the obs scale is huge (it is not a question of qt because the other qt apps that I have if they respect the scale) audacity obs

jbuchermn commented 2 years ago

If it was scaled up by the compositor it would look blurry.

From the screenshot it doesn't look like it.. Can you tell?

Does obs change if you change scale?

If so please post the result in the log file of hitting F1.

CRAG666 commented 2 years ago

---- server begin ---- wm_layout wm_output: DP-2 (1280 x 1024) at 0, 0 wm_output: eDP-1 (1366 x 768) at 1833, 0 wm_widget (3784.000000, 1097.000000 - 0.000000, 0.000000) wm_widget (3784.000000, 0.000000 - 0.000000, 0.000000) wm_widget (1833.000000, 1097.000000 - 0.000000, 0.000000) wm_widget (1833.000000, 0.000000 - 0.000000, 0.000000) wm_widget (1828.000000, 1462.000000 - 0.000000, 0.000000) wm_widget (1828.000000, 0.000000 - 0.000000, 0.000000) wm_widget (0.000000, 1462.000000 - 0.000000, 0.000000) wm_widget (0.000000, 0.000000 - 0.000000, 0.000000) wm_view: kitty, kitty, toplevel, 3258 (548.500000, 1900.500000 - 731.000000, 585.000000) of size 1816, 1450 (offset = 0, 0) surface (0, 0 constrained) of size 1816, 1450: 0x5597cab1d320 wm_view_xdg for 0x5597cab1d320 wm_view: newm_log (~/.cache) - NVIM, kitty, toplevel, 5421 (613.500000, 491.500000 - 601.000000, 479.000000) of size 1816, 1450 (offset = 0, 0) surface (0, 0 constrained) of size 1816, 1450: 0x5597cab2d680 wm_view_xdg for 0x5597cab2d680 wm_view: OBS 27.1.3-1 (linux) - Perfíl: Sin Título - Escenas: Sin Título, obs, toplevel, 55940 (1839.000000, 6.000000 - 1939.000000, 1085.000000) of size 1939, 1085 (offset = 0, 0) surface (0, 0 constrained) of size 1940, 1086: 0x5597cab57ee0 surface (0, 50 constrained) of size 1940, 406: 0x5597cab55f30 wm_view_xdg for 0x5597cab57ee0 wm_xdg_subsurface for 0x5597cab55f30 wm_view: obs-studio no se puede usar dentro de neem · Número 49 · jbuchermn / newm - Google Chrome, google-chrome, toplevel, 6986 (-112.000000, 6.000000 - 1939.000000, 1085.000000) of size 1939, 1085 (offset = 0, 0) surface (0, 0 constrained) of size 1939, 1085: 0x5597cab42930 wm_view_xdg for 0x5597cab42930 wm_view: (null), (null), (null), 0 (0.000000, 0.000000 - 0.000000, 0.000000) of size 0, 0 (offset = 0, 0) wm_view_xwayland wm_view: (null), (null), (null), 0 (0.000000, 0.000000 - 0.000000, 0.000000) of size 0, 0 (offset = 0, 0) wm_view_xwayland wm_view: (null), (null), (null), 0 (0.000000, 0.000000 - 0.000000, 0.000000) of size 0, 0 (offset = 0, 0) wm_view_xwayland wm_view: (null), (null), (null), 0 (0.000000, 0.000000 - 0.000000, 0.000000) of size 0, 0 (offset = 0, 0) wm_view_xwayland wm_view: (null), (null), (null), 0 (0.000000, 0.000000 - 0.000000, 0.000000) of size 0, 0 (offset = 0, 0) wm_view_xwayland wm_view: (null), (null), (null), 0 (0.000000, 0.000000 - 0.000000, 0.000000) of size 0, 0 (offset = 0, 0) wm_view_xwayland wm_view: obs, Obs, obs, 0 (0.000000, 0.000000 - 0.000000, 0.000000) of size 0, 0 (offset = 0, 0) wm_view_xwayland wm_view: Layer Shell, waybar, layer, 3295 (1833.000000, 1101.000000 - 1951.000000, 20.000000) of size 1951, 20 (offset = 0, 0) surface (0, 0) of size 1951, 20: 0x5597cab23aa0 wm_view_layer for 0x5597cab23aa0 on output 0x5597c99822d0 wm_view: Layer Shell, waybar, layer, 3295 (0.000000, 1442.000000 - 1828.000000, 20.000000) of size 1828, 20 (offset = 0, 0) surface (0, 0) of size 1828, 20: 0x5597cab22fa0 wm_view_layer for 0x5597cab22fa0 on output 0x5597c9ac3f60 wm_widget (1832.785698, -0.071438 - 1951.428605, 1097.142876) wm_widget (-385.285736, 0.285702 - 2598.571473, 1461.428596) ---- server end ------

CRAG666 commented 2 years ago

In the image if you notice the top menu is smaller in audacity than in obs and other elements of the interface if they are larger than normal

jbuchermn commented 2 years ago

From this line

wm_view: OBS 27.1.3-1 (linux) - Perfíl: Sin Título - Escenas: Sin Título, obs, toplevel, 55940 (1839.000000, 6.000000 - 1939.000000, 1085.000000) of size 1939, 1085 (offset = 0, 0)

you can see that newm does not scale obs up. If it would scale up (f.e. by a factor of 2) you'd see something like

wm_view ... (x, y - 1000, 1000) of size 500, 500

How big clients choose to display their UI is not the decision of any compositor...

CRAG666 commented 2 years ago

Understood even that I still have the doubt why this does not happen in swaywm even when I used a different scale

CRAG666 commented 2 years ago

output eDP-1 res --custom 1920x1080 pos 1600,0 This is the configuration of my monitor is swaywm

CRAG666 commented 2 years ago

I must emphasize that my monitor is 1366x768. But sway lets set any resolution

CRAG666 commented 2 years ago

Oh well. After receiving your answer of this that I comment I will close the problem

jbuchermn commented 2 years ago

newm should let you set any resolution as well. If you can try with the exact same settings as sway and the app is displayed differently on sway then on newm, you can keep this open and I'll continue looking into it.

jbuchermn commented 2 years ago

wait - sway lets you set a resolution that is HIGHER than the actual resolution? That can't be sensible...

If you set sway to the correct resolution and scale 0.7 (i.e. exactly same settings as newm) - what does happen?

CRAG666 commented 2 years ago

Unfortunately this cannot be set the same as newm because in the end it re-sets 1366x768 :(

jbuchermn commented 2 years ago

You can't set sway to 1366x768 on a 0.7 scale?

CRAG666 commented 2 years ago

yes, but replicating the configuration of swaywm to new m does not. But don't get me wrong, newm does many things better than swaywm But perhaps the problem is intrinsic to obs

jbuchermn commented 2 years ago

Yeah, of course you cannot set an output to a higher resolution than it supports in newm (don't know why this is "possible" in sway - or if it's a bug).

But when you run both compositors using the same settings (1366x768 resolution, scale 1.0 or 0.7). Does obs behave differently on both? If it does, then there might be something unrelated going wrong.

CRAG666 commented 2 years ago

Yeah, of course you cannot set an output to a higher resolution than it supports in newm (don't know why this is "possible" in sway - or if it's a bug).

But when you run both compositors using the same settings (1366x768 resolution, scale 1.0 or 0.7). Does obs behave differently on both? If it does, then there might be something unrelated going wrong.

I suppose it cheats and what it actually does is define a fractional scale but I don't know how it does it

CRAG666 commented 2 years ago

I used obs for a long time with swaywm and there were no problems in terms of scale, it is rare that it happened with newm but it does not make me doubt it and more when it is done in qt well cute if it is a headache because you can program things wrong . I will close this for now, I will try with some environment variables and if it works I will not reopen the problem but I will write something in the documentation related to what I learn from this