[gentoo-user] Re: What the devil?!! [or Plasma teething problems Ia.]

2019-07-01 Thread »Q«
On Fri, 28 Jun 2019 17:13:49 +0100
Mick  wrote:

> So, I'm surmising, dbus calls in polkit & pam, since you're logged
> in, which allows access to /sbin/shutdown.

Thanks for the explanation. :)





Re: [gentoo-user] Re: What the devil?!! [or Plasma teething problems Ia.]

2019-06-28 Thread Mick
On Friday, 28 June 2019 16:06:50 BST »Q« wrote:
> On Thu, 27 Jun 2019 12:42:56 +0100
> 
> Mick  wrote:
> > On Thursday, 27 June 2019 10:55:16 BST Mick wrote:
> > > The next thing to try:
> > > 
> > > I don't have elogind starting up as a boot level rc service,
> > > because it is launched when needed by dbus or pam.  Perhaps if
> > > elogind is running as a background service sddm will (re)launch
> > > differently?
> > 
> > I just tried it and it works.  :-)
> > 
> > With elogind running as a boot service, sddm launches with the
> > Shutdown/Reboot buttons shown and they work as expected.  However, as
> > I do not have a /usr/ bin/loginctl, all I can assume is irrespective
> > of the HaltCommand path specified in the default sddm config, when
> > launched sddm searches all paths and eventually finds /bin/loginctl,
> > which it runs when a button is pressed.
> > 
> > As we've established with no -elogind +consolekit the commands
> > specified in the default sddm config file are different.  Also, with
> > consolekit being a default rc service, it is running at the time sddm
> > is launched.
> 
> I use openrc, so I have sddm installed with -elogind -systemd
> +consolekit +pam.  Putting consolekit in the default runlevel does make
> the buttons work the first time sddm is launched, on reboot.
> 
> Without the conosolekit service in the default runlevel, the buttons
> are greyed out after reboot, but restarting xdm some time after booting,
> still without consolekit running, makes the buttons come alive and
> work.  

At this stage, when you are restarting xdm, you've logged in the console and 
(I'm guessing) dbus+polkit+pam are running even if consolekit is not.  
Consolekit is needed for multiple users, so it is not necessary for this 
purpose, although if it's already running I understand it helps with the 
authentication by calling on pam.  So, I'm surmising, dbus calls in polkit & 
pam, since you're logged in, which allows access to /sbin/shutdown.

 # ldd /usr/bin/sddm | grep dbus
libdbus-1.so.3 => /usr/lib64/libdbus-1.so.3 (0x7f537416)


> So there's something in play other than consolekit for me.
> 
> (I don't actually need to sort this out -- I'm just curious.)

It may have something to do with dbus/polkit, which authenticates access to 
the /sbin/shutdown file locally by sddm and this makes the buttons visible/
actionable.  If you have not logged in yet, after a reboot, then only dbus is 
running at that stage with no authentication mechanism.  I may be *wildly* 
wrong, but no doubt more knowledgeable members will drop by soon to correct 
me.

-- 
Regards,

Mick

signature.asc
Description: This is a digitally signed message part.


[gentoo-user] Re: What the devil?!! [or Plasma teething problems Ia.]

2019-06-28 Thread »Q«
On Thu, 27 Jun 2019 12:42:56 +0100
Mick  wrote:

> On Thursday, 27 June 2019 10:55:16 BST Mick wrote:
> 
> > The next thing to try:
> > 
> > I don't have elogind starting up as a boot level rc service,
> > because it is launched when needed by dbus or pam.  Perhaps if
> > elogind is running as a background service sddm will (re)launch
> > differently?  
> 
> I just tried it and it works.  :-)
> 
> With elogind running as a boot service, sddm launches with the
> Shutdown/Reboot buttons shown and they work as expected.  However, as
> I do not have a /usr/ bin/loginctl, all I can assume is irrespective
> of the HaltCommand path specified in the default sddm config, when
> launched sddm searches all paths and eventually finds /bin/loginctl,
> which it runs when a button is pressed.
> 
> As we've established with no -elogind +consolekit the commands
> specified in the default sddm config file are different.  Also, with
> consolekit being a default rc service, it is running at the time sddm
> is launched.

I use openrc, so I have sddm installed with -elogind -systemd
+consolekit +pam.  Putting consolekit in the default runlevel does make
the buttons work the first time sddm is launched, on reboot.

Without the conosolekit service in the default runlevel, the buttons
are greyed out after reboot, but restarting xdm some time after booting,
still without consolekit running, makes the buttons come alive and
work.  So there's something in play other than consolekit for me.

(I don't actually need to sort this out -- I'm just curious.)





Re: [gentoo-user] Re: What the devil?!! [or Plasma teething problems Ia.]

2019-06-27 Thread Mick
On Thursday, 27 June 2019 10:55:16 BST Mick wrote:

> The next thing to try:
> 
> I don't have elogind starting up as a boot level rc service, because it is
> launched when needed by dbus or pam.  Perhaps if elogind is running as a
> background service sddm will (re)launch differently?

I just tried it and it works.  :-)

With elogind running as a boot service, sddm launches with the Shutdown/Reboot 
buttons shown and they work as expected.  However, as I do not have a /usr/
bin/loginctl, all I can assume is irrespective of the HaltCommand path 
specified in the default sddm config, when launched sddm searches all paths 
and eventually finds /bin/loginctl, which it runs when a button is pressed.

As we've established with no -elogind +consolekit the commands specified in 
the default sddm config file are different.  Also, with consolekit being a 
default rc service, it is running at the time sddm is launched.

Thank you all for your responses.
-- 
Regards,

Mick

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Re: What the devil?!! [or Plasma teething problems Ia.]

2019-06-27 Thread Mick
On Thursday, 27 June 2019 02:18:05 BST Mike Gilbert wrote:
> On Wed, Jun 26, 2019, 7:30 PM Neil Bothwick  wrote:
> > On Wed, 26 Jun 2019 18:00:22 -0500, »Q« wrote:
> > > > In an OpenRC system there is no loginctl.  Consequently, unless we
> > > > define a separate config in /etc/ to use shutdown (with sudo?) it
> > > > won't work.  This systemd-ism may be worth a bug report.
> > > 
> > > In /usr/share/sddm/sddm.conf.d/00default.conf I have
> > > 
> > >   HaltCommand=/sbin/shutdown -h -P now
> > >   
> > >   RebootCommand=/sbin/shutdown -r now
> > > 
> > > I just checked it with sddm-0.18.0, then upgraded to 0.18.1-r1, and it
> > > stayed the same, I guess because I have USE="-systemd".
> > 
> > And on a systemd setup, I have
> > 
> > HaltCommand=/usr/bin/systemctl poweroff
> > 
> > so where did Mick's loginctl option come from?
> 
> elogind

Yes!  It seems elogind affects the commands in file /usr/share/sddm/
sddm.conf.d/00default.conf to use a different HaltCommand and RebootCommand:

$ egrep -i 'Halt|Reboot' /usr/share/sddm/sddm.conf.d/00default.conf 
# Halt command
HaltCommand=/usr/bin/loginctl poweroff
# Reboot command
RebootCommand=/usr/bin/loginctl reboot

Here's a kicker:  I do not have '/usr/bin/loginctl' in this (openrc + elogind, 
but -consolekit, -systemd) system:

$ which loginctl
/bin/loginctl

$ ls -la /usr/bin/loginctl
ls: cannot access '/usr/bin/loginctl': No such file or directory

$ /usr/bin/loginctl poweroff
-bash: /usr/bin/loginctl: No such file or directory

NOTE: Running '/bin/loginctl poweroff' from a console works.


So perhaps this explains why I also do not have Shutdown/Reboot buttons 
showing up on the default theme at the top RH corner?  Errm ... not so!  
Please walk through this test case with me:

1. I log out, or reboot.  The sddm DM screen shows no Shutdown/Reboot buttons.  
Consequently, I have no means of shutting down or rebooting from the DM 
screen.

2. I log out, drop into a console, stop the xdm rc service and restart it.  
The sddm screen launches and it now presents Shutdown/Reboot buttons as it 
should!

Question: if /usr/bin/loginctl is not present, what commands do the buttons 
operate/which config file they read, to shutdown/reboot?

NOTE: If I login/out, or reboot, the buttons are gone again.  :-/

3. I use KDE's systemsettings 'Startup and Shutdown/Login Screen (SDDM)' to 
change the default theme.  This creates a new /etc/sddm.conf file, with the 
new Theme entry I selected,  but the Halt/Reboot commands are empty.  I logout 
or reboot and the buttons are absent again, or when shown in the new theme 
they are either greyed out and do not work (Breeze) or not greyed out and 
still not work.

