Re: Automatic suspend-to-ram solution for Workstations

2024-12-13 Thread Henrik Ahlgren
On Fri, 2024-12-13 at 17:44 +0100, Jan Claeys wrote: > Assuming this backup is started by an automated system under control of > the sysadmins, and not by the users themselves, it's probably easiest > to use some sort of "lock" that is set by the backup process itself (or > that you wrap around it)

Re: Automatic suspend-to-ram solution for Workstations

2024-12-13 Thread Jan Claeys
On Sat, 2024-12-07 at 20:27 +0100, Felix Natter wrote: > - there is no significant load during the last hour (in order to > account for backup jobs) Assuming this backup is started by an automated system under control of the sysadmins, and not by the users themselves, it's probably easiest to use

Re: Automatic suspend-to-ram solution for Workstations

2024-12-09 Thread Max Nikulin
thing, turn off screen->suspend->hibernate with configurable intervals. Desktop environments do have that and KDE does it fine on my Linux laptop but with just X11 and a WM it's a different story. (I would leave aside VNC sessions at least for a while.) Screensavers that are able to put

Re: Automatic suspend-to-ram solution for Workstations

2024-12-09 Thread Anssi Saari
Felix Natter writes: > Dear Debian users, > > I am looking for an automatic suspend-to-ram (I know "sudo systemctl > suspend" ;-)) solution for workstations: I would like the system to > suspend if and only if: > > - there is no gui interaction from any user (e

Re: Automatic suspend-to-ram solution for Workstations

2024-12-07 Thread Will Mengarini
.] no gui interaction [...] (especially with VNC [...]) [...] That's a lot harder. Theoretically `w` shows idle time, but I'm not sure you can trust it with layers of GUI interaction. Full original post: > I am looking for an automatic suspend-to-ram (I know "sudo systemctl > suspend" ;

Automatic suspend-to-ram solution for Workstations

2024-12-07 Thread Felix Natter
Dear Debian users, I am looking for an automatic suspend-to-ram (I know "sudo systemctl suspend" ;-)) solution for workstations: I would like the system to suspend if and only if: - there is no gui interaction from any user (especially with VNC sessions) AND - there is no signif

Re: DefinitionS sleep/suspend/hibernate/etc - was [Re: help: disable all manner of sleep/suspend/hibernate - Debian 12]

2024-11-23 Thread Andrew M.A. Cater
e a machine with a clean initial install of Debian 12. > I'm not happy with it's configuration. > To find answers and pose intelligent questions I need to know definitions of > sleep/suspend/hibernate/etc as used in the Debian sub-culture. > "As used in the Debian sub-culture

Re: DefinitionS sleep/suspend/hibernate/etc - was [Re: help: disable all manner of sleep/suspend/hibernate - Debian 12]

2024-11-23 Thread Richard Owlett
27;ve done what you have. Michael mentioned https://wiki.debian.org/Suspend and I found https://wiki.debian.org/Hibernation . I, and other inexperienced users, need proper definitions of sleep/suspend/hibernate/etc to use those pages and solutions to be described here. You misinterpreted my post.

Re: DefinitionS sleep/suspend/hibernate/etc - was [Re: help: disable all manner of sleep/suspend/hibernate - Debian 12]

2024-11-22 Thread Andrew M.A. Cater
ne what you have. > Michael mentioned https://wiki.debian.org/Suspend and I found > https://wiki.debian.org/Hibernation . > > I, and other inexperienced users, need proper definitions of > sleep/suspend/hibernate/etc to use those pages and solutions to be described > here. > > All the very best, Andy Cater (amaca...@debian.org)

Re: help: disable all manner of sleep/suspend/hibernate - Debian 12

2024-11-22 Thread Jeffrey Walton
manner of Magic SysRq keys, as I'm not aware any > > which would unblank the screen and/or resume from any manner of > > sleep/suspend/hibernate > > Have you checked the BIOS settings? Here for example is one PC's diary > record of me reconfiguring its BI

Re: help: disable all manner of sleep/suspend/hibernate - Debian 12

2024-11-22 Thread David Wright
it or how: >ACPI: PM: Preparing to enter system sleep state S3 >That's found in the /var/log/{kern.log,syslog}* files > *haven't tried all manner of Magic SysRq keys, as I'm not aware any > which would unblank the screen and/or resume from any manner of &g

Re: DefinitionS sleep/suspend/hibernate/etc - was [Re: help: disable all manner of sleep/suspend/hibernate - Debian 12]

2024-11-22 Thread Michael Paoli
m/sleep-states.html > Other pages that might be useful include > https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate > https://www.computernetworkingnotes.com/linux-tutorials/shutdown-reboot-suspend-and-hibernate-a-linux-system.html My original: https://lists.debian.org/

Re: help: disable all manner of sleep/suspend/hibernate - Debian 12

