Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] Another Debian install, another Redshift problem

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
Lysander
Posts: 643
Joined: 2017-02-23 10:07
Location: London
Been thanked: 1 time

[Solved] Another Debian install, another Redshift problem

#1 Post by Lysander »

I recently reinstalled Debian 11 with Xfce but cannot get Redshift or ANY nightlight program like gammastep or sct to work.

They always just say "can't connect to Wayland".

Are they any night light programs that work under Wayland?

EDIT: Failing that, I would happily switch back to X11, but cannot work out how to do this either in Xfce. Any assistance would be greatly appreciated.
Last edited by Lysander on 2023-03-29 14:11, edited 1 time in total.

dlu2021
Posts: 198
Joined: 2021-08-13 19:55
Location: Minnesota
Has thanked: 7 times
Been thanked: 37 times

Re: [Software] Another Debian install, another Redshift problem

#2 Post by dlu2021 »

xfce doesn't use wayland, so you are already using X11.

User avatar
Lysander
Posts: 643
Joined: 2017-02-23 10:07
Location: London
Been thanked: 1 time

Re: [Software] Another Debian install, another Redshift problem

#3 Post by Lysander »

dlu2021 wrote: 2023-03-29 12:53 xfce doesn't use wayland, so you are already using X11.
Then why am I getting this error message when attempting to run gammastep?

Code: Select all

Error: Could not connect to wayland display, exiting 
Error: Failed to start adjustment method: wayland

CynicalDebian
Posts: 263
Joined: 2023-03-02 05:26
Location: USA
Has thanked: 50 times
Been thanked: 60 times
Contact:

Re: [Software] Another Debian install, another Redshift problem

#4 Post by CynicalDebian »

Lysander wrote: 2023-03-29 13:11
dlu2021 wrote: 2023-03-29 12:53 xfce doesn't use wayland, so you are already using X11.
Then why am I getting this error message when attempting to run gammastep?

Code: Select all

Error: Could not connect to wayland display, exiting 
Error: Failed to start adjustment method: wayland
You probably have just misconfigured Gammastep I am unfamiliar with the program but you likely manually need to set its adjustment method!

Redshift I have tested and working on X11, but in Bullseye and it maybe has some bugs. I can help you with Redshift if you want to post its error output. It is a bit confusing for you to post an error output from a program different than the one in the title! Just saying :).
Be seeing you...

User avatar
Lysander
Posts: 643
Joined: 2017-02-23 10:07
Location: London
Been thanked: 1 time

Re: [Software] Another Debian install, another Redshift problem

#5 Post by Lysander »

CynicalDebian wrote: 2023-03-29 14:05
Probably misconfigured Gammastep configuration! Redshift I have tested and working on X11, but in bullseye it maybe has some bugs. I can help you with Redshift if you want to post its error output.
Erm, did you read the OP properly? I didn't say Redshift was not working on X11, I was saying it wasn't working - as expected - in Wayland, and I was looking for alternatives.

Anyway, I have solved this. This is not an Xfce issue but a Debian 11 issue.
In Debian 10 and newer, GDM will use Wayland by default on supported hardware
from here https://wiki.debian.org/GDM

The same seems to be true of LightDM. So, dlu2021, I would caution against giving advice which is patently incorrect. Any Debian 10+ user is going to be using Wayland by default as long as they have the hardware support for it.

The solution here was just to disable Wayland and use X11.

One can do this by going into

Code: Select all

/etc/lightdm/lightdm.conf
and then uncommenting and amending the following line:

Code: Select all

sessions-directory=/usr/share/lightdm/sessions:/usr/share/xsessions
And after a restart, one can now install and use Redshift. For reference, redshift.conf should go inside the /home/USER/.config folder.

CynicalDebian
Posts: 263
Joined: 2023-03-02 05:26
Location: USA
Has thanked: 50 times
Been thanked: 60 times
Contact:

Re: [Software] Another Debian install, another Redshift problem

#6 Post by CynicalDebian »

Lysander wrote: 2023-03-29 14:11
CynicalDebian wrote: 2023-03-29 14:05
Probably misconfigured Gammastep configuration! Redshift I have tested and working on X11, but in bullseye it maybe has some bugs. I can help you with Redshift if you want to post its error output.
Erm, did you read the OP properly? I didn't say Redshift was not working on X11, I was saying it wasn't working - as expected - in Wayland, and I was looking for alternatives.

Anyway, I have solved this. This is not an Xfce issue but a Debian 11 issue.
In Debian 10 and newer, GDM will use Wayland by default on supported hardware
from here https://wiki.debian.org/GDM

So, dlu2021, I would caution giving advice which is patently incorrect. Any Debian 10+ user is going to be using Wayland by default as long as they have the hardware support for it.

The solution here was just to disable Wayland and use X11.

One can do this by going into

Code: Select all

/etc/lightdm/lightdm.conf
and then uncommenting and amending the following line:

Code: Select all

