linuxmint / cinnamon-spices-applets

Applets for the Cinnamon desktop
http://cinnamon-spices.linuxmint.com
GNU General Public License v2.0
611 stars 515 forks source link

[qredshift@quintao] v2.0.0 doesn't work #6126

Closed claudiux closed 4 months ago

claudiux commented 4 months ago

Applet version/Build date

Version 2.0.0 (2024-06-28 08:30:35)

Cinnamon version

Cinnamon 6.0.4

Distribution

Mint 21.3

Graphics hardware and driver used

Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller

Applet name and maintainer

qredshift@quintao @raphaelquintao

What happened?

I've removed redshift, also entirely removed the old version of this applet (even config files). Then I've installed the v2.0.0 of this applet and set all settings. Nothing happens when I activate/deactivate this applet.

My ~/.xsession-errors contains:

(cinnamon:2292): GLib-CRITICAL **: 14:39:07.442: g_child_watch_add_full: assertion 'pid > 0' failed
Gjs-Message: 14:39:07.445: JS LOG: [LookingGlass/warning] 
QRedshift: Created

(cinnamon:2292): GLib-CRITICAL **: 14:39:07.472: g_child_watch_add_full: assertion 'pid > 0' failed

(cinnamon:2292): Gjs-WARNING **: 14:39:07.483: Some code called array.toString() on a Uint8Array instance. Previously this would have interpreted the bytes of the array as a string, but that is nonstandard. In the future this will return the bytes as comma-separated digits. For the time being, the old behavior has been preserved, but please fix your code anyway to use TextDecoder.
(Note that array.toString() may have been called implicitly.)
0 _parse() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":103:12]
1 spawn_command_line_async_promise/<() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":125:31]
2 spawn_command_line_async_promise() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":110:11]
3 QRedshift() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":320:15]
4 main() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":1073:11]
5 createApplet() ["/usr/share/cinnamon/js/ui/appletManager.js":597:24]
6 addAppletToPanels() ["/usr/share/cinnamon/js/ui/appletManager.js":372:33]
7 finishExtensionLoad() ["/usr/share/cinnamon/js/ui/appletManager.js":98:13]
8 _init/<() ["/usr/share/cinnamon/js/ui/extension.js":286:31]

Gjs-Message: 14:39:07.488: JS LOG: [LookingGlass/warning] 
QRedshift: ADDED TO PANEL
Gjs-Message: 14:39:07.495: JS LOG: [LookingGlass/info] Loaded applet qredshift@quintao in 128 ms
Gjs-Message: 14:39:07.495: JS LOG: [LookingGlass/warning] 
ASYNC LOADING: qredshift 0.10

Gjs-Message: 14:39:07.495: JS LOG: [LookingGlass/warning] 
UPDATE: true

(cinnamon:2292): GLib-CRITICAL **: 14:39:07.519: g_child_watch_add_full: assertion 'pid > 0' failed

Later:

(cinnamon:2292): GLib-CRITICAL **: 14:39:19.753: g_child_watch_add_full: assertion 'pid > 0' failed
Gjs-Message: 14:39:19.820: JS LOG: [LookingGlass/warning] 
UPDATE: true

(cinnamon:2292): GLib-CRITICAL **: 14:39:19.835: g_child_watch_add_full: assertion 'pid > 0' failed
Gjs-Message: 14:39:19.843: JS WARNING: [/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function 696]: Too many arguments to method Clutter.InputDevice.ungrab: expected 0, got 1
Gjs-Message: 14:39:20.464: JS LOG: [LookingGlass/warning] 
UPDATE: true

I hope you'll can solve this issue. Your applet saves my eyes! Thank you!

Other information

I'm using X11, not wayland.

raphaelquintao commented 4 months ago

I will take a look at that today. For me works perfectly on Debian. I will Debug it in Mint.

claudiux commented 4 months ago

I've tried your bin/qredshift command. Nothing happens; no change.

ovexro commented 4 months ago

Yes. After installing the required updates — on Intel and AMD — it no longer works. It is a bug, of course. But I'm sure it will be fixed soon — I'm dependent upon it. My eyes hurt badly without it.

I reinstalled it now, and it doesn't work — yet. The bug is persistent. Last update: 6:15 PM (GMT+3)

raphaelquintao commented 4 months ago

Whats is the output of the command xrandr --listmonitors.

ovexro commented 4 months ago

Whats is the output of the command xrandr --listmonitors.

root@ovidiu-PC:/home/ovidiu# xrandr --listmonitors
Monitors: 1
 0: +*DP-4 1920/698x1080/393+0+0  DP-4

I can give you different outputs based on the commands you give me — just tell me what to type in the terminal.

bubbagithub647 commented 4 months ago

I have the same issue I tried removing all files relating to redshift and Qredshift, then reinstalled Qredshift but the issue persisted. Linux mint 21.3 with Cinnamon 6.0.4 AMD Ryzen Core 3 3100 and GeForce GTX 1650 with driver version 535.183.01-ubuntu0.22.04.01 Output of xrandr --listmonitors is Monitors: 1 0: +*DP-0 2560/698x1440/393+0+0 DP-0

My ~/.xsession-errors contains:

(cinnamon:1681): GLib-CRITICAL **: 11:22:52.431: g_child_watch_add_full: assertion 'pid > 0' failed
Gjs-Message: 11:22:52.433: JS LOG: [LookingGlass/info] Installing settings for qredshift@quintao
Gjs-Message: 11:22:52.433: JS LOG: [LookingGlass/info] Settings successfully installed for qredshift@quintao
Gjs-Message: 11:22:52.435: JS LOG: [LookingGlass/warning] 
QRedshift: Created

(cinnamon:1681): GLib-CRITICAL **: 11:22:52.456: g_child_watch_add_full: assertion 'pid > 0' failed

(cinnamon:1681): Gjs-WARNING **: 11:22:52.472: Some code called array.toString() on a Uint8Array instance. Previously this would have interpreted the bytes of the array as a string, but that is nonstandard. In the future this will return the bytes as comma-separated digits. For the time being, the old behavior has been preserved, but please fix your code anyway to use TextDecoder.
(Note that array.toString() may have been called implicitly.)
0 _parse() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":103:12]
1 spawn_command_line_async_promise/<() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":125:31]
2 spawn_command_line_async_promise() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":110:11]
3 QRedshift() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":320:15]
4 main() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":1073:11]
5 createApplet() ["/usr/share/cinnamon/js/ui/appletManager.js":597:24]
6 addAppletToPanels() ["/usr/share/cinnamon/js/ui/appletManager.js":372:33]
7 onEnabledAppletsChanged() ["/usr/share/cinnamon/js/ui/appletManager.js":309:25]

Gjs-Message: 11:22:52.477: JS LOG: [LookingGlass/warning] 
QRedshift: ADDED TO PANEL
Gjs-Message: 11:22:52.478: JS LOG: [LookingGlass/warning] 
ASYNC LOADING: qredshift 0.10

Gjs-Message: 11:22:52.478: JS LOG: [LookingGlass/warning] 
UPDATE: false

(cinnamon:1681): GLib-CRITICAL **: 11:22:52.496: g_child_watch_add_full: assertion 'pid > 0' failed
Gjs-Message: 11:22:52.524: JS LOG: calendar@cinnamon.org: Calendar events supported.

(cinnamon:1681): St-WARNING **: 11:22:52.540: Ignoring length property that isn't a number at line 10, col 17

(cinnamon:1681): St-WARNING **: 11:22:52.541: Ignoring length property that isn't a number at line 12, col 17

And a bit later:

(cinnamon:1681): GLib-CRITICAL **: 11:22:56.239: g_child_watch_add_full: assertion 'pid > 0' failed
Gjs-Message: 11:22:56.241: JS LOG: [LookingGlass/warning] 
QRedshift: Created

(cinnamon:1681): GLib-CRITICAL **: 11:22:56.257: g_child_watch_add_full: assertion 'pid > 0' failed

(cinnamon:1681): Gjs-WARNING **: 11:22:56.267: Some code called array.toString() on a Uint8Array instance. Previously this would have interpreted the bytes of the array as a string, but that is nonstandard. In the future this will return the bytes as comma-separated digits. For the time being, the old behavior has been preserved, but please fix your code anyway to use TextDecoder.
(Note that array.toString() may have been called implicitly.)
0 _parse() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":103:12]
1 spawn_command_line_async_promise/<() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":125:31]
2 spawn_command_line_async_promise() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":110:11]
3 QRedshift() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":320:15]
4 main() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":1073:11]
5 createApplet() ["/usr/share/cinnamon/js/ui/appletManager.js":597:24]
6 addAppletToPanels() ["/usr/share/cinnamon/js/ui/appletManager.js":372:33]
7 finishExtensionLoad() ["/usr/share/cinnamon/js/ui/appletManager.js":98:13]
8 _init/<() ["/usr/share/cinnamon/js/ui/extension.js":286:31]

Gjs-Message: 11:22:56.272: JS LOG: [LookingGlass/warning] 
QRedshift: ADDED TO PANEL
Gjs-Message: 11:22:56.272: JS LOG: [LookingGlass/info] Loaded applet qredshift@quintao in 59 ms
Gjs-Message: 11:22:56.272: JS LOG: [LookingGlass/warning] 
ASYNC LOADING: qredshift 0.10

Gjs-Message: 11:22:56.272: JS LOG: [LookingGlass/warning] 
UPDATE: false

(cinnamon:1681): GLib-CRITICAL **: 11:22:56.283: g_child_watch_add_full: assertion 'pid > 0' failed

(cinnamon:1681): Gtk-WARNING **: 11:22:56.285: Could not load a pixbuf from icon theme.
raphaelquintao commented 4 months ago

That command work for you? ~/.local/share/cinnamon/applets/qredshift@quintao/bin/qredshift -t 4500

ovexro commented 4 months ago

That command work for you? ~/.local/share/cinnamon/applets/qredshift@quintao/bin/qredshift -t 4500

I tried it. It doesn't work.

claudiux commented 4 months ago

Whats is the output of the command xrandr --listmonitors.

Monitors: 1
 0: +*HDMI-1 1920/496x1080/292+0+0  HDMI-1
claudiux commented 4 months ago

That command work for you? ~/.local/share/cinnamon/applets/qredshift@quintao/bin/qredshift -t 4500

It does not work. No change.

raphaelquintao commented 4 months ago

If you install redshift sudo apt install redshift and run the command redshift -m randr -P -O 4500 it works ?

claudiux commented 4 months ago

~/.local/share/cinnamon/applets/qredshift@quintao/bin/qredshift -i returns:

DS:x11
DE:X-Cinnamon
WM:unknown

1:C:HDMI-1:0x0
claudiux commented 4 months ago

If you install redshift sudo apt install redshift and run the command redshift -m randr -P -O 4500 it works ?

Yes, it works.

ovexro commented 4 months ago

If you install redshift sudo apt install redshift and run the command redshift -m randr -P -O 4500 it works ?

root@ovidiu-PC:/home/ovidiu# sudo apt install redshift
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
redshift is already the newest version (1.12+mint5+vanessa).
The following packages were automatically installed and are no longer required:
  linux-headers-5.15.0-100 linux-headers-5.15.0-100-generic
  linux-headers-5.15.0-101 linux-headers-5.15.0-101-generic
  linux-headers-5.15.0-102 linux-headers-5.15.0-102-generic
  linux-headers-5.15.0-105 linux-headers-5.15.0-105-generic
  linux-headers-5.15.0-106 linux-headers-5.15.0-106-generic
  linux-headers-5.15.0-107 linux-headers-5.15.0-107-generic
  linux-headers-5.15.0-92 linux-headers-5.15.0-92-generic
  linux-headers-5.15.0-94 linux-headers-5.15.0-94-generic
  linux-headers-5.15.0-97 linux-headers-5.15.0-97-generic
  linux-image-5.15.0-100-generic linux-image-5.15.0-101-generic
  linux-image-5.15.0-102-generic linux-image-5.15.0-105-generic
  linux-image-5.15.0-106-generic linux-image-5.15.0-107-generic
  linux-image-5.15.0-92-generic linux-image-5.15.0-94-generic
  linux-image-5.15.0-97-generic linux-modules-5.15.0-100-generic
  linux-modules-5.15.0-101-generic linux-modules-5.15.0-102-generic
  linux-modules-5.15.0-105-generic linux-modules-5.15.0-106-generic
  linux-modules-5.15.0-107-generic linux-modules-5.15.0-92-generic
  linux-modules-5.15.0-94-generic linux-modules-5.15.0-97-generic
  linux-modules-extra-5.15.0-100-generic
  linux-modules-extra-5.15.0-101-generic
  linux-modules-extra-5.15.0-102-generic
  linux-modules-extra-5.15.0-105-generic
  linux-modules-extra-5.15.0-106-generic
  linux-modules-extra-5.15.0-107-generic linux-modules-extra-5.15.0-92-generic
  linux-modules-extra-5.15.0-94-generic linux-modules-extra-5.15.0-97-generic
  nvidia-firmware-535-535.146.02 nvidia-firmware-535-535.154.05
  nvidia-firmware-535-535.161.07 nvidia-firmware-535-535.171.04
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@ovidiu-PC:/home/ovidiu# redshift -m randr -P -O 4500
Authorization required, but no authorization protocol specified
`RANDR Query Version' returned error -1
Initialization of randr failed.

It works if I'm logged as a user in the terminal. If I'm logged as root, it doesn't.

raphaelquintao commented 4 months ago

Try install that packages sudo apt-get install libxcb1 libxcb1-dev libxcb-randr0 libxcb-randr0-dev restart and check if that ~/.local/share/cinnamon/applets/qredshift@quintao/bin/qredshift -t 4500 works.

ovexro commented 4 months ago

Try install that packages sudo apt-get install libxcb1 libxcb1-dev libxcb-randr0 libxcb-randr0-dev restart and check if that ~/.local/share/cinnamon/applets/qredshift@quintao/bin/qredshift -t 4500 works.

ovidiu@ovidiu-PC:~$ ~/.local/share/cinnamon/applets/qredshift@quintao/bin/qredshift -t 4500
X Error of failed request:  BadRRCrtc (invalid Crtc parameter)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  23 (RRGetCrtcGamma)
  Crtc id in failed request: 0x1bd
  Serial number of failed request:  18
  Current serial number in output stream:  18
ovidiu@ovidiu-PC:~$ 
raphaelquintao commented 4 months ago

Try download that updated binary: qredshift And run the following commands: Check if that works: ./qredshift -t 4500 if not try that ./qredshift -xcb -t 4500

claudiux commented 4 months ago

./qredshift -t 4500 works!!! Thank you!!!

claudiux commented 4 months ago

With the new version of your qredshift this applet works very well. Please make a PR.

ovexro commented 4 months ago

Can you make it available on Update Manager?

raphaelquintao commented 4 months ago

I will make a pull request in a moment. Thanks guys! 🍻

ovexro commented 4 months ago

Please tell us what the issue was. <3

ovexro commented 4 months ago

I made the update but it still doesn't work.

claudiux commented 4 months ago

I made the update but it still doesn't work.

cd ~/.local/share/cinnamon/applets/qredshift@quintao/bin/
rm -f qredshift
wget https://github.com/raphaelquintao/QRedshiftCinnamon/raw/master/files/qredshift@quintao/bin/qredshift
chmod +x qredshift
raphaelquintao commented 4 months ago

Please tell us what the issue was. <3

The problem was that i was setting the gamma ramps on all outputs including the disconnected ones, and for some reason my hardware accept that and some other don't.

raphaelquintao commented 4 months ago

@ovexro The version 2.0.0 was reverted back on the repository. For now, if you want the latest version you can follow these steps:

  1. Download zip from qredshift@quintao_2.0.0.zip.
  2. Extract .zip archive to ~/.local/share/cinnamon/applets.
  3. Enable the applet in Cinnamon settings
claudiux commented 4 months ago

Maybe make this applet multiversion and create a 6.2 folder containing v2.0.0?

raphaelquintao commented 4 months ago

Maybe make this applet multiversion and create a 6.2 folder containing v2.0.0?

It will work better on some older versions of cinnamon. Someone used some new functions that don't exist in older versions and this was causing problems in the older versions. See #QRedshiftCinnamon-66 I think a multi version is not required.

ovexro commented 4 months ago

It's working now. Thank you!