2024-11-22 Thread Michael Paoli
(very bad as this system also operates as > >server!) > > seems to be a very deep form of sleep, the only things I can do at that > >point that at all gets it to respond: > > - which does a warm reboot > Does not like suspend to RAM or suspend to disk (hibern

Re: DefinitionS sleep/suspend/hibernate/etc - was [Re: help: disable all manner of sleep/suspend/hibernate - Debian 12]

2024-11-22 Thread debian-user
Richard Owlett wrote: > Michael mentioned https://wiki.debian.org/Suspend and I found > https://wiki.debian.org/Hibernation . > > I, and other inexperienced users, need proper definitions of > sleep/suspend/hibernate/etc to use those pages and solutions to be > described

Re: help: disable all manner of sleep/suspend/hibernate - Debian 12

2024-11-22 Thread Max Nikulin
On 22/11/2024 13:57, Michael Paoli wrote: seems to be a very deep form of sleep, the only things I can do at that point that at all gets it to respond: - which does a warm reboot Does not like suspend to RAM or suspend to disk (hibernate). It resembles graphics issues. Can you

Re: DefinitionS sleep/suspend/hibernate/etc - was [Re: help: disable all manner of sleep/suspend/hibernate - Debian 12]

2024-11-22 Thread Michael Paoli
; How do I disable all manner of sleep/suspend/hibernate on Debian 12? > Michael mentioned https://wiki.debian.org/Suspend and I found > https://wiki.debian.org/Hibernation . > I, and other inexperienced users, need proper definitions of > sleep/suspend/hibernate/etc to use those pages and solutions to be > described here.

DefinitionS sleep/suspend/hibernate/etc - was [Re: help: disable all manner of sleep/suspend/hibernate - Debian 12]

2024-11-22 Thread Richard Owlett
On 11/22/24 12:57 AM, Michael Paoli wrote: How do I disable all manner of sleep/suspend/hibernate on Debian 12? [snip very detailed of his environment/symptoms] I recently jumped from Debian 9(w/MATE) - 12(w/MATE) in one step. My Debian 9 settings can be traced back to Debian 6(w/Gnome). I

help: disable all manner of sleep/suspend/hibernate - Debian 12

2024-11-21 Thread Michael Paoli
How do I disable all manner of sleep/suspend/hibernate on Debian 12? I really don't want it doing any sleep/suspend/hibernate (I'm okay with explicitly manually triggering it, but I don't even need that). Symptoms/issue/background: Was a non-issue on Debian 10 (sleep/hibernate woul

Re: Thinkpad T14s Gen 6 AMD. Unable to resume from suspend.

2024-11-09 Thread Red Spiral
On Sat, Nov 9, 2024 at 6:42 PM AFB wrote: > I am able to resume if I suspend my pc with pm-suspend but it doesn't work > with systemctl suspend ; > I am also able to resume if I add amd_iommu=off to the kernel parameters > > I am not sure if this would qualify as "solvin

Re: Thinkpad T14s Gen 6 AMD. Unable to resume from suspend.

2024-11-09 Thread AFB
[SWAP] Also since posting my question, I've kept looking for solutions and noticed two things : I am able to resume if I suspend my pc with *pm-suspend* but it doesn't work with *systemctl suspend* ; I am also able to resume if I add *amd_iommu=off* to the kernel parameters I am n

Re: Thinkpad T14s Gen 6 AMD. Unable to resume from suspend.

2024-11-09 Thread Max Nikulin
On 09/11/2024 05:57, AFB wrote: The only way to get back control of the laptop is to hold down the power button and do a hard reset. Video drivers are not uncommon source of suspend and hibernate issues. Are network services working in this state? Can you login using ssh (if ssh daemon is

Re: Thinkpad T14s Gen 6 AMD. Unable to resume from suspend.

2024-11-09 Thread songbird
AFB wrote: ... > I am a bit defeated out here, so do you have any ideas for me ? my rusty brain seems to recall... isn't this done via swap? check to see if you have the swap partition defined, mounted and available, it must be large enough to hold the contents of memory. there might al

Re: Thinkpad T14s Gen 6 AMD. Unable to resume from suspend.

2024-11-08 Thread Timothy M Butterworth
On Sat, Nov 9, 2024 at 12:32 AM AFB wrote: > Hi everyone, > > Briefly my issue is that I am unable to resume from suspend. > I just tested sleep on my laptop, also running Trixie and it works without any problems. It does not appear to be an issue with Trixie. > I own the

Re: Thinkpad T14s Gen 6 AMD. Unable to resume from suspend.

2024-11-08 Thread Charles Curley
On Fri, 08 Nov 2024 23:57:16 +0100 AFB wrote: > I am a bit defeated out here, so do you have any ideas for me ? See if anyone on ThinkWiki has any ideas. And try the Bookworm (Debian 12) live CD. If that works, fall back to that. -- Does anybody read signatures any more? https://charlescurley

Thinkpad T14s Gen 6 AMD. Unable to resume from suspend.

2024-11-08 Thread AFB
Hi everyone, Briefly my issue is that I am unable to resume from suspend. I own the new T14s G6 AMD ; which runs on the AMD CPU Ryzen AI 7 PRO 360 (released in august 2024). I installed Debian Testing (Trixie) - which come with /Kernel 6.11.5-amd64/ at the time of the post. Unfortunately

Re: new laptop: how2 enable suspend / hibernate?

2024-06-26 Thread Lee
et a USB adapter for > it. Then you can look at your installation logs. I hadn't thought of that -- thanks! > But I can't suspend or hibernate the laptop :( Both options are > greyed out. How do I enable suspend / hibernate? Not being able to do suspend or hibernate seems to be

Re: new laptop: how2 enable suspend / hibernate?

2024-06-25 Thread Van Snyder
new laptop is a Lenovo v15 G3 - installing > debian-12.5.0-amd64-netinst.iso from a flash drive was trivially > easy. > Whoever worked on the how to install Debian from flash did an > excellent job. > > But I can't suspend or hibernate the laptop :(  Both options are &

new laptop: how2 enable suspend / hibernate?

2024-06-25 Thread Lee
t job. But I can't suspend or hibernate the laptop :( Both options are greyed out. How do I enable suspend / hibernate? TIA, Lee

Re: system won't suspend automatically

2024-06-13 Thread eben
On 6/13/24 13:30, David Wright wrote: Swap:0 0 0 You have no swap. Well, that's another good reason it won't work. 1. Fix /etc/fstab so it has PARTLABEL=swapnone swapsw 0 0 2. Run "sudo swapon PARTLABEL=swap" 3.eben@ce

Re: system won't suspend automatically

2024-06-13 Thread David Wright
> Swap:0 0 0 You have no swap. Cheers, David.

Re: system won't suspend automatically

2024-06-13 Thread eben
ndby state instead of power off. Maybe it is possible detect switched off state by reading some file in /sys. You still mix monitor and system issues. E.g. a media player may inhibit power saving for monitors. I have seen that sometimes suspend to disk (hibernate) is blocked, but I do not know detai

Re: system won't suspend automatically

2024-06-13 Thread Max Nikulin
s possible detect switched off state by reading some file in /sys. You still mix monitor and system issues. E.g. a media player may inhibit power saving for monitors. I have seen that sometimes suspend to disk (hibernate) is blocked, but I do not know details. An obvious reason is full swap,

Re: system won't suspend automatically

2024-06-13 Thread eben
you expect suspend to RAM after some period of inactivity or when lid is closed. In the latter case check power and display settings in your DE configuration. I'll probably watch ddcontrol, and if the monitors go into and stay there for 30m or an hour, suspend. Well that's a no-go, be

Re: system won't suspend automatically

2024-06-11 Thread eben
On 6/11/24 12:37, Charles Curley wrote: On Tue, 11 Jun 2024 10:44:12 -0400 e...@gmx.us wrote: Well, that is not encouraging. Does anyone know how to get the monitor state programmatically? I'll write my own script based on that. DFMS works. I mean if the computer won't do it for you, roll y

Re: system won't suspend automatically

2024-06-11 Thread eben
On 6/11/24 12:27, Max Nikulin wrote: On 11/06/2024 21:44, e...@gmx.us wrote: Does anyone know how to get the monitor state programmatically? ddccontrol Thanks. However I am lost if you need to put your monitor to standby state (or to turn it off) or you expect suspend to RAM after some

Re: system won't suspend automatically

2024-06-11 Thread Charles Curley
On Tue, 11 Jun 2024 10:44:12 -0400 e...@gmx.us wrote: > Well, that is not encouraging. Does anyone know how to get the > monitor state programmatically? I'll write my own script based on > that. DFMS works. I mean if the computer won't do it for you, roll > your own. Install arandr, use it to

Re: system won't suspend automatically

2024-06-11 Thread Max Nikulin
On 11/06/2024 21:44, e...@gmx.us wrote: Does anyone know how to get the monitor state programmatically? ddccontrol However I am lost if you need to put your monitor to standby state (or to turn it off) or you expect suspend to RAM after some period of inactivity or when lid is closed. In

Re: system won't suspend automatically

2024-06-11 Thread eben
On 6/10/24 21:11, Ralph Katz wrote: On 6/10/24 13:05, Eben King wrote: Hi, I have a Debian 12 (Bookworm?) installation with XFCE as my DE. [...] and it still doesn't suspend over night.  Suspend works just fine when I go to log out and hit the suspend button.   I don't see any obvi

Re: system won't suspend automatically

2024-06-10 Thread David Wright
Entire attribution and quote removed to avoid the mailing list treating this post as spam. Yes, but I don't know enough about modern monitor connections to know whether the monitor being on will inhibit the system from suspending. The docs for XFCE talk about preventing inconsistent configuration

Re: system won't suspend automatically

2024-06-10 Thread Ralph Katz
On 6/10/24 13:05, Eben King wrote: Hi, I have a Debian 12 (Bookworm?) installation with XFCE as my DE. [...] and it still doesn't suspend over night.  Suspend works just fine when I go to log out and hit the suspend button.   I don't see any obvious errors in journalctl.  Where c

Re: system won't suspend automatically

2024-06-10 Thread eben
seem to get that or the monitor positions correct I wrote a script >> that calls xrandr to set things up. >> >> I thought the errors from the monitor setup script (before I fixed it) were >> what was keeping the system from suspending. But now I've fixed the errors >

Re: system won't suspend automatically

2024-06-10 Thread David Wright
ote a script > that calls xrandr to set things up. > > I thought the errors from the monitor setup script (before I fixed it) were > what was keeping the system from suspending. But now I've fixed the errors > and it still doesn't suspend over night. Suspend works just fin

system won't suspend automatically

2024-06-10 Thread Eben King
s from the monitor setup script (before I fixed it) were what was keeping the system from suspending. But now I've fixed the errors and it still doesn't suspend over night. Suspend works just fine when I go to log out and hit the suspend button. I don't see any obvious errors in journ

Re: Problem of suspend activities ( debian 12 )

2024-02-29 Thread Andrew M.A. Cater
this PC, > > When the PC is on sleep mode ( suspend ) it's doesn't wake up anymore > > until forcing shutting down and this each time the PC turns on > > suspend mode, ( fastboot are disabled )of course, on my old PC dell > > i7 10th I never had this kind of issue, but

Re: Problem of suspend activities ( debian 12 )

2024-02-29 Thread Charles Curley
On Thu, 29 Feb 2024 09:38:05 +0100 Mansour Nasri wrote: > Hi I'm using debian 12 in Lenovo yoga legion core i5 12th gen with > RTX 3050 and I'm figuring a serious issue using debian 12 on this PC, > When the PC is on sleep mode ( suspend ) it's doesn't wake up any

Problem of suspend activities ( debian 12 )

2024-02-29 Thread Mansour Nasri
Hi I'm using debian 12 in Lenovo yoga legion core i5 12th gen with RTX 3050 and I'm figuring a serious issue using debian 12 on this PC, When the PC is on sleep mode ( suspend ) it's doesn't wake up anymore until forcing shutting down and this each time the PC turns on suspend

Re: Change suspend type from kde menu

2024-01-15 Thread Valerio Vanni
Il 12/01/2024 22:51, Valerio Vanni ha scritto: As Max replied to that post saying that you could avoid to kill Kaffeine   now you can try to: - stop Kaffeine - rmmod the module (what happens if you force unloading: -f option) - suspend - resume - modprobe the module - play Kaffeine but I bet

Re: Change suspend type from kde menu

2024-01-15 Thread Valerio Vanni
Il 14/01/2024 05:04, Max Nikulin ha scritto: lsof for the same process may be more informative, but currently it does not matter. Perhaps, opening devices in /dev/dvb, kaffeine does not set the O_CLOEXEC flag for open(2) (or does not call fcntl with FD_CLOEXEC). As a result, file descriptors l

Re: Change suspend type from kde menu

2024-01-13 Thread Max Nikulin
On 13/01/2024 22:37, Valerio Vanni wrote: Il 13/01/2024 16:20, Max Nikulin ha scritto: And this is one with a --lastchannel launch: lrwx-- 1 valerio valerio 64 12 gen 20.52 34 -> /dev/dvb/adapter0/frontend0 lsof for the same process may be more informative, but currently it does not mat

Re: Change suspend type from kde menu

2024-01-13 Thread Valerio Vanni
Il 13/01/2024 16:20, Max Nikulin ha scritto: And this is one with a --lastchannel launch: lrwx-- 1 valerio valerio 64 12 gen 20.52 34 -> /dev/dvb/adapter0/frontend0 lsof for the same process may be more informative, but currently it does not matter. Perhaps, opening devices in /dev/dvb,

Re: Change suspend type from kde menu

2024-01-13 Thread Max Nikulin
On 13/01/2024 04:39, Valerio Vanni wrote: Il 12/01/2024 17:24, Max Nikulin ha scritto: On 12/01/2024 21:36, Valerio Vanni wrote: dbus-send --print-reply --dest=org.mpris.kaffeine /Player org.freedesktop.MediaPlayer.Stop It seems implementation of MPRIS in kaffeine differs from what other KD

Re: Change suspend type from kde menu

2024-01-12 Thread Valerio Vanni
Kaffeine - rmmod the module (what happens if you force unloading: -f option) - suspend - resume - modprobe the module - play Kaffeine but I bet you've already realized that :) Yes, it's what I'm going to try :-) Force module unloading cannot work, it requires a specific option in

Re: Change suspend type from kde menu

2024-01-12 Thread Valerio Vanni
Il 12/01/2024 17:24, Max Nikulin ha scritto: On 12/01/2024 21:36, Valerio Vanni wrote: Tried, it works on DVB play. dbus-send --print-reply --dest=org.mpris.kaffeine /Player org.freedesktop.MediaPlayer.Stop The question is if this action can be a replacement for killing kaffeine before unl

Re: Change suspend type from kde menu

2024-01-12 Thread Franco Martelli
od the module (what happens if you force unloading: -f option) - suspend - resume - modprobe the module - play Kaffeine but I bet you've already realized that :) You can also try to not remove the module and check if stop Kaffeine, suspend/resume, play Kaffeine is enough. -- Franco Martelli

Re: Change suspend type from kde menu

2024-01-12 Thread Max Nikulin
On 12/01/2024 21:36, Valerio Vanni wrote: Tried, it works on DVB play. dbus-send --print-reply --dest=org.mpris.kaffeine /Player org.freedesktop.MediaPlayer.Stop The question is if this action can be a replacement for killing kaffeine before unloading the dvb kernel module. What is baloo'

Re: Change suspend type from kde menu

2024-01-12 Thread Valerio Vanni
Il 12/01/2024 15:03, Franco Martelli ha scritto: On 11/01/24 at 15:10, Valerio Vanni wrote: Yes, I tried, but I didn't see any "stop". There is a .Quit, but for this I already have "kill" command and I have to start it again. valerio@newton:~$ busctl --user introspect org.mpris.kaffeine / Ou

Re: Change suspend type from kde menu

2024-01-12 Thread Valerio Vanni
Il 12/01/2024 12:08, Valerio Vanni ha scritto: Il 12/01/2024 03:52, Max Nikulin ha scritto: I assume that "org/mpris/MediaPlayer2" after "/" was lost during copy&paste. I don't have MediaPlayer2 there. busctl --user introspect org.mpris.kaffeine /Player # ... .Stop  

Re: Change suspend type from kde menu

2024-01-12 Thread Franco Martelli
On 11/01/24 at 15:10, Valerio Vanni wrote: Yes, I tried, but I didn't see any "stop". There is a .Quit, but for this I already have "kill" command and I have to start it again. valerio@newton:~$ busctl --user introspect org.mpris.kaffeine / Out of curiosity could you post the output of the fo

Re: Change suspend type from kde menu

2024-01-12 Thread Valerio Vanni
Il 12/01/2024 03:52, Max Nikulin ha scritto: I assume that "org/mpris/MediaPlayer2" after "/" was lost during copy&paste. I don't have MediaPlayer2 there. busctl --user introspect org.mpris.kaffeine /Player # ... .Stop   method    - -    - I saw

Re: Change suspend type from kde menu

2024-01-11 Thread Max Nikulin
On 11/01/2024 22:45, Valerio Vanni wrote: Il 11/01/2024 16:25, Max Nikulin ha scritto: On 11/01/2024 21:10, Valerio Vanni wrote: valerio@newton:~$ busctl --user introspect org.mpris.kaffeine / I assume that "org/mpris/MediaPlayer2" after "/" was lost during copy&paste. I don't have MediaPl

Re: Change suspend type from kde menu

2024-01-11 Thread Valerio Vanni
Il 11/01/2024 16:25, Max Nikulin ha scritto: On 11/01/2024 21:10, Valerio Vanni wrote: There is a .Quit, but for this I already have "kill" command and I have to start it again. Applications might handle D-Bus messages more gracefully than SIGINT or SIGTERM signals. However in the case of kaf

Re: Change suspend type from kde menu

2024-01-11 Thread Valerio Vanni
Il 11/01/2024 15:21, Valerio Vanni ha scritto: Il 11/01/2024 04:57, Max Nikulin ha scritto: On 10/01/2024 04:43, Valerio Vanni wrote: Il 07/01/2024 06:44, Max Nikulin ha scritto: setpriv --reuid 1000 --regid 1000 --init-groups --reset-env -- \     env XDG_RUNTIME_DIR="/run/user/1000" \     sy

Re: Change suspend type from kde menu

2024-01-11 Thread Max Nikulin
On 11/01/2024 21:10, Valerio Vanni wrote: There is a .Quit, but for this I already have "kill" command and I have to start it again. Applications might handle D-Bus messages more gracefully than SIGINT or SIGTERM signals. However in the case of kaffeine it is unlikely that some data may be lo

Re: Change suspend type from kde menu

2024-01-11 Thread Valerio Vanni
Il 11/01/2024 04:57, Max Nikulin ha scritto: On 10/01/2024 04:43, Valerio Vanni wrote: Il 07/01/2024 06:44, Max Nikulin ha scritto: setpriv --reuid 1000 --regid 1000 --init-groups --reset-env -- \     env XDG_RUNTIME_DIR="/run/user/1000" \     systemd-run --user --slice=app.slice -- \     xter

Re: Change suspend type from kde menu

2024-01-11 Thread Valerio Vanni
Il 11/01/2024 05:10, Max Nikulin ha scritto: On 10/01/2024 01:59, Valerio Vanni wrote: Il 06/01/2024 17:38, Max Nikulin ha scritto: I would expect something like "Stop" either from /Player or from org.mpris.kaffeine. I too expected something similar: stop and play (play for resume) Have y

Re: Change suspend type from kde menu

2024-01-11 Thread Valerio Vanni
system context (like /usr/lib/systemd/system-sleep/ scripts) - Try to release dvb tuner device, so module can be unloaded. I believe, it is a bug in the cx23885 module that it can not handle suspend/resume (and probably hibernate/thaw). I agree. If cx23885 module could handle suspend/resume, we wo

Re: Change suspend type from kde menu

2024-01-10 Thread Max Nikulin
On 10/01/2024 01:59, Valerio Vanni wrote: Il 06/01/2024 17:38, Max Nikulin ha scritto: I would expect something like "Stop" either from /Player or from org.mpris.kaffeine. I too expected something similar: stop and play (play for resume) Have you tried "tree" and "introspect" for org.mpris

Re: Change suspend type from kde menu

2024-01-10 Thread Max Nikulin
On 10/01/2024 04:43, Valerio Vanni wrote: Il 07/01/2024 06:44, Max Nikulin ha scritto: setpriv --reuid 1000 --regid 1000 --init-groups --reset-env -- \     env XDG_RUNTIME_DIR="/run/user/1000" \     systemd-run --user --slice=app.slice -- \     xterm setpriv --reuid="$kafuid" --regid="$kafgi

Re: Change suspend type from kde menu

2024-01-10 Thread Max Nikulin
and I don't see anything like "stop" in kaffeine. It is independent ideas: - Do not deal with user processes in system context (like /usr/lib/systemd/system-sleep/ scripts) - Try to release dvb tuner device, so module can be unloaded. I believe, it is a bug in the cx23885 module t

Re: Change suspend type from kde menu

2024-01-10 Thread Valerio Vanni
Il 08/01/2024 04:29, Max Nikulin ha scritto: On 07/01/2024 12:44, Max Nikulin wrote: setpriv --reuid 1000 --regid 1000 --init-groups --reset-env -- \     env XDG_RUNTIME_DIR="/run/user/1000" \     systemd-run --user --slice=app.slice -- \     xterm Instead of tricks with setting proper contex

Re: Change suspend type from kde menu

2024-01-09 Thread Valerio Vanni
Il 07/01/2024 06:44, Max Nikulin ha scritto: It seems neither su nor sudo add process to the user context (proper cgroup, XDG session), so attempts to talk to the systemd user session through D-Bus fail. setpriv --reuid 1000 --regid 1000 --init-groups --reset-env -- \    env XDG_RUNTIME_DIR=

Re: Change suspend type from kde menu

2024-01-09 Thread Valerio Vanni
Il 06/01/2024 17:38, Max Nikulin ha scritto: On 06/01/2024 00:07, Valerio Vanni wrote: Now I'm looking: services are ├─/MainApplication ├─/Player ├─/Television ├─/TrackList └─/org    └─/org/kde └─/org/kde/kaffeine I tried to introspect the more likely, MainApplication and Television .

Re: Change suspend type from kde menu

2024-01-09 Thread Valerio Vanni
Il 06/01/2024 16:19, Max Nikulin ha scritto: On 06/01/2024 19:44, Valerio Vanni wrote: systemd-run --unit=kaffeine-resumed --uid="$kafuid" --gid="$kafgid" \    env XDG_RUNTIME_DIR=/run/user/"$kafuid" $kafdis XDG_CURRENT_DESKTOP=KDE \    /usr/bin/kaffeine --lastchannel > /dev/null 2>&1

Re: Change suspend type from kde menu

2024-01-07 Thread Max Nikulin
On 07/01/2024 12:44, Max Nikulin wrote: setpriv --reuid 1000 --regid 1000 --init-groups --reset-env -- \    env XDG_RUNTIME_DIR="/run/user/1000" \    systemd-run --user --slice=app.slice -- \    xterm Instead of tricks with setting proper context for a process executed system-wide, I would

Re: Change suspend type from kde menu

2024-01-06 Thread Max Nikulin
On 06/01/2024 22:19, Max Nikulin wrote: On 06/01/2024 19:44, Valerio Vanni wrote: systemd-run --unit=kaffeine-resumed --uid="$kafuid" --gid="$kafgid" \    env XDG_RUNTIME_DIR=/run/user/"$kafuid" $kafdis XDG_CURRENT_DESKTOP=KDE \    /usr/bin/kaffeine --lastchannel > /dev/null 2>&1 Ins

Re: Change suspend type from kde menu

2024-01-06 Thread Max Nikulin
On 06/01/2024 00:07, Valerio Vanni wrote: Now I'm looking: services are ├─/MainApplication ├─/Player ├─/Television ├─/TrackList └─/org   └─/org/kde     └─/org/kde/kaffeine I tried to introspect the more likely, MainApplication and Television .RemoveProgram  method    u

Re: Change suspend type from kde menu

2024-01-06 Thread Max Nikulin
, so attempts to talk to the systemd user session through D-Bus fail. I tried command from a ssh session root@... Behavior may be different from suspend/resume tasks since the session is associated with a pty.

Re: Change suspend type from kde menu

2024-01-06 Thread Valerio Vanni
Il 06/01/2024 01:04, Greg Wooledge ha scritto: On Fri, Jan 05, 2024 at 11:37:41PM +0100, Valerio Vanni wrote: This way works, I don't know if it has security flaws. systemd-run --unit=kaffeine-resumed setpriv --reuid "$kafuid" --regid "$kafgid" --init-groups --reset-env \ en

Re: Change suspend type from kde menu

2024-01-05 Thread Greg Wooledge
On Fri, Jan 05, 2024 at 11:37:41PM +0100, Valerio Vanni wrote: > This way works, I don't know if it has security flaws. > > systemd-run --unit=kaffeine-resumed setpriv --reuid "$kafuid" --regid > "$kafgid" --init-groups --reset-env \ > env XDG_RUNTIME_DIR=/run/user/"$kafuid" $ka

Re: Change suspend type from kde menu

2024-01-05 Thread Valerio Vanni
Il 05/01/2024 21:47, Valerio Vanni ha scritto: Il 05/01/2024 21:24, Valerio Vanni ha scritto: For what I've seen, the issue is that kaffeine is started in another unit, systemd-suspend.service instead of user@1000.service. systemd-suspend.service is deactivated after 90 seconds from resume,

Re: Change suspend type from kde menu

2024-01-05 Thread Valerio Vanni
0 newton systemd[1]: systemd-suspend.service: Deactivated successfully. 2024-01-05T19:39:20.501146+01:00 newton systemd[1]: Finished systemd-suspend.service - System Suspend. 2024-01-05T19:39:20.501227+01:00 newton systemd[1]: systemd-suspend.service: Consumed 1min 10.023s CPU time. 2024-01-05T19:

Re: Change suspend type from kde menu

2024-01-05 Thread Valerio Vanni
, minor code: 0 2024-01-05T19:39:20.501014+01:00 newton systemd[1]: systemd-suspend.service: Deactivated successfully. 2024-01-05T19:39:20.501146+01:00 newton systemd[1]: Finished systemd-suspend.service - System Suspend. 2024-01-05T19:39:20.501227+01:00 newton systemd[1]: systemd-suspend.ser

Re: Change suspend type from kde menu

2024-01-05 Thread Franco Martelli
On 05/01/24 at 20:01, Greg Wooledge wrote: On Fri, Jan 05, 2024 at 05:52:43PM +0100, Valerio Vanni wrote: setpriv --reuid "$kafuid" --regid "$kafgid" --init-groups --reset-env \ env XDG_RUNTIME_DIR=/run/user/"$kafuid" $kafdis XDG_CURRENT_DESKTOP=KDE \ /usr/bin/kaffeine

Re: Change suspend type from kde menu

2024-01-05 Thread Valerio Vanni
Il 05/01/2024 20:10, Valerio Vanni ha scritto: My first guess would be that you also need $HOME to be set, or perhaps the current working directory, or both.  --reset-env sets HOME, SHELL, USER, LOGNAME and PATH.  That seems like a reasonable addition. I have no idea why it crashes later. If

Re: Change suspend type from kde menu

2024-01-05 Thread Valerio Vanni
Il 05/01/2024 20:01, Greg Wooledge ha scritto: On Fri, Jan 05, 2024 at 05:52:43PM +0100, Valerio Vanni wrote: setpriv --reuid "$kafuid" --regid "$kafgid" --init-groups --reset-env \ env XDG_RUNTIME_DIR=/run/user/"$kafuid" $kafdis XDG_CURRENT_DESKTOP=KDE \ /usr/bin/kaff

Re: Change suspend type from kde menu

2024-01-05 Thread Greg Wooledge
On Fri, Jan 05, 2024 at 05:52:43PM +0100, Valerio Vanni wrote: > setpriv --reuid "$kafuid" --regid "$kafgid" --init-groups > --reset-env \ > env XDG_RUNTIME_DIR=/run/user/"$kafuid" $kafdis > XDG_CURRENT_DESKTOP=KDE \ > /usr/bin/kaffeine --lastchannel >/dev/null 2>&1 > -

Re: Change suspend type from kde menu

2024-01-05 Thread Valerio Vanni
a.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 18596, resource id: 134217740, major code: 15 (QueryTree), minor code: 0 2024-01-05T19:39:20.501014+01:00 newton systemd[1]: systemd-suspend.service: Deactivated successfully. 2024-01-05T19:39:20.501146+01:00 newton systemd[1]: Fin

Re: Change suspend type from kde menu

2024-01-05 Thread Valerio Vanni
ld I find here? Ideally kaffeine should implement the Inhibit interface and should close devices on suspend or on user session switch. Ideally...

Re: Change suspend type from kde menu

2024-01-05 Thread Valerio Vanni
Il 04/01/2024 16:27, Greg Wooledge ha scritto: On Thu, Jan 04, 2024 at 03:07:59PM +0100, Valerio Vanni wrote: Il 03/01/2024 17:41, Greg Wooledge ha scritto: The su command is not an ideal choice for this, in fact. The setpriv(1) command is better suited for running programs as other user accou

Re: Change suspend type from kde menu

2024-01-04 Thread Max Nikulin
close it. But then you have also to request it to play again. Is there an action that releases the device? "ls -l /proc/PID/fd" to check. Ideally kaffeine should implement the Inhibit interface and should close devices on suspend or on user session switch.

Re: Change suspend type from kde menu

2024-01-04 Thread Greg Wooledge
On Thu, Jan 04, 2024 at 03:07:59PM +0100, Valerio Vanni wrote: > Il 03/01/2024 17:41, Greg Wooledge ha scritto: > > The su command is not an ideal choice for this, in fact. The setpriv(1) > > command is better suited for running programs as other user accounts, > > without doing crazy PAM stuff li

Re: Change suspend type from kde menu

2024-01-04 Thread Valerio Vanni
Il 04/01/2024 15:48, Max Nikulin ha scritto: On 04/01/2024 21:03, Valerio Vanni wrote: kaffeine_killed=$(/usr/bin/killall kaffeine 2>&1) echo $kaffeine_killed > /temp/kafstate.txt /usr/bin/sleep 2 /usr/sbin/rmmod cx23885 Is it really necessar

Re: Change suspend type from kde menu

2024-01-04 Thread Max Nikulin
On 04/01/2024 21:03, Valerio Vanni wrote:     kaffeine_killed=$(/usr/bin/killall kaffeine 2>&1)     echo $kaffeine_killed > /temp/kafstate.txt     /usr/bin/sleep 2     /usr/sbin/rmmod cx23885 Is it really necessary to kill kaffeine or it is enough to pause or

Re: Change suspend type from kde menu

2024-01-04 Thread Valerio Vanni
Il 03/01/2024 17:41, Greg Wooledge ha scritto: The UID of 1000 will have to be verified, as well as the YOURUSER. UID 1000 is what Debian uses for the initial user account that's created during installation, but if for some reason that's not the account who's currently logged in, then obviously

Re: Change suspend type from kde menu

2024-01-04 Thread Valerio Vanni
Il 03/01/2024 23:52, Valerio Vanni ha scritto: Il 03/01/2024 17:18, Franco Martelli ha scritto: On 02/01/24 at 19:15, Valerio Vanni wrote: This way, I don't have to remember to close kaffeine before suspend. If you have Kaffeine always running on your system you can try this script:

Re: Change suspend type from kde menu

2024-01-03 Thread Valerio Vanni
Il 03/01/2024 17:18, Franco Martelli ha scritto: On 02/01/24 at 19:15, Valerio Vanni wrote: This way, I don't have to remember to close kaffeine before suspend. If you have Kaffeine always running on your system you can try this script: I had an idea to do a relaunch, but it's

Re: Change suspend type from kde menu

2024-01-03 Thread Arno Lehmann
w | awk -e '$3==":0" { print $1 }' A cleaner approach would be to record what was killed in the pre-suspend phase and recreate that post wakeup, in my opinion. Cheers, Arno -- Arno Lehmann IT-Service Lehmann Sandstr. 6, 49080 Osnabrück

Re: Change suspend type from kde menu

2024-01-03 Thread Greg Wooledge
On Wed, Jan 03, 2024 at 05:18:19PM +0100, Franco Martelli wrote: > /usr/bin/su YOURUSER -c 'XDG_RUNTIME_DIR=/run/user/1000 > DISPLAY=:0 XDG_CURRENT_DESKTOP=KDE /usr/bin/kaffeine >/dev/null 2>&1 &' > In place of YOURUSER you've to put your username, if you doubt the command > "whoami" w

Re: Change suspend type from kde menu

2024-01-03 Thread Franco Martelli
On 02/01/24 at 19:15, Valerio Vanni wrote: This way, I don't have to remember to close kaffeine before suspend. If you have Kaffeine always running on your system you can try this script: #!/bin/sh # Run

Re: Change suspend type from kde menu

2024-01-02 Thread Valerio Vanni
Il 28/12/2023 23:17, Valerio Vanni ha scritto: I found that pm-suspend works because it unloads and reloades that module In "/etc/pm/config.d/modules" there is --- SUSPEND_MODULES="cx23885" --- Now I've replicated this on systemd side with this script similar to

  1   2   3   4   5   6   7   8   9   10   >