I have not tried setting up a config file in /etc/ and modifying it 
comprehensively, i.e. specifying my own theme, Halt/Reboot commands, etc., but 
I do not have a coherent theory why the above behaviour is observed.

The next thing to try:

I don't have elogind starting up as a boot level rc service, because it is 
launched when needed by dbus or pam.  Perhaps if elogind is running as a 
background service sddm will (re)launch differently?

-- 

Regards,

Mick

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Re: What the devil?!! [or Plasma teething problems Ia.]

2019-06-27 Thread Peter Humphrey
On Wednesday, 26 June 2019 16:16:36 BST Mick wrote:
> On Wednesday, 26 June 2019 15:22:45 BST Peter Humphrey wrote:
> > On Wednesday, 26 June 2019 11:20:20 BST Mick wrote:
> > > I just looked at another installation.  The default sddm configuration
> > > file (/usr/share/sddm/sddm.conf.d/00default.conf) shows this:
> > > 
> > > [General]
> > > # Halt command
> > > HaltCommand=/usr/bin/loginctl poweroff
> > > 
> > > In an OpenRC system there is no loginctl.  Consequently, unless we
> > > define
> > > a
> > > separate config in /etc/ to use shutdown (with sudo?) it won't work. 
> > > This
> > > systemd-ism may be worth a bug report.
> > 
> > Here, it shows 'HaltCommand=/sbin/shutdown -h -P now'.
> 
> Where 'here' is ... where?  :-)

# grep Halt /usr/share/sddm/sddm.conf.d/00default.conf
# Halt command
HaltCommand=/sbin/shutdown -h -P now

(I hadn't seen this message when I replied just now.)

-- 
Gentoo testing system
gcc 9.1.0, sys-kernel/gentoo-sources 5.1.15
QT 5.12.3, KDE frameworks 5.59.0, KDE plasma 5.16.2
KDE apps 19.04.2 incl KMail 19.04.2-r1 (5.11.2), akonadi 19.04.0
dev-db/mariadb-10.3.16
x11-drivers/xf86-video-amdgpu 19.0.0
dev-libs/amdgpu-pro-opencl 18.20.684755






Re: [gentoo-user] Re: What the devil?!! [or Plasma teething problems Ia.]

2019-06-26 Thread Mike Gilbert
On Wed, Jun 26, 2019, 7:30 PM Neil Bothwick  wrote:

> On Wed, 26 Jun 2019 18:00:22 -0500, »Q« wrote:
>
> > > In an OpenRC system there is no loginctl.  Consequently, unless we
> > > define a separate config in /etc/ to use shutdown (with sudo?) it
> > > won't work.  This systemd-ism may be worth a bug report.
> >
> > In /usr/share/sddm/sddm.conf.d/00default.conf I have
> >
> >   HaltCommand=/sbin/shutdown -h -P now
> >
> >   RebootCommand=/sbin/shutdown -r now
> >
> > I just checked it with sddm-0.18.0, then upgraded to 0.18.1-r1, and it
> > stayed the same, I guess because I have USE="-systemd".
>
> And on a systemd setup, I have
>
> HaltCommand=/usr/bin/systemctl poweroff
>
> so where did Mick's loginctl option come from?
>

elogind

>


Re: [gentoo-user] Re: What the devil?!! [or Plasma teething problems Ia.]

2019-06-26 Thread Neil Bothwick
On Wed, 26 Jun 2019 18:00:22 -0500, »Q« wrote:

> > In an OpenRC system there is no loginctl.  Consequently, unless we
> > define a separate config in /etc/ to use shutdown (with sudo?) it
> > won't work.  This systemd-ism may be worth a bug report.  
> 
> In /usr/share/sddm/sddm.conf.d/00default.conf I have 
> 
>   HaltCommand=/sbin/shutdown -h -P now
> 
>   RebootCommand=/sbin/shutdown -r now
> 
> I just checked it with sddm-0.18.0, then upgraded to 0.18.1-r1, and it
> stayed the same, I guess because I have USE="-systemd".  

And on a systemd setup, I have

HaltCommand=/usr/bin/systemctl poweroff

so where did Mick's loginctl option come from?


-- 
Neil Bothwick

By the time you can make ends meet, they move the ends.


pgpLgBtyOXhSI.pgp
Description: OpenPGP digital signature


[gentoo-user] Re: What the devil?!! [or Plasma teething problems Ia.]

2019-06-26 Thread »Q«
On Wed, 26 Jun 2019 11:20:20 +0100
Mick  wrote:

> On Tuesday, 25 June 2019 17:09:55 BST »Q« wrote:
> > On Mon, 24 Jun 2019 21:19:09 +0100
> > 
> > Mick  wrote:  

> > > Also, the sddm DM shutdown/reboot buttons now do not work. O_O  
> > 
> > Those have never worked for me.  
> 
> I just looked at another installation.  The default sddm
> configuration file (/ usr/share/sddm/sddm.conf.d/00default.conf)
> shows this:
> 
> [General]
> # Halt command
> HaltCommand=/usr/bin/loginctl poweroff
> 
> In an OpenRC system there is no loginctl.  Consequently, unless we
> define a separate config in /etc/ to use shutdown (with sudo?) it
> won't work.  This systemd-ism may be worth a bug report.

In /usr/share/sddm/sddm.conf.d/00default.conf I have 

  HaltCommand=/sbin/shutdown -h -P now

  RebootCommand=/sbin/shutdown -r now

I just checked it with sddm-0.18.0, then upgraded to 0.18.1-r1, and it
stayed the same, I guess because I have USE="-systemd".  








Re: [gentoo-user] Re: What the devil?!! [or Plasma teething problems Ia.]

2019-06-26 Thread Daniel Frey

On 6/26/19 8:16 AM, Mick wrote:

On Wednesday, 26 June 2019 15:22:45 BST Peter Humphrey wrote:

On Wednesday, 26 June 2019 11:20:20 BST Mick wrote:

I just looked at another installation.  The default sddm configuration
file (/usr/share/sddm/sddm.conf.d/00default.conf) shows this:

[General]
# Halt command
HaltCommand=/usr/bin/loginctl poweroff

In an OpenRC system there is no loginctl.  Consequently, unless we define
a
separate config in /etc/ to use shutdown (with sudo?) it won't work.  This
systemd-ism may be worth a bug report.


Here, it shows 'HaltCommand=/sbin/shutdown -h -P now'.


Where 'here' is ... where?  :-)

