Subject: Re: bug#57589: Guix hands on GDM with wayland

From: Grigory Shepelev <[email-masked]>
Date: Mon, 12 Dec 2022 03:56:10 +0000

> Like Grigory, I also have my /tmp directory mounted as tmpfs
As I've written I am not having this anymore. Deleting exactly this part
helped me to be able to launch Gnome on Wayland properly.

> Can you share your 'loginctl show-user gdm' and 'loginctl show-session
<GDM session here>' output (before logging in with gdm, you can do this via
ssh or switch to another tty) and your system specs/GPU make?

Sure. The machine is a Thinkpad T480, i5-8350U, UHD Graphics 620 (KBL GT2).
```
shegeley@zone51 ~$ sudo loginctl list-sessions
Password:
SESSION  UID USER     SEAT  TTY
     c2 1002 shegeley seat0 tty8
1 sessions listed.
shegeley@zone51 ~$ sudo loginctl show-user gdm
shegeley@zone51 ~$ loginctl show-session c2
Id=c2
User=1002
Name=shegeley
Timestamp=Thu 2022-12-01 12:30:54 +06
TimestampMonotonic=30296910
VTNr=8
Seat=seat0
TTY=tty8
Remote=no
Service=gdm-password
Leader=1752
Audit=4294967295
Type=wayland
Class=user
Active=yes
State=active
IdleHint=no
IdleSinceHint=1669886111929701
IdleSinceHintMonotonic=9888259624
LockedHint=no
```

> I've wrote a small guix system test for testing out this tmpfs theory at
https://issues.guix.gnu.org/59739 and so far, all the tests pass, with or
without /tmp as tmpfs mount.

Those tests are good, but I guess the problem is kinda "deeper". I am not
sure but my /tmp dir disappears time-to-time and I don't know the exact
conditions for disappearing for now. Seems like it's a guix pull but it
also sometimes just gone even though I didn't pull. I recommend you to try
deleting this tmpfs part completely and see the result yourself.

вт, 22 нояб. 2022 г. в 01:35, Grigory Shepelev <[email-masked]>:

> /tmp dir also won't exist on guix pull and then system reconfigure.
>
> пн, 21 нояб. 2022 г. в 06:50, Grigory Shepelev <[email-masked]>:
>
>> When I log in with "Gnome on xorg" the /tmp directory doesn't exist. When
>> I log in "Gnome" (+Wayland) it exits.
>>
>> пн, 21 нояб. 2022 г. в 02:43, Grigory Shepelev <[email-masked]>:
>>
>>> Figured out what was the problem. The /tmp dir. Once I had nonexisting
>>> /mnt dir on Guix boot. So I've added this piece In my file-systems:
>>>
>>> (file-system
>>>   (mount-point "/tmp")
>>>   (device "tmp")
>>>   (type "tmpfs")
>>>   (check? #f))
>>>
>>> This exact piece was causing a problem. Seems like it's connected to
>>> x11-socket-directory-service from (gnu services desktop). So, maybe the
>>> tmpdir was mounted after GDM boot and override the needed /tmp settings.
>>>
>>> вт, 1 нояб. 2022 г. в 15:55, Grigory Shepelev <[email-masked]>:
>>>
>>>> Update. I can log into "Gnome on Xorg", change ownership of
>>>> /tmp/.X11-unix to root:gdm, log out, and them login into "Gnome". This will
>>>> enable Wayland.
>>>>
>>>> вт, 6 сент. 2022 г. в 11:05, Grigory Shepelev <[email-masked]>:
>>>>
>>>>> Creating new user didn't helped.
>>>>>
>>>>> I created new user (did this Guix way, via adding to config and
>>>>> reconfiguring the system) and logged it as a new user. Still X11
>>>>> system
>>>>> displays with `xrandr`, and `echo $XDG_SESSION_TYPE`. I don't think
>>>>> there is a need to try moving all home files, creating new user should
>>>>> be enough to test provided option.
>>>>>
>>>>> Although I noticed a gear icon below in the right of the gdm screen
>>>>> when
>>>>> logging in as a default user (saw that in Ubuntu) with options "GNOME"
>>>>> or "GNOME on Xorg". Trying to login in "GNOME" (Wayland supposedly)
>>>>> gives a black screen for ~2s.  After couple attempts logged back into
>>>>> "GNOME on Xorg".
>>>>>
>>>>> Attached logs again. They says something about DBUS. Any ideas?
>>>>>
>>>>> ---
>>>>>
>>>>> (gsd-keyboard:5189): dbind-WARNING **: 13:35:36.273: AT-SPI: Error
>>>>> retrieving accessibility bus address:
>>>>> org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was
>>>>> not
>>>>> provided by any .service files
>>>>> (gsd-xsettings:5219): dbind-WARNING **: 13:35:36.476: AT-SPI: Error
>>>>> retrieving accessibility bus address:
>>>>> org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was
>>>>> not
>>>>> provided by any .service files
>>>>> GNOME Shell-Message: 13:35:36.777: Registering session with GDM
>>>>> The XKEYBOARD keymap compiler (xkbcomp) reports:
>>>>>  > Warning:          Unsupported maximum keycode 708, clipping.
>>>>>  >                   X11 cannot support keycodes above 255.
>>>>> Errors from xkbcomp are not fatal to the X server
>>>>> (gnome-shell:5099): mutter-WARNING **: 13:36:02.454: Connection to
>>>>> xwayland lost
>>>>> ---
>>>>>
>>>>> On 05.09.2022 20:55, Grigory Shepelev wrote:
>>>>> > Had some info from Guix Matrix channel:
>>>>> > > GDM does wayland too with the option set to #t. I was able to get
>>>>> it
>>>>> > to work going back from sddm, but I had to remove the home folder
>>>>> and
>>>>> > recreate it from scratch, since gnome session was crashing on login.
>>>>> I
>>>>> > had no problem starting gnome on a new account so i figured
>>>>> something
>>>>> > was hanging around that cause a problem even after deleting all
>>>>> caches
>>>>> > and configs etc.
>>>>> > > By “home folder” I mean my user’s directory /home/use
>>>>> >
>>>>> >
>>>>> https://matrix.to/#/!jivGmMiiorFwdgwaxc:matrix.org/$W4HJQCzv8G0aHM3_PAFrtUaj6Q3aS18vMZCwlMch71I?via=matrix.org&via=hummingbard.com&via=privacytools.io
>>>>> > <
>>>>> https://matrix.to/#/!jivGmMiiorFwdgwaxc:matrix.org/$W4HJQCzv8G0aHM3_PAFrtUaj6Q3aS18vMZCwlMch71I?via=matrix.org&via=hummingbard.com&via=privacytools.io>
>>>>>
>>>>> >
>>>>> >
>>>>> > Most likely will try for new user tomorrow
>>>>> >
>>>>> > пн, 5 сент. 2022 г., 16:24 Grigory Shepelev <[email-masked]>:
>>>>> >
>>>>> >    Oops. I accidentally replied privately to [email-masked], not
>>>>> >    mentioning [email-masked]. I hope the history can be
>>>>> recovered
>>>>> >    from this message.
>>>>> >
>>>>> >    Josselin recommended to
>>>>> >
>>>>> >    - check permissions on /tmp/.X11-unix/ (gdm user should have r+w
>>>>> >    permissions)
>>>>> >
>>>>> >          shegeley@zone51 /tmp$ ls -lah .X11-unix/
>>>>> >          total 0
>>>>> >          drwxrwxrwt 2 gdm      gdm    80 сен  5 16:12 ./
>>>>> >          drwxrwxrwt 6 root     root  160 сен  5 16:16 ../
>>>>> >          srwxrwxrwx 1 shegeley users   0 сен  5 16:12 X1
>>>>> >          srwxr-xr-x 1 gdm      gdm     0 сен  5 16:12 X1024
>>>>> >
>>>>> >    -  check /var/lib/gdm/, doesn't have the proper permissions
>>>>> >
>>>>> >         Hm. That's really strange. For some reason /var/lib/gdm had
>>>>> >         "transmission" as user-group. I assure you that I didn't
>>>>> > explicitly
>>>>> >         do any "dirty stuff" like that permission changing in my
>>>>> config
>>>>> >
>>>>> >
>>>>> >         shegeley@zone51 /tmp$ sudo ls -lah /var/lib/gdm
>>>>> >         total 0
>>>>> >         drwx------ 1 gdm  gdm           38 авг 26 21:46 .
>>>>> >         drwxr-xr-x 1 root root         248 авг 28 18:37 ..
>>>>> >         drwxr-xr-x 1  973 transmission  62 авг 26 21:46 .cache
>>>>> >         drwx------ 1  973 transmission  44 авг 26 21:46 .config
>>>>> >         drwx------ 1  973 transmission  10 авг 26 21:46 .local
>>>>> >         shegeley@zone51 /tmp$ sudo chown -R gdm:gdm /var/lib/gdm
>>>>> >         shegeley@zone51 /tmp$ sudo ls -lah /var/lib/gdm
>>>>> >         total 0
>>>>> >         drwx------ 1 gdm  gdm   38 авг 26 21:46 .
>>>>> >         drwxr-xr-x 1 root root 248 авг 28 18:37 ..
>>>>> >         drwxr-xr-x 1 gdm  gdm   62 авг 26 21:46 .cache
>>>>> >         drwx------ 1 gdm  gdm   44 авг 26 21:46 .config
>>>>> >         drwx------ 1 gdm  gdm   10 авг 26 21:46 .local
>>>>> >
>>>>> >
>>>>> >    After changing it was able to launch into GDM, but with X11 as
>>>>> display
>>>>> >    manager :( Attached new logs.
>>>>> >
>>>>> >
>>>>> >    On 05.09.2022 10:23, Josselin Poiret wrote:
>>>>> >     > Hi again,
>>>>> >     >
>>>>> >     > Grigory Shepelev<[email-masked]> writes:
>>>>> >     >
>>>>> >     >> My config is heavily depends on it's directory (passing it
>>>>> with
>>>>> >     >> --load-path). I can (and will) publish it all (I've been
>>>>> >    planning to do
>>>>> >     >> so) but I'd like to polish few parts.
>>>>> >     >>
>>>>> >     >> Any exact part are you looking for in config?  I attached my
>>>>> >    system-wide
>>>>> >     >> services.
>>>>> >     > I asked for that partly because it helps identifying common
>>>>> >    errors, and
>>>>> >     > it's always better for people debugging to have access to all
>>>>> the
>>>>> >     > information, and partly because I couldn't see anything that
>>>>> >    could help
>>>>> >     > in the logs.  However, it seems mutter can't write into
>>>>> >    /tmp/.X11-unix/,
>>>>> >     > could you check that the gdm user has the permission to write
>>>>> >    there?  It
>>>>> >     > should be rwxrwxrwx.  I don't see any modification in your
>>>>> config
>>>>> >    that
>>>>> >     > would prevent the x11-socket-directory-service from
>>>>> >    %desktop-services to
>>>>> >     > run.  Also, it seems that /var/lib/gdm/ doesn't have the proper
>>>>> >     > permissions, maybe because of [1].  You can try `sudo chown -R
>>>>> >    gdm:gdm
>>>>> >     > /var/lib/gdm` to fix that.
>>>>> >     >
>>>>> >     > [1]https://issues.guix.gnu.org/36508
>>>>> >     >
>>>>> >     > HTH.
>>>>> >
>>>>
>>>>