sessions-directory=/usr/share/lightdm/sessions:/usr/share/xsessions
And after a restart, one can now install and use Redshift. For reference, redshift.conf should go inside the /home/USER/.config folder.
dlu2021 is correct that XFCE and lightDM should have little to no Wayland support. Your fix appears to just make a second sessions-directory in /usr/share/xsessions. I originally assumed when I read your post you were using Wayland, than saw dlu2021s assessment that you were probably on X.

There is really no default, the DE metapackage may prefer Wayland or X it is up to the maintainers. An XFCE install should install lightdm on x11. GNOME is the only DE that will try to use Wayland. I think you have just worked around a different bug.

Also you can put the redshift.conf file in /home/USER/.config/redshift to keep things tidier. The problem is there is an apparmor bug preventing you from doing so, easily workoundable.

https://bugs.debian.org/cgi-bin/bugrepo ... bug=988068
Be seeing you...

User avatar
Lysander
Posts: 643
Joined: 2017-02-23 10:07
Location: London
Been thanked: 1 time

Re: [Software] Another Debian install, another Redshift problem

#7 Post by Lysander »

CynicalDebian wrote: 2023-03-29 14:18dlu2021 is correct that XFCE and lightDM should have little to no Wayland support.
There are two parts to his post. They are both disconnected. They are:
xfce doesn't use wayland
Now, the first is a weird sentence which actually means "Xfce doesn't default to Wayland through LightDM". Saying "Xfce doesn't use Wayland" is meaningless. Because it CAN use Wayland and does if you tell it to through LightDM, as I have. This is no wizardry on my part, it's an option within lightdm.conf.

and
so you are already using X11
Which is clearly wrong since I was using Wayland as stated in this error message, as already given:

Code: Select all

Error: Could not connect to wayland display, exiting 
Error: Failed to start adjustment method: wayland
So if it wasn't LightDM, something was defaulting to Wayland. Please do not defend poor and inaccurate advice on these forums, they are bad enough these days anyway without such posts.
CynicalDebian wrote: 2023-03-29 14:18Your fix appears to just make a second sessions-directory in /usr/share/xsessions. I originally assumed when I read your post you were using Wayland
Your assumption was correct.
CynicalDebian wrote: 2023-03-29 14:18than saw dlu2021s assessment that you were probably on X
His assessment was wrong. As shown.
CynicalDebian wrote: 2023-03-29 14:18An XFCE install should install lightdm on x11.
It installed LightDM, yes, but something somewhere decided to use Wayland. I must emphasise that this was a clean install of non-free Debian. No FrankenDebians or anything of the like here.
CynicalDebian wrote: 2023-03-29 14:18I think you have just worked around a different bug.
Possibly, I have no idea.
CynicalDebian wrote: 2023-03-29 14:18Also you can put the redshift.conf file in /home/USER/.config/redshift to keep things tidier.
Actually I couldn't, because it doesn't read that file. Certainly on my system it doesn't. I had to put it in /home/USER/.config because home/USER/.config/redshift/redshift.conf was not read.

Anyway, I'm out of this topic. This is the first time I have come back here for a long time, and the replies do not install me with confidence. Things were already getting bad here around Buster, seems they are not getting much better.

CynicalDebian
Posts: 263
Joined: 2023-03-02 05:26
Location: USA
Has thanked: 50 times
Been thanked: 60 times
Contact:

Re: [Solved] Another Debian install, another Redshift problem

#8 Post by CynicalDebian »

@Lysander
Now, the first is a weird sentence which actually means "Xfce doesn't default to Wayland through LightDM". Saying "Xfce doesn't use Wayland" is meaningless. Because it CAN use Wayland and does if you tell it to through LightDM, as I have. This is no wizardry on my part, it's an option within lightdm.conf.
Its just not true, XFCE has no support for Wayland, especially in 4.16 (In Bullseye!)

https://wiki.xfce.org/releng/wayland_roadmap

Lets look at your error message a little closer...

Here is what MY theory is for the error.

Code: Select all

 Error: Could not connect to wayland display, exiting <- Tried to find a Wayland display but couldn't (Probably saw X11)
Error: Failed to start adjustment method: wayland <- We are trying to using specifically this adjustment method but failing! (Since we are [probably] running X!) 


I assure you, telling if you are on Wayland or not is not as simple as relying on the error message of an unrelated program, but I think your error message is saying you are NOT on wayland.

Actually I couldn't, because it doesn't read that file. Certainly on my system it doesn't. I had to put it in /home/USER/.config because home/USER/.config/redshift/redshift.conf was not read.
I feel like I'm losing my mind... you literally even chose to quote just the part that doesn't fix your problem!
Also you can put the redshift.conf file in /home/USER/.config/redshift to keep things tidier. *The problem is there is an apparmor bug preventing you from doing so, easily workoundable.

And then I put a link to the bug with its workaround!
https://bugs.debian.org/cgi-bin/bugrepo ... bug=988068

Anyway, I'm out of this topic. This is the first time I have come back here for a long time, and the replies do not install me with confidence. Things were already getting bad here around Buster, seems they are not getting much better.
Enjoy your time away from the forum, and good luck :) o7.
Be seeing you...

Post Reply