Artix Linux Forum

Artix Linux => Installation / Migration / Configuration => Topic started by: saleem on 06 February 2020, 10:32:18

Title: sddm on s6
Post by: saleem on 06 February 2020, 10:32:18
How to enable sddm on s6 so it starts on system boot ?
Title: Re: sddm on s6
Post by: saleem on 06 February 2020, 11:12:05
I tried enabling it with following command and get error

# s6-rc-bundle-update add default sddm
s6-rc: fatal: unable to read /run/s6-rc/state: Broken pipe

Attached picture shows when I tried executing this command from chroot environment to enable sddm
Title: Re: sddm on s6
Post by: ndowens on 06 February 2020, 16:39:00
I recommend to try different install method. As mentioned in TG you are getting more errors than just s6 and 2nd time with chroot install.  Boot from a Artix iso and use the graphical installer or install manually following guide
Title: Re: sddm on s6
Post by: Dudemanguy on 06 February 2020, 17:39:46
Ah, this actually exposes a subtle issue with the s6-rc-bundle-update that should be fixed. A couple things here.

First, s6-rc-bundle-update only works on existing bundles. If you use it on one that doesn't exist, it will give you an error message. That's normally what should have happened here. However, the call to s6-rc-bundle within the script itself failed. This is because you're in a chroot environment and the s6-rc-bundle-update script operates on live databases only. You aren't actually running a live database, you want to edit a compiled one. In that case, you need to execute a command like (note that you probably need elogind for sddm to work) within chroot.

Code: [Select]
# s6-rc-bundle -c /etc/s6/rc/compiled add default sddm elogind

Anyways, on our end, we basically just need to add the "-c" argument to everything in s6-rc-bundle-update so you can use it within a chroot environment as well.
Title: Re: sddm on s6
Post by: saleem on 06 February 2020, 18:15:00
Ah, this actually exposes a subtle issue with the s6-rc-bundle-update that should be fixed. A couple things here.

First, s6-rc-bundle-update only works on existing bundles. If you use it on one that doesn't exist, it will give you an error message. That's normally what should have happened here. However, the call to s6-rc-bundle within the script itself failed. This is because you're in a chroot environment and the s6-rc-bundle-update script operates on live databases only. You aren't actually running a live database, you want to edit a compiled one. In that case, you need to execute a command like (note that you probably need elogind for sddm to work) within chroot.

Code: [Select]
# s6-rc-bundle -c /etc/s6/rc/compiled add default sddm elogind

Anyways, on our end, we basically just need to add the "-c" argument to everything in s6-rc-bundle-update so you can use it within a chroot environment as well.

Thanks for reply ,

I tried from chroot the above command and got error for elogind becuse I had enabled previously ( though i guess it wasnt enabled correctly )

# s6-rc-bundle -c /etc/s6/rc/compiled add default elogind dhcpcd
s6-rc-bundle: fatal: identifier default already exists in database /etc/s6/rc/compiled

how to remove all three i.e sddm dhcpcd and elogind and re add them again?
Title: Re: sddm on s6
Post by: Dudemanguy on 06 February 2020, 18:16:19
You'll have to manually delete it with s6-rc-bundle -c /etc/s6/rc/compiled delete default and then you can run the s6-rc-bundle add command again.
Title: Re: sddm on s6
Post by: saleem on 06 February 2020, 18:34:06
You'll have to manually delete it with s6-rc-bundle -c /etc/s6/rc/compiled delete default and then you can run the s6-rc-bundle add command again.

Followed these commands and got things added , fired up system but did not get any display manager , startx crashes once again

here is xorg log
https://nopaste.xyz/?5198bae4cb265462#SG1aeBPfjstMJUm4L/ObwBKJWx3qcoBnWa4WrB4Eiu8=

I am wondering why is this log not present in /var/log directory , I got this log from /.local/share/xorg/ rather
Title: Re: sddm on s6
Post by: Dudemanguy on 06 February 2020, 18:43:17
Xorg logs are on .local since people don't run it as root anymore. That part is normal.

It looks like your user is not allowed to access /dev/dri/card0 which means no graphics. Try adding yourself to the video group and then logging out and back in?
Title: Re: sddm on s6
Post by: saleem on 06 February 2020, 18:52:50
Xorg logs are on .local since people don't run it as root anymore. That part is normal.

It looks like your user is not allowed to access /dev/dri/card0 which means no graphics. Try adding yourself to the video group and then logging out and back in?

Here is what  I did now

# usermod -a -G video saleem
usermod: group 'video' does not exist
# groupadd video
# usermod -a -G video saleem

Will reboot and test

I normally follow this command for adding user on Arch Linux

# useradd -m -g users -G adm,lp,scanner,audio,video,rfkill,optical,storage,network,power,games,wheel -s /bin/bash user

