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

org.gnome.Mutter.DisplayConfig syntax #1

Closed
Saroumane opened this issue Nov 28, 2021 · 3 comments
Closed

org.gnome.Mutter.DisplayConfig syntax #1

Saroumane opened this issue Nov 28, 2021 · 3 comments

Comments

@Saroumane
Copy link

Saroumane commented Nov 28, 2021

Hello Louis,

I'm not opening an issue but asking for help.
I see here https://github.com/Louis9902/dotfiles/blob/4b400a20d510a3e8a579740dbc95ad1e83fb8684/packages/bash/dot-config/bash/config.d/monitors.sh that you use org.gnome.Mutter.DisplayConfig with "direct" calls.

I managed to do it too to put a VGA monitor in a specific resolution.
Months ago it worked, now it does not.

$ gdbus call --session --dest=org.gnome.Mutter.DisplayConfig --object-path /org/gnome/Mutter/DisplayConfig --method org.gnome.Mutter.DisplayConfig.ApplyMonitorsConfig 1 1 "[(0, 0, 1, 0, true, [('VGA-1', '640x480i@29.989593505859375', [] )] )]" "[]"
Error: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Invalid mode '640x480i@29.989593505859375' specified
(According to introspection data, you need to pass 'uua(iiduba(ssa{sv}))a{sv}')

I suspect a change of syntax, but I'm lost with the hint "you need to pass 'uua(iiduba(ssa{sv}))a{sv}' "
Maybe you can help me to find how to change the command ?
Thanks !
(In case you wonder why I'm asking you : you are the top result with this search : https://github.com/search?q=uua%28iiduba%28ssa%7Bsv%7D%29%29a%7Bsv%7D&type=code )

@Louis9902
Copy link
Owner

Louis9902 commented Nov 29, 2021

Hey the hint means something like: (from here in Basic types)

UInt32, UInt32, Array of [Int32, Int32, Double, UInt32, Bool, Array of[], and so on ].
But for me it looks more like the mode string (640x480i@29.989593505859375) is not correct anymore. You can get the mode string as well from the script, maybe take a look at

serial=$(busctl --user \
call org.gnome.Mutter.DisplayConfig /org/gnome/Mutter/DisplayConfig \
org.gnome.Mutter.DisplayConfig GetCurrentState \
--json short | jq ".data[0]")

EDIT:
And just for reference: https://github.com/GNOME/mutter/blob/main/src/org.gnome.Mutter.DisplayConfig.xml

@Louis9902
Copy link
Owner

Since there is no other question I'm closing this one

@Saroumane
Copy link
Author

Saroumane commented Jan 4, 2022

Hello, thank you for your answer and sorry for not providing feedback. I must admit I felt discouraged by the complexity of this syntax. I will try again to understand how it works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants