Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

monitors tab in gnome-control-center not accessible #11

Closed
nlgranger opened this issue Nov 6, 2017 · 42 comments
Closed

monitors tab in gnome-control-center not accessible #11

nlgranger opened this issue Nov 6, 2017 · 42 comments

Comments

@nlgranger
Copy link

Hi,
First: thank you for this cool project.

The README says one should start gsd-xsettings to get access to more (presumably the monitor) settings.
I have it running :

> ps aux | grep xsettings                                                                                                                                ~
gdm        688  0.0  0.1 536540 26836 tty1     Sl+  09:20   0:00 /usr/lib/gnome-settings-daemon/gsd-xsettings
granger    878  0.0  0.1 479284 23196 ?        Sl   09:20   0:00 /usr/lib/gnome-settings-daemon/gsd-xsettings

but but the screen tab says it cannot load any information about screens. In the console, I have the following error message:

Error calling GetCurrentState: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.gnome.Mutter.DisplayConfig" does not exist

Do you have any clue about this?

BTW, I am running gnome-i3 on Archlinux.

@jcstr
Copy link
Member

jcstr commented Nov 8, 2017

Hi,
That's because it's a missing component from the session.
Let me look around to figure out and fix this.

Meanwhile i suggest you to do your settings under GNOME

Thanks for let me know.

@jcstr
Copy link
Member

jcstr commented Nov 12, 2017

I'll take time on this, i'm doing another important duties, next week will be about university projects. Thanks for the patient.

@damko
Copy link

damko commented Nov 18, 2017

I didn't have this exact issue but it's still related to the gnome-control-settings.

Try running this in a terminal:

env XDG_CURRENT_DESKTOP=GNOME gnome-control-center

@jcstr
Copy link
Member

jcstr commented Nov 19, 2017

@damko thanks for this, i did as you suggest and this is the output when i open the screen tab:

 ~ > env XDG_CURRENT_DESKTOP=GNOME gnome-control-center

(gnome-control-center:1703): display-cc-panel-WARNING **: Error calling GetCurrentState: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.gnome.Mutter.DisplayConfig" does not exist

@damko
Copy link

damko commented Dec 4, 2017

@51v4n look into your gnome-session dir (/usr/share/gnome-session/sessions/).
There must be a .session file with the name of the session that you are currently using.
Open that file and look for the RequiredComponents line
Try to add or remove "org.gnome.Mutter.DisplayConfig" from it are reload gnome

@jcstr
Copy link
Member

jcstr commented Dec 4, 2017

@damko yup, i did it as well and org.gnome.Mutter.DisplayConfig wasn't there (specifically i3-gnome.session), so i added it and the session crashed turning back to login screen.

My apologizes for being late and unattend this, i'm in the middle of final university projects.

This will be fixed anyway, thanks to all of you for let me know.

@damko
Copy link

damko commented Dec 4, 2017

I'm starting thinking that you've enabled some gnome-shell components that can not be launched but that somehow gets launched.
Google about this org.gnome.Mutter.DisplayConfig component to understand what it is. Then look around in the autostart folder for some .desktop file trying to load that component.
This could be a start.
And good luck for your final!

@jcstr
Copy link
Member

jcstr commented Dec 17, 2017

@damko

I'm starting thinking that you've enabled some gnome-shell components that can not be launched but that somehow gets launched.

Actually, due to hours of getting to understand about session components i'm thinking the same (there's a lot of components loaded).

Google about this org.gnome.Mutter.DisplayConfig component to understand what it is. Then look around in the autostart folder for some .desktop file trying to load that component.
This could be a start.

On it! , let's find out.

And good luck for your final!

Thanks!

@t-8ch
Copy link

t-8ch commented Jan 31, 2018

The org.gnome.Mutter.DisplayConfig dbus service is provided by mutter/libmutter.
This is a window manager library used by gnome-shell.
We would need a way to have libmutter only glue this dbus interface to xrandr without actually doing all the window management stuff i3 should do.

(This would also enable colord support with i3)

@jcstr
Copy link
Member

jcstr commented Jan 31, 2018

@t-8ch I agree with your words, it works only with mutter, this is why i'm taking time to fix it. To be honest this issue needs collaborators, it was opened about 3 months+ ago.

jcstr added a commit that referenced this issue Jan 31, 2018
Link to the current issue #11, [help wanted]

Add Author at the end of README, i apologize for unatend this, i'm just the
maintainer, all the credit goes to Lorenzo Villani.
@t-8ch
Copy link

t-8ch commented Jan 31, 2018

@51v4n I have a small program (hack) that uses libmutter to expose the dbus service without actually starting the window manager.
(It applies its settings though).

https://gist.github.com/t-8ch/5e59f5a5eff265ad429c779000511f0a

The whole thing is fairly terrible (and may break with future versions of mutter) but seems to work for now.

@jcstr
Copy link
Member

jcstr commented Feb 1, 2018

@t-8ch This is really cool!, thanks!, i build it and it fixes the issue!
At the moment i don't know how to integrate to the whole project but it works like a charm!.

I could update the README with your approach but there has to be a way to integrate with everything(?).

The whole thing is fairly terrible (and may break with future versions of mutter) but seems to work for now.

Not at all, it's a perfectly proof of concept, another way to understand the components of GNOME.

@t-8ch
Copy link

t-8ch commented Feb 1, 2018

@51v4n So I tried to integrate it.
When starting the program via the Gnome-Session (RequiresCondition) or the i3 config then my mouse cursor vanishes.
Putting in a sleep() "fixes" this.
The same effect also occurs when modifying the display via gnome-control-center.

It would be interesting if someone else also runs into this issue.

@jcstr
Copy link
Member

jcstr commented Feb 2, 2018

@t-8ch I'll add your approach on the rest of the project.

I can add you as a collaborator if you wish to test something else.

@t-8ch
Copy link

t-8ch commented Feb 3, 2018

@51v4n Feel free to use the code as you see fit.
I don't think having me as a contributor will be useful. I am still not sure if I actually want to use this hack.
Thanks for the offer though!

@jcstr
Copy link
Member

jcstr commented Feb 7, 2018

@t-8ch No problem, i understand, by the way thanks a lot for your sharing your snippet now i get more clearly what's going on.

@tarjei
Copy link

tarjei commented Feb 28, 2018

Just thought I'd note that @t-8ch's solution required the libmutter-1-dev package on ubuntu:
sudo apt-get install libmutter-1-dev

@jcstr
Copy link
Member

jcstr commented Mar 1, 2018

@tarjei thanks for let us know, i didn't required to install anything to test the code my self.

The point of that code is that, at least as a proof of concept, we learned that to get more integration under GNOME session we have to load the mutter's library, it's kind of tricky because we don't use GNOME's mutter so, with this piece of code we tell to GNOME session to load the mutter's library without start mutter (that's where i3-wm starts).

So thanks to that proof of concept, now i get more understanding about what's going on, i'm taking time to implement a solution.

Otherwise, if you have an approach it's welcome.

@mist
Copy link
Contributor

mist commented Apr 4, 2018

@t-8ch Where do I have to put the sleep() in? Got the same problem with the vanishing cursor.

@t-8ch
Copy link

t-8ch commented Apr 4, 2018

@mist I am not sure anymore (can look later) but assume strongly that it should be before initializing libmutter.

@mist
Copy link
Contributor

mist commented Apr 11, 2018

@t-8ch I tried different ways, but none worked, the pointer is still vanishing. Maybe this has something to do with using libmutter-2 instead of libmutter-1? But it would be helpful to try your working version.

@t-8ch
Copy link

t-8ch commented Apr 11, 2018

@mist I took another look and it seems my version with the sleep has been lost in my rewrites.
How does it behave if you start the hack during a running session?
In my case it worked when started in an existing session but would not work when starting directly during session startup.
The led me to put the sleep in, which worked.

I could image that this is dependent on some internal implementation details, so different versions of libmutter may the cause for this difference.

@mist
Copy link
Contributor

mist commented Apr 12, 2018

@t-8ch Well, I only tried starting it during the running session and the cursor vanishes, so the sleep probably won't fix anything about it :(

@NullVoxPopuli
Copy link

is there a list of gnome session components to start when launching i3?

somethings that I've noticed the default gnome desktop offers that I would like to have in i3, but haven't yet figured out how:

  • auto monitor switching when plugging in a monitor
  • gnome-control-center Devices/Displays shouldn't be blank "Could not get sceren information"
    • wanted to use this to change backlight brightness

on the plus side, when I use i3, my .xinitrc is loaded, whereas in gnome, it's not.

$ gnome-shell --version
GNOME Shell 3.28.1

 $ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04 LTS
Release:	18.04
Codename:	bionic

 $ i3 --version
i3 version 4.15 (2018-03-10) © 2009 Michael Stapelberg and contributors

 $ uname -a
Linux macbuntu 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

@t-8ch
Copy link

t-8ch commented May 8, 2018

@NullVoxPopuli , well these are not managed as gnome session components but a core functionality of the gnome window manager (mutter).

@NullVoxPopuli
Copy link

@NullVoxPopuli , well these are not managed as gnome session components but a core functionality of the gnome window manager (mutter).

that's disappointing. I would have thought they had all that separated out into different programs.

oh well. thanks for the info!

@ydallilar
Copy link

I have been struggling with similar things and found the workaround with gnome-flashback. I just run it in my i3 config. Gnome-flashback is specifically designed to recover some functionality already moved to mutter or gnome-shell. So, it comes with some features built in but easy to disable if you want to. For example, I use mate daemons for power management and notifications. And it provides its own org.gnome.mutter.DisplayConfig so I dont think you actually need to use libmutter.

@jcstr
Copy link
Member

jcstr commented Jun 5, 2018

@pssncp142,
Interesting, didn't realize that gnome-flashback can give a hand on this particular case.

I just run it in my i3 config.

As simple as that? huh.

I just installed gnome-flashback and include it on the i3 config as you mention and it works!

So, here's another approach that works! i'll add it to the wiki as well to @t-8ch's approach.

At this point, this issue can be considered as fixed?

@mist
Copy link
Contributor

mist commented Jun 6, 2018

Whoa! Awesome!
Thanks for this great hint!

@jcstr
Copy link
Member

jcstr commented Jun 7, 2018

@pssncp142 Thanks for sharing your workaround! now it is already available in 'Tips & Tricks': https://github.com/jcstr/i3-gnome/wiki/Tips-&-Tricks#gnome-flashback

jcstr added a commit that referenced this issue Jun 7, 2018
Thanks to @pssncp142 and his workaround on #11 share with us a simple
way to fix the integration with the screen tab on GNOME control center

And also 'GNOME Flashback' help to integrate in more ways i3 onto GNOME.
@muktupavels
Copy link
Member

These days you can not replace window manager in GNOME or GNOME Classic session. GNOME Shell is more then window manager...

One option is to use GNOME Flashback that still use old components - gnome-panel, gnome-applets, metacity and new module gnome-flashback that is used to provide required functionality that has been moved to gnome-shell and/or to mutter/libmutter.

https://gitlab.gnome.org/GNOME/gnome-flashback/blob/master/data/sessions/Makefile.am
*.session files are auto-generated here if you want to see what are required components for GNOME Flashback session. You want replace metacity with i3-gnome. If you don't use gnome-panel you can remove it. Other things you probably want to keep.

GNOME_SHELL_SESSION_MODE=classic in gnome-session-i3 is not needed, it is used by gnome-shell, but you are not starting/using it.

DesktopNames in i3-gnome-xsession.desktop must be DesktopNames=GNOME-Flashback;GNOME; if you are using GNOME Flashback.

@ydallilar
Copy link

https://gitlab.gnome.org/GNOME/gnome-flashback/blob/master/data/sessions/Makefile.am
*.session files are auto-generated here if you want to see what are required components for GNOME Flashback session. You want replace metacity with i3-gnome. If you don't use gnome-panel you can remove it. Other things you probably want to keep.

GNOME_SHELL_SESSION_MODE=classic in gnome-session-i3 is not needed, it is used by gnome-shell, but you are not starting/using it.

DesktopNames in i3-gnome-xsession.desktop must be DesktopNames=GNOME-Flashback;GNOME; if you are using GNOME Flashback.

Yes, that should work as well. But, I vote for gnome-flashback being optional rather than the default.

@muktupavels
Copy link
Member

Is display configuration optional? Does i3 manage input settings and/or input sources?

@ydallilar
Copy link

ydallilar commented Jun 8, 2018

Is display configuration optional? Does i3 manage input settings and/or input sources?

Gnome-flashback options are:

~ gsettings list-keys org.gnome.gnome-flashback      
screenshot
sound-applet
status-notifier-watcher
end-session-dialog
automount-manager
screencast
audio-device-selection
idle-monitor
polkit
bluetooth-applet
notifications
power-applet
desktop-background
input-settings
screensaver
workarounds
input-sources
shell

I prefer idle-monitor, notifications, desktop-background, power-applet disabled. It is something to explore for everyone's taste. I am not sure if there is a way to prevent gnome-flashback managing display configuration. Also, if you are using synaptics, gnome mouse/touchpad settings pretty much useless since gnome uses libinput for default as far as I know.

@muktupavels
Copy link
Member

I know what options GNOME Flashback has...

You wrote - I vote for gnome-flashback being optional. If there is no gnome-flashback then you don't have display configuration, you don't have input sources and you don't have other things that has been removed from GNOME Settings Daemon. Of course if i3 sessions does not need these things then you don't need gnome-flashback.

Options to disable some parts are mostly because of one reason - older Ubuntu versions used GNOME Flashback with Unity Settings Daemon that still had things that has been removed from GNOME Settings Daemon.

You can not prevent it from managing display configuration - I removed that, because display configuration is not optional. Same is true for other things so in future most likely at least some options will disappear.

@jcstr
Copy link
Member

jcstr commented Jun 10, 2018

It is something to explore for everyone's taste.

I agree with that.

If there is no gnome-flashback then you don't have display configuration, you don't have input sources and you don't have other things that has been removed from GNOME Settings Daemon. Of course if i3 sessions does not need these things then you don't need gnome-flashback.

It's all about personal customization.

Just for context, this issue shows the gap that this tweak has, sadly every update i3-gnome breaks just because there are changes done regarding gnome-session.

I'll keep in mind that gnome-flashback will be reliable as the simplest solution to this issue until an update from GNOME (scheduled for September this year) break it again or some changes that it's not our business here.

The main reason i've been using this tweak is that it can be possible an integration with GNOME, far from extensions such as panels and other visual ones but it really helps with other components such as GNOME keyring out-of-the-box.

@NullVoxPopuli
Copy link

Seems like something broke again? can anyone confirm? I have an ASUS laptap where I'm not using gnome-flashback and I can view the displays settings, but I recently got a new Dell XPS 15 for work, and the display settings aren't loading / can't find any displays.

@NullVoxPopuli
Copy link

actually, scratch that. modifying one of the .desktop files with GNOME-Flashback doesn't work, but exec from i3/config does. all is well.

@jcstr
Copy link
Member

jcstr commented Jul 12, 2018

Curious, there are no updates from GNOME/i3wm yet?

... but exec from i3/config does. all is well.

Obvious to mention but you have to add it, regardless of the presence of GNOME.

@ydallilar
Copy link

actually, scratch that. modifying one of the .desktop files with GNOME-Flashback doesn't work, but exec from i3/config does. all is well.

I couldn't do it myself, but apparently, there is a specific order of running the daemons. See the files in here: https://github.com/deuill/i3-gnome-flashback. This does work. Tested in arch linux.

@jcstr
Copy link
Member

jcstr commented Mar 25, 2019

The reason I'm closing this is because it is pretty well documented through the comments, thanks to everyone here for taking the time and figure out a solution.

@dustinwilson
Copy link

I am getting a segfault when clicking on "Devices" in gnome-control-center on a fresh Manjaro install in a virtual machine:

(gnome-control-center:86775): GLib-GObject-CRITICAL **: 08:21:15.394: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
Segmentation fault (core dumped)

Is that related to the issue here with the Displays panel? It does not segfault when using i3-gnome-flashback. Is the solution to run flashback to get access to the panel like with this?

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

No branches or pull requests

10 participants