But on Artix wiki this command has been mentioned

# useradd -m user

may be this is the reason user is not added to groups


Title: Re: sddm on s6
Post by: saleem on 06 February 2020, 19:28:21
no success and im clueless now
Title: Re: sddm on s6
Post by: Dudemanguy on 06 February 2020, 21:06:27
Hmm, are you certain elogind is running properly? Try "loginctl" and see if you have a session (you should though). Is the xorg log different now than it was before?
Title: Re: sddm on s6
Post by: saleem on 07 February 2020, 09:37:11
Hmm, are you certain elogind is running properly? Try "loginctl" and see if you have a session (you should though). Is the xorg log different now than it was before?

1) I am not sure if elogind is running or not ...how to confirm it?

Here is the output to loginctl

# loginctl

Failed to create bus connection : No such file or directory


2) Latest Xorg log

https://nopaste.xyz/?97096aaf9c2defa9#JAZlaPrxzToK0fR7pzMoDpZPsljohuQntg48o5nY1JI=

3)
I cant reboot or poweroff system both as user or root once I login to either on tty2 and not even by keeping poweroff button pressed for infinite time , only by removing battery I can re use laptop ( what is causing this ? )

Title: Re: sddm on s6
Post by: nous on 07 February 2020, 10:01:29
Install xorg-xwrapper and retry.
Title: Re: sddm on s6
Post by: saleem on 07 February 2020, 10:22:56

Did it now , was missing but did not help either.
Title: Re: sddm on s6
Post by: Dudemanguy on 07 February 2020, 17:21:34
1) I am not sure if elogind is running or not ...how to confirm it?

Here is the output to loginctl

# loginctl

Failed to create bus connection : No such file or directory

Well now you know that elogind isn't running properly on your machine. No wonder you can't start xorg. ;)

A simple "s6-rc -u change elogind" should bring the service up. After logging out and back in, "loginctl" should show a session with your username. If it still does not, then something else is wrong. elogind-s6 depends on dbus-s6, so check to see if you have dbus running as well ("ps aux | grep dbus-daemon"). If you don't see anything there, you can try "s6-rc -u change dbus" to start it manually.


Quote
I cant reboot or poweroff system both as user or root once I login to either on tty2 and not even by keeping poweroff button pressed for infinite time , only by removing battery I can re use laptop ( what is causing this ? )

This definitely doesn't sound right. Try reinstalling s6-linux-init (it remakes the poweroff/reboot/etc. binaries) if you haven't already.
Title: Re: sddm on s6
Post by: saleem on 07 February 2020, 18:21:06
Well now you know that elogind isn't running properly on your machine. No wonder you can't start xorg. ;)

A simple "s6-rc -u change elogind" should bring the service up. After logging out and back in, "loginctl" should show a session with your username. If it still does not, then something else is wrong. elogind-s6 depends on dbus-s6, so check to see if you have dbus running as well ("ps aux | grep dbus-daemon"). If you don't see anything there, you can try "s6-rc -u change dbus" to start it manually.


This definitely doesn't sound right. Try reinstalling s6-linux-init (it remakes the poweroff/reboot/etc. binaries) if you haven't already.

I tried both the commands as shown in image attached and things do not seem right

https://ibb.co/vXPHTqT

s6-linux-init is already installed
Title: Re: sddm on s6
Post by: Dudemanguy on 07 February 2020, 19:26:02
Something is very broken and wrong in your install. It looks like s6-rc isn't even running to me. Do you have a /run/s6-rc/state file?


Just install it again.
Title: Re: sddm on s6
Post by: saleem on 07 February 2020, 19:41:51
Something is very broken and wrong in your install. It looks like s6-rc isn't even running to me. Do you have a /run/s6-rc/state file?

Just install it again.

 Do you have a /run/s6-rc/state file?

No , run directory is blank

Just install it again.

ok
Title: Re: sddm on s6
Post by: Dudemanguy on 07 February 2020, 19:59:02

Wait, are you still in chroot or something? If you want to actually use s6-rc, you need to get out of the live usb and actually reboot the machine.
Title: Re: sddm on s6
Post by: saleem on 07 February 2020, 20:04:21
Wait, are you still in chroot or something? If you want to actually use s6-rc, you need to get out of the live usb and actually reboot the machine.

I checked this directory from my arch linux to see if i have any contents in it or not .

All the previous commands I checked and pasted back where booting to artix with s6

to check this directory on artix would mean I have to remove battery once again to be able to reboot/restart pc so i checked  it from my arch linux
Title: Re: sddm on s6
Post by: Dudemanguy on 07 February 2020, 21:31:16
Ah, well I don't know what's up with your power up/power down issues. Forcibly shuttting down by holding the power button is totally hardware and has nothing to do with OS, init, etc.