Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Screen goes black after 5 minutes while using a controller
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
rattiraivo
n00b
n00b


Joined: 06 Jun 2024
Posts: 35

PostPosted: Mon Jul 22, 2024 11:42 am    Post subject: Screen goes black after 5 minutes while using a controller Reply with quote

Hey.

So if I use my mouse and keyboard it won't go black, but when using a controller it goes black after a certain period of time as if I afk.

My monitor was set to go sleep mode after 10 minutes of inactivity, I changed it to 120 to circumvent the issue, but I'd like to get to the bottom of it and make it never go to sleep when using a controller.

Thanks.

Edit: Currently using openbox, if that matters.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22852

PostPosted: Mon Jul 22, 2024 11:57 am    Post subject: Reply with quote

What tool is responsible for blanking the screen? OpenBox is a window manager. Usually, screen blanking is handled by a dedicated screensaver. In your case, the screensaver seems not to consider controller activity to be user activity, but does consider both keyboard and mouse activity to be user activity. How is the controller reported on the system? Is it considered a mouse, a joystick, or something else?
Back to top
View user's profile Send private message
rattiraivo
n00b
n00b


Joined: 06 Jun 2024
Posts: 35

PostPosted: Mon Jul 22, 2024 12:09 pm    Post subject: Reply with quote

I don't know what is responsible for it.

dmesg for the controller: https://pastebin.com/79EVh0aG

And that's actually another issue of mine, while it seems fine in dmesg (atleast I'm seeing it that way) I can see the controller in pavucontrol as "headset microphone" which causes my real microphones gains to go back up to 100% whenever I connect my controller.

Edit: I used to use kde before moving onto openbox, and I still haven't ran emerge -avc after deselecting the kde metapackage because I'm too lazy to update the kernel :p
Back to top
View user's profile Send private message
lekto
Apprentice
Apprentice


Joined: 20 Sep 2014
Posts: 213
Location: Ancient Rome

PostPosted: Mon Jul 22, 2024 5:13 pm    Post subject: Reply with quote

Same problem here; I'm running lxqt, xscreensaver, and Steam (flatpak). My wired Xbox 360 controller works in games but doesn't prevent xscreensaver from locking. The controller doesn't appear in xinput nor libinput, and xev doesn't react to it. I tried the xpad kernel module and the xboxdrv userspace driver with the same result. When plugging the controller, those lines appear in Xorg.0.log:
Code:
[    28.530] (II) config/udev: Adding input device Microsoft X-Box 360 pad (/dev/input/js0)
[    28.531] (**) Microsoft X-Box 360 pad: Applying InputClass "joystick-all"
[    28.531] (**) Microsoft X-Box 360 pad: Applying InputClass "Touchpad"
[    28.531] (II) Using input driver 'libinput' for 'Microsoft X-Box 360 pad'
[    28.531] (**) Microsoft X-Box 360 pad: always reports core events
[    28.531] (**) Option "Device" "/dev/input/js0"
[    28.555] (II) js0     - not using input device '/dev/input/js0'.
[    28.555] (EE) libinput: Microsoft X-Box 360 pad: Failed to create a device for /dev/input/js0
[    28.555] (EE) PreInit returned 2 for "Microsoft X-Box 360 pad"
[    28.555] (II) UnloadModule: "libinput"
[    28.556] (II) config/udev: Adding input device Microsoft X-Box 360 pad (/dev/input/event13)
[    28.556] (**) Microsoft X-Box 360 pad: Applying InputClass "joystick-all"
[    28.556] (**) Microsoft X-Box 360 pad: Applying InputClass "Touchpad"
[    28.556] (II) Using input driver 'libinput' for 'Microsoft X-Box 360 pad'
[    28.556] (**) Microsoft X-Box 360 pad: always reports core events
[    28.556] (**) Option "Device" "/dev/input/event13"
[    28.558] (II) event13 - Microsoft X-Box 360 pad: is tagged by udev as: Joystick
[    28.558] (II) event13 - Microsoft X-Box 360 pad: device is a joystick or a gamepad, ignoring
[    28.584] (II) event13 - not using input device '/dev/input/event13'.
[    28.584] (EE) libinput: Microsoft X-Box 360 pad: Failed to create a device for /dev/input/event13
[    28.584] (EE) PreInit returned 2 for "Microsoft X-Box 360 pad"
[    28.584] (II) UnloadModule: "libinput"


Code:
lekto@lapek ~ $ ls -l /dev/input/
total 0
drwxr-xr-x  2 root root      80 Jul 22 18:59 by-id
drwxr-xr-x  2 root root     180 Jul 22 18:59 by-path
crw-rw----  1 root input 13, 64 Jul 22 18:59 event0
crw-rw----  1 root input 13, 65 Jul 22 18:59 event1
crw-rw----  1 root input 13, 74 Jul 22 18:59 event10
crw-rw----  1 root input 13, 75 Jul 22 18:59 event11
crw-rw----  1 root input 13, 76 Jul 22 18:59 event12
crw-rw----+ 1 root input 13, 77 Jul 22 18:59 event13
crw-rw----  1 root input 13, 66 Jul 22 18:59 event2
crw-rw----  1 root input 13, 67 Jul 22 18:59 event3
crw-rw----  1 root input 13, 68 Jul 22 18:59 event4
crw-rw----  1 root input 13, 69 Jul 22 18:59 event5
crw-rw----  1 root input 13, 70 Jul 22 18:59 event6
crw-rw----  1 root input 13, 71 Jul 22 18:59 event7
crw-rw----  1 root input 13, 72 Jul 22 18:59 event8
crw-rw----  1 root input 13, 73 Jul 22 18:59 event9
crw-rw-r--+ 1 root input 13,  0 Jul 22 18:59 js0

/dev/input/js0 is created after plugging in the controller, but something is wrong; I'm in the input group. My guess is Gentoo is missing something that causes the controller to not work, and that's why xscreensaver locks. But Steam somehow talks directly with /dev/input, and that's why it works in games.

EDIT
Looks like those two files in /dev/input have ACLs:
Code:
lekto@lapek ~ $ getfacl /dev/input/js0 /dev/input/event13
getfacl: Removing leading '/' from absolute path names
# file: dev/input/js0
# owner: root
# group: input
user::rw-
user:lekto:rw-
group::rw-
mask::rw-
other::r--

# file: dev/input/event13
# owner: root
# group: input
user::rw-
user:lekto:rw-
group::rw-
mask::rw-
other::---


EDIT
Looks like the controller is working, at least evtest detects it:
Code:
lekto@lapek ~ $ evtest /dev/input/event13
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x45e product 0x28e version 0x114
Input device name: "Microsoft X-Box 360 pad"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 304 (BTN_SOUTH)
    Event code 305 (BTN_EAST)
    Event code 307 (BTN_NORTH)
    Event code 308 (BTN_WEST)
    Event code 310 (BTN_TL)
    Event code 311 (BTN_TR)
    Event code 314 (BTN_SELECT)
    Event code 315 (BTN_START)
    Event code 316 (BTN_MODE)
    Event code 317 (BTN_THUMBL)
    Event code 318 (BTN_THUMBR)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value    334
      Min   -32768
      Max    32767
      Fuzz      16
      Flat     128
    Event code 1 (ABS_Y)
      Value   -210
      Min   -32768
      Max    32767
      Fuzz      16
      Flat     128
    Event code 2 (ABS_Z)
      Value      0
      Min        0
      Max      255
    Event code 3 (ABS_RX)
      Value  -2781
      Min   -32768
      Max    32767
      Fuzz      16
      Flat     128
    Event code 4 (ABS_RY)
      Value   -975
      Min   -32768
      Max    32767
      Fuzz      16
      Flat     128
    Event code 5 (ABS_RZ)
      Value      0
      Min        0
      Max      255
    Event code 16 (ABS_HAT0X)
      Value      0
      Min       -1
      Max        1
    Event code 17 (ABS_HAT0Y)
      Value      0
      Min       -1
      Max        1
  Event type 21 (EV_FF)
    Event code 80 (FF_RUMBLE)
    Event code 81 (FF_PERIODIC)
    Event code 88 (FF_SQUARE)
    Event code 89 (FF_TRIANGLE)
    Event code 90 (FF_SINE)
    Event code 96 (FF_GAIN)
Properties:
Testing ... (interrupt to exit)
Event: time 1721670188.636011, type 3 (EV_ABS), code 1 (ABS_Y), value -105
Event: time 1721670188.636011, type 3 (EV_ABS), code 4 (ABS_RY), value 1404
Event: time 1721670188.636011, -------------- SYN_REPORT ------------
Event: time 1721670188.643998, type 3 (EV_ABS), code 1 (ABS_Y), value -210
Event: time 1721670188.643998, type 3 (EV_ABS), code 3 (ABS_RX), value -2890
Event: time 1721670188.643998, type 3 (EV_ABS), code 4 (ABS_RY), value 4540
Event: time 1721670188.643998, -------------- SYN_REPORT ------------
Event: time 1721670188.663759, type 3 (EV_ABS), code 4 (ABS_RY), value 864
Event: time 1721670188.663759, -------------- SYN_REPORT ------------
Event: time 1721670188.671811, type 3 (EV_ABS), code 1 (ABS_Y), value -105
Event: time 1721670188.671811, type 3 (EV_ABS), code 4 (ABS_RY), value -1624
(…)
Back to top
View user's profile Send private message
lekto
Apprentice
Apprentice


Joined: 20 Sep 2014
Posts: 213
Location: Ancient Rome

PostPosted: Mon Aug 19, 2024 4:48 pm    Post subject: Reply with quote

I was looking at gamemode, and it looks like it can be set to block screensaver when a game is running. It isn't the perfect solution, but it's better than nothing.
Code:
; Sets whether gamemode will inhibit the screensaver when active
; Defaults to 1
inhibit_screensaver=1
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum