Bug 206663 - x11/gnome-shell: shell and desktop failed
Summary: x11/gnome-shell: shell and desktop failed
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-gnome mailing list
URL: https://forums.freebsd.org/threads/so...
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2016-01-27 07:23 UTC by jetmomo
Modified: 2018-07-05 09:53 UTC (History)
5 users (show)

See Also:
koobs: maintainer-feedback? (gnome)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jetmomo 2016-01-27 07:23:45 UTC
Although Xorg was correctly configured, users cannot access gnome desktop.
This issue had been discussed in forums.freebsd.org (https://forums.freebsd.org/threads/something-has-gone-wrong-with-gnome3.54825/).
Regardless FreeBSD 10.1, 10.2 and 11-current, this problem existed in gnome3 (3.16.4).
Comment 1 Ting-Wei Lan 2016-01-27 10:00:58 UTC
Does your /var/log/gdm/:0-greeter.log have useful messages?
Comment 2 jetmomo 2016-01-27 13:13:16 UTC
(In reply to Ting-Wei Lan from comment #1)
Thanks Lan.
I am not sure.
Here was the log:
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: r600
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: r600
gnome-session-is-accelerated: llvmpipe detected.
(gnome-settings-daemon:951): media-keys-plugin-WARNING **: Unable to inhibit keypresses: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.login1 was not provided by any .service files
(gnome-settings-daemon:951): Gvc-WARNING **: Failed to connect context: OK
(gnome-settings-daemon:951): color-plugin-WARNING **: failed to obtain org.freedesktop.color-manager.create-profile auth
Comment 3 Ting-Wei Lan 2016-01-27 13:32:05 UTC
Does the gdm user have rw access to /dev/dri/card0 and have ro access to /usr/local/lib/dri/r600_dri.so?

Does 'ldd /usr/local/lib/dri/r600_dri.so' show any 'not found' messages?
Comment 4 jetmomo 2016-01-27 13:41:57 UTC
(In reply to Ting-Wei Lan from comment #3)
No, users can perform 'ldd /usr/local/lib/dri/r600_dri.so'.
Here is the screenshot(http://imgur.com/rxAvJ55).
Comment 5 jetmomo 2016-01-27 13:44:47 UTC
(In reply to jetmomo from comment #4)
Sorry, I forgot something.
Regardless Ati and Nvidia cards, FreeBSD 10.1/10.2/11-current and Gnome 3.14.2 were OK.
Regardless Ati and Nvidia cards, FreeBSD 10.1/10.2/11-current and Gnome 3.16.6 were NG.
Comment 6 Ting-Wei Lan 2016-01-27 14:14:10 UTC
I assume you are using an ATI card now, and both gdm user and your own user have rw access to /dev/dri/card0. It is odd to see 'Permission denied' in the log if the permission is set correctly.

After reading the forum post more carefully, I think the gnome-session-failed screen was started by gnome-session, whose messages may be available in ~/.cache/gdm/session.log. Can you check whether the log file and dmesg show some programs has crashed too quickly?
Comment 7 jetmomo 2016-01-27 15:11:08 UTC
(In reply to Ting-Wei Lan from comment #6)
I showed the ~/.cache/gdm/session.log here(http://pastebin.ca/3354463).
For dmesg, anything seemed to be fine.
What would be helpful for this problem? Could you let me know the command?
Thanks a lot.
Comment 8 Ting-Wei Lan 2016-01-27 16:32:51 UTC
(In reply to jetmomo from comment #7)
gnome-session-failed screen, or 'Something has gone wrong' screen, is launched by gnome-session when a required app fails to start or crashes too quickly, so we should check messages printed by gnome-session.

This line should be related:
gnome-session[1712]: WARNING: Application 'gnome-settings-daemon.desktop' failed to register before timeout

It seems the problem is caused by gnome-settings-daemon.

You said you could see gnome-shell, so the problem was not caused by gnome-shell. Both gnome-shell and gnome-settings-daemon are required apps in gnome-session, so either of them crashes can cause the gnome-session-failed screen to be showed.

I don't have a specific command to debug this kind of issue. System call tracers like truss and ktrace may help you figure out the cause of the problem, but sometimes source code debugging may be required ...
Comment 9 jetmomo 2016-01-28 01:18:26 UTC
(In reply to Ting-Wei Lan from comment #8)
Thanks Lan.
Although the problem was confirmed, I still had no idea for solving this problem.
This problem did not exist it gnome 3.14.2.
At least, this bug was pointed out.
Thanks again.
Comment 10 Ting-Wei Lan 2016-01-28 08:26:10 UTC
You can try to kill gnome-session-failed from another virtual console. This doesn't terminate gnome-session, and existing apps in the session can keep running. As your gnome-shell seems to work fine, you can use it to start a terminal and use tools to debug the problem. If you want to use gnome-terminal, make sure that your locale uses UTF-8 encoding or it will refuse to run.

I think it may be useful to run gnome-settings-daemon in a terminal by typing '/usr/local/libexec/gnome-settings-daemon-localeexec &' to see whether it prints error. If gnome-settings-daemon is already running, you may have to kill it first.

I cannot test the result for you because GNOME 3.16 works fine on my machines. I use Intel GPU and I don't have ATI or NVIDIA card to test.

How did you upgrade GNOME, from packages or by building ports? If you use packages, which repository is used, latest or quarterly? It seems some people (from the forum post) just upgraded from 3.14 to 3.16 recently, but the GNOME 3.16 upgrade was committed to ports more than five months ago.
Comment 11 jetmomo 2016-01-28 12:26:38 UTC
(In reply to Ting-Wei Lan from comment #10)
Thanks Lan.
Based on your suggestion, I tried to kill gnome-session-failed.
However, after I killed the process, I was forced to log out and GDM log-in screen showed.

I executed '/usr/local/libexec/gnome-setting-daemon-localeexec &' and obtained 'Unable to initialize GTK+'.

I used 'fresh' installation with FreeBSD 10.2; then, used 'pkg install xorg gnome3'. 

For my lenovo x200 (an embedded Intel video chip), FreeBSD 10.2 and Gnome 3.16 worked fine. In contrast, for my PCs, Gnome 3.16 was NG.
Comment 12 Ting-Wei Lan 2016-01-28 15:00:54 UTC
(In reply to jetmomo from comment #11)
Let's replace gnome-session-failed with another program, so we can keep the session alive and use gnome-shell without seeing the fullscreen 'Something has gone wrong' message.

When gnome-session-failed shows, switch to another virtual console and find the PID of gnome-session-failed. Type the following commands to use gdb to replace it with cat. I use devel/gdb port because the version included in base crashes when I type 'attach'.

$ gdb710
(gdb) attach <pid_of_gnome_session_failed>
(gdb) p execl("/bin/cat", "cat", (char*)0)

Keep gdb running and switch back to the graphical virtual console and you can use gnome-shell without being blocked by the fullscreen message. You can use it to launch terminal and test '/usr/local/libexec/gnome-settings-daemon-localeexec &'. gnome-settings-daemon has to be run inside the graphical session.
Comment 13 jetmomo 2016-01-28 16:02:15 UTC
(In reply to Ting-Wei Lan from comment #12)
I got the result after '/usr/local/libexec/gnome-settings-daemon-localeexec &'.
Namely, "WARNING **: Name taken or bus went away - shutting down"
I did the aforementioned tests twice.
The results were identical.
What is that?
Thanks Lan.
Comment 14 jetmomo 2016-01-28 16:11:52 UTC
(In reply to jetmomo from comment #13)
By the way, I uploaded the gdm/session.log (http://pastebin.ca/3356331) for reference.
Wish it is helpful.
Comment 15 Ting-Wei Lan 2016-01-28 17:20:34 UTC
(In reply to jetmomo from comment #13)
Did gnome-settings-daemon process still run? I think you have to kill it before running it.
Comment 16 jetmomo 2016-01-29 02:10:35 UTC
(In reply to Ting-Wei Lan from comment #15)
Hi, Lan,
I had killed "gnome-settings-daemon" before "/usr/local/libexec/gnome-settings-daemon-localeexec &".
Please check the screenshot (http://imgur.com/STlrHFQ).
However, the result was identical (WARNING **: Name taken or bus went away - shutting down).
Comment 17 Koop Mast freebsd_committer 2016-01-29 14:48:45 UTC
remove freebsd-gnome@ it is a alias for gnome@ (or the other way around) and it sending dup mails to gnome@.
Comment 18 Ting-Wei Lan 2016-01-30 19:35:33 UTC
When it prints 'WARNING **: Name taken or bus went away - shutting down' and exits, is the name 'org.gnome.SettingsDaemon' already owned by other processes on your D-Bus session bus?

You can use d-feet to check it. Switch to the 'Session Bus' tab and search for 'org.gnome.SettingsDaemon'. It can show pid and cmd of the process. Unfortunately, it seems the version provided by FreeBSD ports is broken, and you may have to build it manually from upstream source: https://git.gnome.org/browse/d-feet.

If you don't want to use d-feet, you can use command 'gdbus call --session --dest=org.freedesktop.DBus --object-path=/org/freedesktop/DBus --method=org.freedesktop.DBus.ListNames' to get the list of name on the session bus. If you find the name 'org.gnome.SettingsDaemon' exists in the list without running gnome-settings-daemon, you can use command 'gdbus call --session --dest=org.freedesktop.DBus --object-path=/org/freedesktop/DBus --method=org.freedesktop.DBus.GetConnectionUnixProcessID org.gnome.SettingsDaemon' to get its pid and find the name of the process.
Comment 19 jetmomo 2016-01-31 13:20:47 UTC
(In reply to Ting-Wei Lan from comment #18)
Hi, Lan.
Regardless whether gnome-settings-daemon was deleted, 'gdbus call --session --dest=org.freedesktop.DBus --object-path=/org/freedesktop/DBus --method=org.freedesktop.DBus.ListNames' was failed.
The system showed "The connection is closed (http://imgur.com/91b71qC)."
Comment 20 Ting-Wei Lan 2016-01-31 19:14:54 UTC
Is DBUS_SESSION_BUS_ADDRESS environment variable set correctly? If it is not set, is the information stored in ~/.dbus/session-bus/<machine_id>-0 correct? You can use 'sockstat' command to find the process that creates the socket file. The process should be a session dbus-daemon run with your uid.
Comment 21 jetmomo 2016-02-01 13:21:06 UTC
(In reply to Ting-Wei Lan from comment #20)
Hi, Lan.
I saw nothing regarding org.gnome.SettingsDaemon.
I posted result here: http://pastebin.ca/3362507
I may use an incorrect debug method before.

I tried (/usr/local/libexec/gnome-settings-daemon-localeexec) again via user account instead of root.
Could you check this: http://pastebin.ca/3362510
Thanks for help.
Sorry for this trouble..
Comment 22 Ting-Wei Lan 2016-02-08 14:17:15 UTC
(In reply to jetmomo from comment #21)
The output you provided is correct. These warnings are expected because our colord is not fully working and we still don't have a systemd-logind API implementation.

Does gnome-settings-daemon keep running without crashes? Can you use ListNames and GetConnectionUnixProcessID after starting it with gnome-settings-daemon-localeexec?
Comment 23 jetmomo 2016-02-15 04:14:41 UTC
(In reply to Ting-Wei Lan from comment #22)
Thanks Lan,
It's sad to see this result.
Since the command was too complicated, I downgraded gnome3.16 to gnome 3.14.
Comment 24 Ting-Wei Lan 2016-02-15 07:26:52 UTC
GNOME 3.18 has been committed to ports. Do you want to test it?
Comment 25 jetmomo 2016-02-15 07:57:22 UTC
Sounds cool!
Ok. How to do? What's the repos_dir?
Thanks Lan.
Comment 26 Ting-Wei Lan 2016-02-15 13:07:38 UTC
If you use ports, you can build it now. If you use pkg, it should be available in latest repository in a few days.
Comment 27 jetmomo 2016-02-21 11:14:51 UTC
(In reply to Ting-Wei Lan from comment #26)
Hi, Lan.
I had tested gnome 3.18.
I still failed in accessing desktop.
The erroneous results were similar to gnome 3.16 (http://pastebin.ca/3362510).
Thanks for help.
Comment 28 w.schwarzenfeld freebsd_triage 2018-03-08 16:57:36 UTC
Is this still relevant?
Comment 29 stefanw 2018-07-05 09:53:50 UTC
Are there any news here? I am having this problem as well. I have read somewhere that adding a 'sleep 1' in '/usr/local/libexec/gnome-setting-daemon-localeexec' before the actual execution of gnome would fix the problem since it is supposed to be a deadlock of some sort. But that only fixes it for me sometimes. (https://forums.freebsd.org/threads/oh-no-something-has-gone-wrong-gnome3.60383/)