Starting Rocks'n'Diamonds when redshift program is running causes R'n'D to crash.

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
BryanFRitt
Posts: 281
Joined: Mon Nov 13, 2017 4:16 pm

Starting Rocks'n'Diamonds when redshift program is running causes R'n'D to crash.

Post by BryanFRitt »

Starting Rocks'n'Diamonds when redshift program is running causes R'n'D to crash.

If Redshift is running, starting R'n'D results in R'n'D crashing. I think it has something to do with a program called Redshift and/or KDE's Night Light. Because if I exit Redshift (?and/or wait long enough?) R'n'D goes back to working. (?TODO: better test this out?)

To hopefully help with debugging I ran R'n'D with something like

Code: Select all

/usr/bin/gdb --args "${RnDBasePath}${RnDVer}/rocksndiamonds" "--debug"
and pasted crash statements results from gdb and KWin Crash Handler in the attachment.

If the attachment happens to have something that shouldn't be on the Internet (like private personal data passwords, etc...) feel free to delete it, or ask me to remove it if I can.
Attachments
RnD_Startup_Crash_Info_2.txt
(63.92 KiB) Downloaded 4 times
--- Strike a balance between generating new things/ideas, and being good/organized, somewhere between a gibberish mess and nothing said/done. ---
--- I've completed the built-in R'n'D levelsets, and lots of R'n'D downloaded levelsets; Finished enough? ---
ncrecc
Posts: 313
Joined: Thu Jul 12, 2018 12:59 am

Re: Starting Rocks'n'Diamonds when redshift program is running causes R'n'D to crash.

Post by ncrecc »

odd, i also use redshift (1.12) and this has never been an issue for me. i'm on debian 12 with xfce 4.18
User avatar
Holger
Site Admin
Posts: 4392
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Starting Rocks'n'Diamonds when redshift program is running causes R'n'D to crash.

Post by Holger »

That sounds interesting (or strange, and should definitely not happen), and I would really like to try if I can reproduce this, but I don't know how!

I am using KDE here (using the currently latest stable Kubuntu 24.04.3 LTS with KDE Plasma Version 5.27.12, Kernel 6.8.0-90-generic and X11), so it should be possible to test this using a (hopefully) similar environment than yours.