Your own /etc/sddm/ configuration file, or the default installed under /usr/
share/sddm/sddm.conf.d/ ?

The sddm package no longer installs a config file in etc.  The user may do so
if desired/required and modify it accordingly.  However, the sample file
offered by sddm has the above mentioned incongruity in it, which means the
shutdown and reboot commands issued by its interface invariably do not work in
openrc and it seems the same applies to systemd.

I'll check a couple more of my installations here to see if they differ.



I don't have any /etc/sddm.conf - it's all default config and mine is 
working with no tweaking (OpenRC). Same as mentioned above in the 
default config file: HaltCommand=/sbin/shutdown -h -P now


Dan



Re: [gentoo-user] Re: What the devil?!! [or Plasma teething problems Ia.]

2019-06-26 Thread Mick
On Wednesday, 26 June 2019 15:22:45 BST Peter Humphrey wrote:
> On Wednesday, 26 June 2019 11:20:20 BST Mick wrote:
> > I just looked at another installation.  The default sddm configuration
> > file (/usr/share/sddm/sddm.conf.d/00default.conf) shows this:
> > 
> > [General]
> > # Halt command
> > HaltCommand=/usr/bin/loginctl poweroff
> > 
> > In an OpenRC system there is no loginctl.  Consequently, unless we define
> > a
> > separate config in /etc/ to use shutdown (with sudo?) it won't work.  This
> > systemd-ism may be worth a bug report.
> 
> Here, it shows 'HaltCommand=/sbin/shutdown -h -P now'.

Where 'here' is ... where?  :-)

Your own /etc/sddm/ configuration file, or the default installed under /usr/
share/sddm/sddm.conf.d/ ?

The sddm package no longer installs a config file in etc.  The user may do so 
if desired/required and modify it accordingly.  However, the sample file 
offered by sddm has the above mentioned incongruity in it, which means the 
shutdown and reboot commands issued by its interface invariably do not work in 
openrc and it seems the same applies to systemd.

I'll check a couple more of my installations here to see if they differ. 
-- 
Regards,

Mick

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Re: What the devil?!! [or Plasma teething problems Ia.]

2019-06-26 Thread Peter Humphrey
On Wednesday, 26 June 2019 11:20:20 BST Mick wrote:

> I just looked at another installation.  The default sddm configuration file
> (/ usr/share/sddm/sddm.conf.d/00default.conf) shows this:
> 
> [General]
> # Halt command
> HaltCommand=/usr/bin/loginctl poweroff
> 
> In an OpenRC system there is no loginctl.  Consequently, unless we define a
> separate config in /etc/ to use shutdown (with sudo?) it won't work.  This
> systemd-ism may be worth a bug report.

Here, it shows 'HaltCommand=/sbin/shutdown -h -P now'.

-- 
Regards,
Peter.






Re: [gentoo-user] Re: What the devil?!! [or Plasma teething problems Ia.]

2019-06-26 Thread Neil Bothwick
On Wed, 26 Jun 2019 11:20:20 +0100, Mick wrote:

> I just looked at another installation.  The default sddm configuration
> file (/ usr/share/sddm/sddm.conf.d/00default.conf) shows this:
> 
> [General]
> # Halt command
> HaltCommand=/usr/bin/loginctl poweroff
> 
> In an OpenRC system there is no loginctl.  Consequently, unless we
> define a separate config in /etc/ to use shutdown (with sudo?) it won't
> work.  This systemd-ism may be worth a bug report.

It won't work on systemd either, loginctl has no poweroff command, it
should be systemctl poweroff, which is symlinked to /sbin/poweroff here
so setting it to that should work for modern and ancient systems alike :P


-- 
Neil Bothwick

Nothing is foolproof to a sufficiently talented fool.


pgpvmhIqFbV8R.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] Re: What the devil?!! [or Plasma teething problems Ia.]

2019-06-26 Thread Mick
On Tuesday, 25 June 2019 17:09:55 BST »Q« wrote:
> On Mon, 24 Jun 2019 21:19:09 +0100
> 
> Mick  wrote:
> > Can someone please explain how the removal of the 'wireless' USE flag
> > from powerdevil ends up with no buttons for Suspend-to-RAM,
> > Hibernation, Reboot or Shutdown under the Leave tab of the KMenu?
> > What does wireless have to do with those functions which should work
> > regardless?
> 
> I have the wireless flag on, and I'm sometimes missing those buttons.
> I've never figured out why, but they usually return after I log out of
> KDE and back in -- sometimes it takes a reboot.

I've come across the same symptoms on various installations of mine.  However, 
I thought in all cases this was because I was in the middle of an update.  
Anyway, after a prolonged revdep-rebuild, which reinstalled dbus plus another 
21 packages, it seems all buttons are back and I can shutdown and hibernate.  
I have no idea why a revdep-rebuild wanted to rebuild all these packages ... 
but clearly something I did (like uninstalling/reinstalling plasma-meta, or 
changing package specific USE flags?) meant all these needed to be rebuilt.  I 
didn't expect this - thank you Dale for nudging me in the right direction and 
thank you all for your suggestions.  :-)

Next time I login I'll also check if the missing Power Management module 
mentioned in systemsettings has resolved itself.


> > Also, the sddm DM shutdown/reboot buttons now do not work. O_O
> 
> Those have never worked for me.

I just looked at another installation.  The default sddm configuration file (/
usr/share/sddm/sddm.conf.d/00default.conf) shows this:

[General]
# Halt command
HaltCommand=/usr/bin/loginctl poweroff

In an OpenRC system there is no loginctl.  Consequently, unless we define a 
separate config in /etc/ to use shutdown (with sudo?) it won't work.  This 
systemd-ism may be worth a bug report.

-- 
Regards,
Mick

signature.asc
Description: This is a digitally signed message part.


[gentoo-user] Re: What the devil?!! [or Plasma teething problems Ia.]

2019-06-25 Thread »Q«
On Mon, 24 Jun 2019 21:19:09 +0100
Mick  wrote:

> Can someone please explain how the removal of the 'wireless' USE flag
> from powerdevil ends up with no buttons for Suspend-to-RAM,
> Hibernation, Reboot or Shutdown under the Leave tab of the KMenu?
> What does wireless have to do with those functions which should work
> regardless?

I have the wireless flag on, and I'm sometimes missing those buttons.
I've never figured out why, but they usually return after I log out of
KDE and back in -- sometimes it takes a reboot.

> Also, the sddm DM shutdown/reboot buttons now do not work. O_O

Those have never worked for me.