:: Re: [devuan-dev] Possible bug on xs…
Etusivu
Poista viesti
Vastaa
Lähettäjä: Antonio Rendina
Päiväys:  
Vastaanottaja: devuan developers internal list
Aihe: Re: [devuan-dev] Possible bug on xscreensaver
Hi Mark

Il 25/10/22 09:06, Mark Hindley ha scritto:
> Antonio,
>
> Many thanks for this and welcome to Devuan!
>
> I think there are 2 distinct issues here.
>
> On Sat, Oct 22, 2022 at 06:44:09PM +0200, Antonio Rendina wrote:
>> When I leave the system on its own at some point it should go on
>> suspend-mode. But this was not happening, so I started to dig in. In my
>> understanding, the suspend mode is set by xfce4-power-manager but is handled
>> by elogind. I noticed that xscreensaver is compiled with libsystemd and it
>> generates a binary called xscreensaver-systemd that was actually running on
>> my laptop.
>> My theory is that xscreensaver is calling the api, but systemd is not there
>> and so it generates the error that is blocking my laptop from going into
>> suspend mode.
>
> I doubt this. Reading man xscreensaver-systemd(1), it is specifically for both
> systemd and elogind integration. That sounds like Devuan elogind systems might
> find it useful, at least sometimes.
>
> In terms of its function the manpage also says:
>
>    * When another process on the system asks for the screen saver to be inhibited
>      (e.g. because a video is playing) this program periodically runs
>      xscreensaver-command -deactivate to keep the display un-blanked.  It does
>      this until the other program asks for it to stop, or exits.  It does this
>      through the org.freedesktop.ScreenSaver(5) D-Bus interface.

>
> I suspect this may be the cause of your laptop not suspending. I suggest
> monitoring the bus and seeing if anything might be sending thoses messages.


I found the problem, you were right, it's not a bug and it's not related
to systemd. It was a communication issue between xscreensaver and
xfce4-power-manager.
I started monitoring dbus and I found nothing. So I put down
xscreensaver and checked if xfce4-power-manager was working and it was.
I put both in debug/verbose mode, and at some point I saw that
xfce4-power-manager was throwing an error related to send the lock
command to the screensaver. Looking at the configuration I saw that the
flag related to lock the system when going in suspend mode was checked.
So I realized that xfce4-power-manager was sending the wrong command to
xscreensaver trying to tell it to lock itself. I did the proper
configuration with xfconf-query and it started to work.
I also realized why it was working with the version without systemd.
Because there was no xscreensaver-systemd in place to throw the error
and the command sent by xfce4-power-manager was going unanswered.
>
>> IMHO, we should work on cleaning software from libsystemd, and I could take
>> care of this one, and maybe other packages considering that I'm learning how
>> to do that.
>
> This has been discussed on several occassions. For Devuan Jessie, libsystemd0
> integration was removed. Since ascii, it has generally been left intact as
> either non-functional and not worth the considerable time and effort to remove
> and maintain or potentially useful to desktop systems now optional runtime
> logind functionality is available via elogind.
>
> The libelogind0 api is binary equivalent with libsystemd0 and so we don't have
> to recompile anything.
>
>> I don't know if you agree with that, I mean it's Devuan purpose to not use
>> systemd as init system, but I don't actually know how is your discussion
>> about using it as a library. Should we clean up at least the base system?
>
> The exception to this is been apt and we fork that not to depend on libsystemd0
> to minimise dependencies and potential for breakage.
>
> It, perhaps, depends on what you mean by base system here. Console only server?
> Certainly that was the driver for forking apt. Or do you mean desktop base
> system?


In that case I meant a minimum devuan system able to work. Like for
example, we have LVM linked to libsystemd0, that, makes the system
vulnerable to all bugs that can be related to libsystem0.
The general idea (IMHO) should be to use the libraries only when there
is added value, in this case we are carrying pieces of code that are not
useful to the system and that may carry bugs and security concerns.
But I understand that is also a balance between work and available energies.

>
>> BTW, this is a bug to me, so if you agree, I would also like to open a bug
>> and provide the solution, but I will need a bit of help about how to do it.
>
> See man reportbug(1) to help you format and send an email to
> https://bugs.devuan.org.
>
> Best wishes
>
> Mark


Thanks for the clarification and the help on the screensaver, it gave me
the idea about how to troubleshoot it.

Regards,
Antonio