Update: I have just installed some KDE app called "Redshift", but starting it from the KDE menu just does nothing. I found a tray icon called "redshift-gtk" where I can quit it, causing a pop-up message "Failed to run Redshift ... Could not connect to wayland display ...". So apparently this is a Wayland-only app. :-(
BryanFRitt
Posts: 281
Joined: Mon Nov 13, 2017 4:16 pm

Re: Starting Rocks'n'Diamonds when redshift program is running causes R'n'D to crash.

Post by BryanFRitt »

Holger wrote: Sat Mar 14, 2026 2:09 pm That sounds interesting (or strange, and should definitely not happen), and I would really like to try if I can reproduce this, but I don't know how!

I am using KDE here (using the currently latest stable Kubuntu 24.04.3 LTS with KDE Plasma Version 5.27.12, Kernel 6.8.0-90-generic and X11), so it should be possible to test this using a (hopefully) similar environment than yours.

Update: I have just installed some KDE app called "Redshift", but starting it from the KDE menu just does nothing. I found a tray icon called "redshift-gtk" where I can quit it, causing a pop-up message "Failed to run Redshift ... Could not connect to wayland display ...". So apparently this is a Wayland-only app. :-(
Alternate interpretation of error message: Are on Wayland?, and/or does Redshift think you are on Wayland?, and it fails because of that? I see that message when exiting redshift-gtk if I start redshift-gtk without a location given.

redshift-gtk can be given a location with something like this.

Code: Select all

redshift-gtk -l "Latitude:Longitude"
With "Latitude:Longitude" being formatted like "NNN.NN:NNN.NN"

The system that I'm on that has the error is KDE on x11 on Debian Stable 13.3 (going to be updating to the newly released 13.4 after posting this)

Code: Select all

echo $XDG_SESSION_TYPE
x11

Code: Select all

uname -a
Linux RP86XE5 6.12.74+deb13+1-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.74-2 (2026-03-08) x86_64 GNU/Linux
ncrecc wrote: Sat Mar 14, 2026 1:15 pm odd, i also use redshift (1.12) and this has never been an issue for me. i'm on debian 12 with xfce 4.18
Thinking about I've also had redshift for a while and haven't had problems with it and R'n'D until recently. Although, I think I may have had Redshift disabled after last major OS update, and just recently re-enabled it.

Code: Select all

redshift -V
redshift 1.12
--- Strike a balance between generating new things/ideas, and being good/organized, somewhere between a gibberish mess and nothing said/done. ---
--- I've completed the built-in R'n'D levelsets, and lots of R'n'D downloaded levelsets; Finished enough? ---
BryanFRitt
Posts: 281
Joined: Mon Nov 13, 2017 4:16 pm

Re: Starting Rocks'n'Diamonds when redshift program is running causes R'n'D to crash.

Post by BryanFRitt »

Update:
Forks

Since 14 Jun 2020, Redshift development has been abandoned.

Since 27 August 2023, Debian users are recommended to use gammastep, a Redshift fork, instead.[4][5][6]
https://en.wikipedia.org/wiki/Redshift_(software)#Forks

https://packages.debian.org/gammastep

Guess I'll try out gammastep.

Update: Tried gammastep, but I think it's Wayland only. So it fails to start here.
Error: Could not connect to wayland display, exiting.
Error: Failed to start adjustment method: wayland
Last edited by BryanFRitt on Sun Mar 15, 2026 1:03 am, edited 1 time in total.
--- Strike a balance between generating new things/ideas, and being good/organized, somewhere between a gibberish mess and nothing said/done. ---
--- I've completed the built-in R'n'D levelsets, and lots of R'n'D downloaded levelsets; Finished enough? ---
filbo
Posts: 739
Joined: Fri Jun 20, 2014 10:06 am

Re: Starting Rocks'n'Diamonds when redshift program is running causes R'n'D to crash.

Post by filbo »

There are three related Debian packages, redshift, redshift-gtk, redshift-qt. The latter being GUIs to the utility. I don't use these so I don't know if any of them stay running as a daemon. I think Bryan should start by clearly staying which of those is(are) in use.

Second, the initial message talks about RnD crashing, but the debug log shows RnD running until manually ^C'd. Needs clarification. Is it that RnD runs but is invisible? If so, how so -- no window, window containing only black, or what?

... just saw the addition about `gammastep`. That's probably a solution for you, but sounds like there is some RnD bug here that might still want fixing...
filbo
Posts: 739
Joined: Fri Jun 20, 2014 10:06 am

Re: Starting Rocks'n'Diamonds when redshift program is running causes R'n'D to crash.

Post by filbo »

Ok I see it's redshift-gtk under KDE X11. Had somehow glossed over those details on first read. Holger seems to have fired up an equivalent setup, except Ubuntu, and maybe not starting `redshift` successfully since it requires latlong argument.

Given the top-level split in *ix desktop environments... If you're on KDE, I would expect that `redshift-qt` would be the native control GUI?
filbo
Posts: 739
Joined: Fri Jun 20, 2014 10:06 am

Re: Starting Rocks'n'Diamonds when redshift program is running causes R'n'D to crash.

Post by filbo »

From the Debian package dependencies (on things like XCB randr library), and gammastep bug tracker, it's clear that it's intended to work on both X11 & Wayland. But setup might be tricky.
BryanFRitt
Posts: 281
Joined: Mon Nov 13, 2017 4:16 pm

Re: Starting Rocks'n'Diamonds when redshift program is running causes R'n'D to crash.

Post by BryanFRitt »

filbo wrote: Sun Mar 15, 2026 1:01 am There are three related Debian packages, redshift, redshift-gtk, redshift-qt. The latter being GUIs to the utility. I don't use these so I don't know if any of them stay running as a daemon. I think Bryan should start by clearly staying which of those is(are) in use.

Second, the initial message talks about RnD crashing, but the debug log shows RnD running until manually ^C'd. Needs clarification. Is it that RnD runs but is invisible? If so, how so -- no window, window containing only black, or what?

... just saw the addition about `gammastep`. That's probably a solution for you, but sounds like there is some RnD bug here that might still want fixing...
Sadly it seems that Gammastep is Wayland only, and not x11. (see updated prior post)

When the R'n'D startup crash happens KWin Crash Handler pops up with it's message and debugging info. The ^C was after copying info from KWin Crash Handler. (switched the order the text file to keep the gdb stuff together) Does the KWin Crash Handler keep the app sort of running in a paused like state so it can produce debugging info?

Not sure why but I've been using redshift-gtk instead of redshift-qt. I probably should be using redshift-qt instead of redshift-gtk since I'm on KDE and not GNOME, not sure what a difference it'll make*, but I'll try it.
* ("integrates better with a Qt-based desktop" is what the package manager says)
--- Strike a balance between generating new things/ideas, and being good/organized, somewhere between a gibberish mess and nothing said/done. ---
--- I've completed the built-in R'n'D levelsets, and lots of R'n'D downloaded levelsets; Finished enough? ---
filbo
Posts: 739
Joined: Fri Jun 20, 2014 10:06 am

Re: Starting Rocks'n'Diamonds when redshift program is running causes R'n'D to crash.

Post by filbo »

Editing posts, especially in an active discussion, leads to confusing temporal anomalies...

I've downloaded but not installed the Debian `gammastep` package. It is 100% clear that it's intended to work with X11 as well as Wayland. Try fiddling with its '-m' flag, for one thing.

Definitely have to fault the authors of `redshift` and then especially the much newer `gammashift` modernized fork for extremely shoddy documentation. In general it barely mentions X11 vs Wayland at all, despite it being a fundamental issue of concern for 100.00% of all potential users. feh. Also not much impressed at how `gammastep` is clearly a fork, but seems to have only accidental remaining references to `redshift` (e.g. the man page's title strings, so it says 'REDSHIFT(1)' in the corners of 'gammastep - set color temperature of display according to time of day' man page).
filbo
Posts: 739
Joined: Fri Jun 20, 2014 10:06 am

Re: Starting Rocks'n'Diamonds when redshift program is running causes R'n'D to crash.

Post by filbo »

Code: Select all

$ gammastep -m list
Available adjustment methods:
  wayland
  drm
  randr
  dummy

Specify colon-separated options with `-m METHOD:OPTIONS'.
Try `-m METHOD:help' for help.
$ gammastep -m randr:help
Adjust gamma ramps with the X RANDR extension.

  screen=N              X screen to apply adjustments to
  crtc=N        List of comma separated CRTCs to apply adjustments to
 
filbo
Posts: 739
Joined: Fri Jun 20, 2014 10:06 am

Re: Starting Rocks'n'Diamonds when redshift program is running causes R'n'D to crash.

Post by filbo »

No idea what 'KWin Crash Handler' does, I generally hate those things which get between me and actually being able to understand Linux app crashes. Just write a frickin core file in /var/crash or /var/core and get out of my way!!...
BryanFRitt
Posts: 281
Joined: Mon Nov 13, 2017 4:16 pm

Re: Starting Rocks'n'Diamonds when redshift program is running causes R'n'D to crash.

Post by BryanFRitt »

filbo wrote: Sun Mar 15, 2026 2:24 am

Code: Select all

$ gammastep -m list
Available adjustment methods:
  wayland
  drm
  randr
  dummy

Specify colon-separated options with `-m METHOD:OPTIONS'.
Try `-m METHOD:help' for help.
$ gammastep -m randr:help
Adjust gamma ramps with the X RANDR extension.

  screen=N              X screen to apply adjustments to
  crtc=N        List of comma separated CRTCs to apply adjustments to
 
Thanks filbo for the gammastep setup help.

/usr/bin/gammastep -l "NNN.NN:NNN.NN" -m randr -r & # where NNN.NN:NNN.NN is my location
Starts up without giving an error message.

This R'n'D crashing issue so far seems to only happen during the transition periods, sunrise/sunset. Time to wait(, or cheat the TimeOfDay and/or Location, etc...).
filbo wrote: Sun Mar 15, 2026 2:21 am Editing posts, especially in an active discussion, leads to confusing temporal anomalies...
yep, lol :)

New attachment was made after installing some dbgsym packages to help remove the ??? in the KWin Crash Handler backtrace. (For lines with a '???' lookup the '*.so*' on that line with `apt-file search 'the*.so*'` and install the '*-dbgsym' version of the packages mentioned, then reload backtrace; Repeat until there are no ??? that can be gotten rid of this way.) This time things were kept in the order that they were done.
Attachments
RnD_Startup_Crash_Info_3.txt
(74 KiB) Downloaded 1 time
--- Strike a balance between generating new things/ideas, and being good/organized, somewhere between a gibberish mess and nothing said/done. ---
--- I've completed the built-in R'n'D levelsets, and lots of R'n'D downloaded levelsets; Finished enough? ---
Post Reply