You are not logged in.

#1 2025-01-28 21:43:18

stbug
Member
Registered: 2025-01-23
Posts: 21

[SOLVED] My screen gets suspended even if I'm watching a video

Even if I'm being active, playing or watching a video, the screen gets suspended (I think that's how it's called when the screen gets dim after innactivity).
This happens on the headless mode (tty session), but is not a real problem. The problem is during the X session with startx.
I was hoping to find a way so it gets detected and doesn't suspend or, in the worst case scenario, to completely remove the suspend timer.

Last edited by stbug (2025-02-12 03:04:48)

Offline

#2 2025-01-28 21:57:02

mackin_cheese
Member
Registered: 2025-01-07
Posts: 477

Re: [SOLVED] My screen gets suspended even if I'm watching a video

what DE / WM are you using?

Offline

#3 2025-01-29 01:34:16

stbug
Member
Registered: 2025-01-23
Posts: 21

Re: [SOLVED] My screen gets suspended even if I'm watching a video

mackin_cheese wrote:

what DE / WM are you using?

I use the 2bwm on the X session, so I don't have any current desktop manager installed. I usually just use the tty as default and open an X session for some apps.

Last edited by stbug (2025-01-29 01:36:09)

Offline

#4 2025-01-29 10:00:50

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,175

Re: [SOLVED] My screen gets suspended even if I'm watching a video

How are you starting the session? Most screensaver blocking happens via a dbus call that mandates an intact login session, i.e. that the notes in https://wiki.archlinux.org/title/Xinit#xinitrc are followed and a user session properly established. Also not entirely sure whether systemd handles that interface directly itself or some power daemon is necessary that registers itself on the relevant dbus address.

Offline

#5 2025-01-29 16:50:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,428

Re: [SOLVED] My screen gets suspended even if I'm watching a video

OP wrote:

The problem is during the X session with startx.

Also what exactly plays the videos? mpv? mplayer? …

Offline

#6 2025-01-29 18:49:11

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,175

Re: [SOLVED] My screen gets suspended even if I'm watching a video

Ah whoops, the note part regarding xinitrc still holds anyway tongue

Offline

#7 2025-02-02 01:58:47

stbug
Member
Registered: 2025-01-23
Posts: 21

Re: [SOLVED] My screen gets suspended even if I'm watching a video

V1del wrote:

How are you starting the session? Most screensaver blocking happens via a dbus call that mandates an intact login session, i.e. that the notes in https://wiki.archlinux.org/title/Xinit#xinitrc are followed and a user session properly established. Also not entirely sure whether systemd handles that interface directly itself or some power daemon is necessary that registers itself on the relevant dbus address.

I don't know what do you mean when you say how I start my session, but I think you are refering to my ~/.xinitrc right?

2bwm &
xbindkeys
exec xterm -g 60x20+0+0 -fg white -bg black

Offline

#8 2025-02-02 02:00:03

stbug
Member
Registered: 2025-01-23
Posts: 21

Re: [SOLVED] My screen gets suspended even if I'm watching a video

seth wrote:
OP wrote:

The problem is during the X session with startx.

Also what exactly plays the videos? mpv? mplayer? …

It happens when I play videos from VLC Media Player, and the last time happend while playing DBZ Sparking Zero using Wine

Offline

#9 2025-02-02 14:26:00

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,428

Re: [SOLVED] My screen gets suspended even if I'm watching a video

Your xinitrc is broken, leading to a degenerated session lacking session bus integration => last link below.
nb. that VLC has a setting for this behavior, iirc it's off by default?

Offline

#10 2025-02-03 20:05:30

stbug
Member
Registered: 2025-01-23
Posts: 21

Re: [SOLVED] My screen gets suspended even if I'm watching a video

seth wrote:

Your xinitrc is broken, leading to a degenerated session lacking session bus integration => last link below.
nb. that VLC has a setting for this behavior, iirc it's off by default?

Well, I don't know why is broken my xinitrc, but I copied all the lines from the original xinitrc and it now looks like this

#!/bin/sh

xrdb=xrdb
xinitdir=/etc/X11/xinit
xclock=xclock
xterm=xterm
twm=2bwm
xmodmap=xmodmap

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=$xinitdir/.Xresources
sysmodmap=$xinitdir/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    if [ -x /usr/bin/cpp ] ; then
        $xrdb -merge $sysresources
    else
        $xrdb -nocpp -merge $sysresources
    fi
fi

if [ -f $sysmodmap ]; then
    $xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
    if [ -x /usr/bin/cpp ] ; then
        $xrdb -merge "$userresources"
    else
        $xrdb -nocpp -merge "$userresources"
    fi
fi

if [ -f "$usermodmap" ]; then
    $xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d $xinitdir/xinitrc.d ] ; then
 for f in "$xinitdir/xinitrc.d"/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

$twm &
xbindkeys &
exec $xterm -g 60x20+0+0 -fg white -bg black

But the problem persists. And I didn't find how to configure the iirc on vlc.

Offline

#11 2025-02-03 20:29:02

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,428

Re: [SOLVED] My screen gets suspended even if I'm watching a video

This block is crucial:

if [ -d $xinitdir/xinitrc.d ] ; then
 for f in "$xinitdir/xinitrc.d"/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

Did you check the video preferences?
Does eg. mpv succesfully block the screensaver/DPMS/suspend?

Offline

#12 2025-02-03 23:54:48

stbug
Member
Registered: 2025-01-23
Posts: 21

Re: [SOLVED] My screen gets suspended even if I'm watching a video

seth wrote:

Did you check the video preferences?

Yes, but i can't find this iirc option

Offline

#13 2025-02-03 23:56:22

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,428

Offline

#14 2025-02-10 07:08:37

stbug
Member
Registered: 2025-01-23
Posts: 21

Re: [SOLVED] My screen gets suspended even if I'm watching a video

JAJAJAJAJAJJAJAJA, well I hate abbreviations then
I didn't check again with VLC after having fixed my .xinitrc, but it seems that Discord doesn't get dimmed for inactivity, so it may be a problem with wine

Offline

#15 2025-02-10 07:31:11

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,428

Re: [SOLVED] My screen gets suspended even if I'm watching a video

wine could pot. try to block DPMS itself, but is unlikely forwarding anything like this from windows clients.
You're aware that discord is in the repos?
And it depends on https://archlinux.org/packages/extra/x86_64/libxss/

Offline

#16 2025-02-12 03:04:27

stbug
Member
Registered: 2025-01-23
Posts: 21

Re: [SOLVED] My screen gets suspended even if I'm watching a video

seth wrote:

try to block DPMS itself, but is unlikely forwarding anything like this from windows clients.

Ah well, that works for me. I don't really like it anyways so turning it off is okey
Thank you so much, I didn't even know how was it called

Offline

Board footer

Powered by FluxBB