You are not logged in.

#1 2023-11-03 21:05:36

d.ALT
Member
Registered: 2019-05-10
Posts: 911

[SOLVED] flycast freezes whole system (in SDL KMS/DRM)

Resuming from here.

Whole machine get stuck locally when launching Flycast from SDL KMS/DRM: no responses to keyboard and/or mouse inputs. Caps Lock and Num Lock (LED) indicators won't ever respond.
SDL-KMS-DRM-Flycast-get-stuck.jpg

But, If I connect via ssh, then I can pkill fycast just fine: after this I can regain local control of the machine.


$ cat loginctl_session-status.redirect 
3 - fly (1000)
           Since: Fri 2023-11-03 21:13:23 CET; 34min ago
          Leader: 369 (login)
            Seat: seat0; vc2
             TTY: tty2
         Service: login; type tty; class user
           State: active
            Idle: no
            Unit: session-3.scope
                  ├─369 "login -- fly"
                  ├─372 -bash
                  └─696 loginctl session-status


Everything that follows down below was done remotely (ssh):

Notice the "^C": I'm exiting Flycast with <CTRL+C> while inside ssh

$ flycast &>>flycast-running.redirect
FLYCAST OPEN-UP ON THE LOCAL MACHINE, HERE I AM INSIDE SSH
^C[fly@caravaggio ~]$ cat flycast-running.redirect 
00:00:557 sdl/sdl.cpp:625 N[RENDERER]: Monitor refresh rate: 60 Hz (1920 x 1080)
00:00:560 rend/gui.cpp:297 N[RENDERER]: Screen DPI is 96, size 640 x 480. Scaling by 1.00
00:00:571 rend/gles/gles.cpp:577 N[RENDERER]: OpenGL version 4.6
00:01:576 rend/boxart/scraper.cpp:53 W[COMMON]: can't create local file /home/fly/.local/share/flycast//boxart/79369492.png: error 2

\\\

$ flycast &
[1] 665
[fly@caravaggio ~]$ 00:00:129 sdl/sdl.cpp:625 N[RENDERER]: Monitor refresh rate: 60 Hz (1920 x 1080)
00:00:132 rend/gui.cpp:297 N[RENDERER]: Screen DPI is 96, size 640 x 480. Scaling by 1.00
00:00:143 rend/gles/gles.cpp:577 N[RENDERER]: OpenGL version 4.6
00:00:821 rend/boxart/scraper.cpp:53 W[COMMON]: can't create local file /home/fly/.local/share/flycast//boxart/675465113.png: error 2
ps aux | grep flycast
fly          665  3.2  0.9 1585076 143592 pts/0  Sl   21:44   0:00 flycast
fly          680  0.0  0.0   7220  2432 pts/0    S+   21:44   0:00 grep --color=auto flycast

\\\

$ pkill flycast 
[fly@caravaggio ~]$ 00:57:002 rend/boxart/boxart.cpp:146 W[COMMON]: Can't save boxart database to /home/fly/.local/share/flycast//boxart/flycast-gamedb.json: error 2

\\\

$ loginctl session-status 
4 - fly (1000)
           Since: Fri 2023-11-03 21:25:22 CET; 20min ago
          Leader: 552 (sshd)
             TTY: pts/0
          Remote: 192.168.1.2
         Service: sshd; type tty; class user
           State: active
            Idle: no
            Unit: session-4.scope
                  ├─552 "sshd: fly [priv]"
                  ├─554 "sshd: fly@pts/0"
                  ├─555 -bash
                  ├─690 loginctl session-status
                  └─691 less

\\\

$ getfacl /dev/snd/controlC0 /dev/drm_dp_aux{0,1,2} /dev/dri/{card1,renderD128}
getfacl: Removing leading '/' from absolute path names
# file: dev/snd/controlC0
# owner: root
# group: audio
user::rw-
user:fly:rw-
group::rw-
mask::rw-
other::---

# file: dev/drm_dp_aux0
# owner: root
# group: root
user::rw-
group::---
other::---

# file: dev/drm_dp_aux1
# owner: root
# group: root
user::rw-
group::---
other::---

# file: dev/drm_dp_aux2
# owner: root
# group: root
user::rw-
group::---
other::---

# file: dev/dri/card1
# owner: root
# group: video
user::rw-
user:fly:rw-
group::rw-
mask::rw-
other::---

# file: dev/dri/renderD128
# owner: root
# group: render
user::rw-
group::rw-
other::rw-

Last edited by d.ALT (2023-11-04 16:22:20)


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#2 2023-11-03 21:28:56

seth
Member
Registered: 2012-09-03
Posts: 48,406

Re: [SOLVED] flycast freezes whole system (in SDL KMS/DRM)

can't create local file /home/fly/.local/share/flycast//boxart/79369492.png: error 2

"2" is ENOENT

ls -lR /home/fly/.local/share/flycast

Can you tell whether audio/video are also "stuck" or this is maybe just an input failure?
Can you still switch the TTY (ctrl+alt+F1,F2,F3,… or w/ "sudo chvt 3" from the ssh login)?

Online

#3 2023-11-04 10:42:18

d.ALT
Member
Registered: 2019-05-10
Posts: 911

Re: [SOLVED] flycast freezes whole system (in SDL KMS/DRM)

$ ls -1aN ~ ~/.config/flycast/
/home/fly:
.
..
.bash_history
.bash_logout
.bash_profile
.bashrc
.cache
.config
flycast-running.redirect
.lesshst
loginctl_session-status.redirect
audio.wav
srcbuild

/home/fly/.config/flycast/:
.
..
emu.cfg
seth wrote:

Can you tell whether audio/video are also "stuck" or this is maybe just an input failure?

Since the machine becoming unresponsive with Flycast running, I could not test locally; I managed to play some audio via aplay audio.wav via ssh, though.


seth wrote:

Can you still switch the TTY (ctrl+alt+F1,F2,F3

Nope.


seth wrote:

w/ "sudo chvt 3" from the ssh login)?

Yes.
This happens with and without Flycast running:

$ loginctl list-sessions && su -c 'chvt 2' && loginctl list-sessions 
SESSION  UID USER SEAT  TTY   STATE  IDLE SINCE
      1 1000 fly  seat0 tty1  active no        
      6 1000 fly        pts/0 active no        

2 sessions listed.
Password: 
SESSION  UID USER SEAT  TTY   STATE  IDLE SINCE
      1 1000 fly  seat0 tty1  online no        
      6 1000 fly        pts/0 active no        

2 sessions listed.

But, if Flycast is running, I do NOT see switching to tty2 on the monitor of the local machine.


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#4 2023-11-04 13:58:02

seth
Member
Registered: 2012-09-03
Posts: 48,406

Re: [SOLVED] flycast freezes whole system (in SDL KMS/DRM)

But, if Flycast is running, I do NOT see switching to tty2 on the monitor of the local machine.

So the only guarantee is that the framebuffer is locked - be careful w/ random input since it might still be interpreted.

I managed to play some audio via aplay audio.wav via ssh, though.

I meant sound from flycast (though idk. whether it plays any)

ls -1aN ~ ~/.config/flycast/

So there's no /home/fly/.local/share/flycast - you could try to create it, but I don't think that'll fixthe frozen output.

Please post your complete system journal for the boot:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

Esp. Enable https://wiki.archlinux.org/title/NVIDIA … de_setting and in doubt add "initcall_blacklist=simpledrm_platform_driver_init" to the https://wiki.archlinux.org/title/Kernel_parameters (it doesn't matter wether you've an nvidia GPU, the parameter will block the simpledrm device)

Online

#5 2023-11-04 15:56:23

d.ALT
Member
Registered: 2019-05-10
Posts: 911

Re: [SOLVED] flycast freezes whole system (in SDL KMS/DRM)

seth wrote:

I managed to play some audio via aplay audio.wav via ssh, though.

I meant sound from flycast (though idk. whether it plays any)

Flycast can boot games and correctly reproduce both audio and video output; while game is running:

  • any inputs is NOT accepted, but

    • Caps Lock and Num Lock (LED) indicators are now responding

  • speaker produces beep sounds when pressing <ESC> or <TAB> or any <Fn>

  • pkill flycast OK, as usual, but

    • pressing <CTRL+C> frezzes the computer and ssh also this time (I must locally combo the <CTRL+ALT+CANC> to reboot the computer)

  • all of the above happen only if executing Flycast from ssh


Manually creating .local/share/flycast/ solves nothing. (isn't such a bad thing creating ~/.local/share path manually? "Who" takes care of it, usually? Desktops Environment?)


https://0x0.st/HtZC.log

https://0x0.st/HtNa.log (nvidia_drm.modeset=1 initcall_blacklist=simpledrm_platform_driver_init)

Last edited by d.ALT (2023-11-04 16:06:50)


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#6 2023-11-04 16:02:21

seth
Member
Registered: 2012-09-03
Posts: 48,406

Re: [SOLVED] flycast freezes whole system (in SDL KMS/DRM)

getfacl /dev/input/*

Edit

nov 04 16:17:49 caravaggio kernel: simple-framebuffer simple-framebuffer.0: [drm] fb0: simpledrmdrmfb frame buffer device

seth wrote:

Enable https://wiki.archlinux.org/title/NVIDIA … de_setting and in doubt add "initcall_blacklist=simpledrm_platform_driver_init" to the https://wiki.archlinux.org/title/Kernel_parameters (it doesn't matter wether you've an nvidia GPU, the parameter will block the simpledrm device)

There's no problem w/ creating paths, the question is whether that helps flycast (which you'd normally expect to create the relevant paths itself instead of issuing an ENOENT, that's probably a bug)

Last edited by seth (2023-11-04 16:05:24)

Online

#7 2023-11-04 16:09:27

d.ALT
Member
Registered: 2019-05-10
Posts: 911

Re: [SOLVED] flycast freezes whole system (in SDL KMS/DRM)

# file: dev/input/by-id
# owner: root
# group: root
user::rwx
group::r-x
other::r-x

# file: dev/input/by-path
# owner: root
# group: root
user::rwx
group::r-x
other::r-x

# file: dev/input/event0
# owner: root
# group: input
user::rw-
group::rw-
other::---

# file: dev/input/event1
# owner: root
# group: input
user::rw-
group::rw-
other::---

# file: dev/input/event10
# owner: root
# group: input
user::rw-
group::rw-
other::---

# file: dev/input/event11
# owner: root
# group: input
user::rw-
group::rw-
other::---

# file: dev/input/event12
# owner: root
# group: input
user::rw-
group::rw-
other::---

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

# file: dev/input/event14
# owner: root
# group: input
user::rw-
group::rw-
other::---

# file: dev/input/event15
# owner: root
# group: input
user::rw-
group::rw-
other::---

# file: dev/input/event16
# owner: root
# group: input
user::rw-
group::rw-
other::---

# file: dev/input/event17
# owner: root
# group: input
user::rw-
group::rw-
other::---

# file: dev/input/event18
# owner: root
# group: input
user::rw-
group::rw-
other::---

# file: dev/input/event2
# owner: root
# group: input
user::rw-
group::rw-
other::---

# file: dev/input/event3
# owner: root
# group: input
user::rw-
group::rw-
other::---

# file: dev/input/event4
# owner: root
# group: input
user::rw-
group::rw-
other::---

# file: dev/input/event5
# owner: root
# group: input
user::rw-
group::rw-
other::---

# file: dev/input/event6
# owner: root
# group: input
user::rw-
group::rw-
other::---

# file: dev/input/event7
# owner: root
# group: input
user::rw-
group::rw-
other::---

# file: dev/input/event8
# owner: root
# group: input
user::rw-
group::rw-
other::---

# file: dev/input/event9
# owner: root
# group: input
user::rw-
group::rw-
other::---

# file: dev/input/mice
# owner: root
# group: input
user::rw-
group::rw-
other::---

# file: dev/input/mouse0
# owner: root
# group: input
user::rw-
group::rw-
other::---
seth wrote:

Edit

nov 04 16:17:49 caravaggio kernel: simple-framebuffer simple-framebuffer.0: [drm] fb0: simpledrmdrmfb frame buffer device

Edit


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#8 2023-11-04 16:10:40

d.ALT
Member
Registered: 2019-05-10
Posts: 911

Re: [SOLVED] flycast freezes whole system (in SDL KMS/DRM)

d.ALT wrote:

https://0x0.st/HtNa.log (nvidia_drm.modeset=1 initcall_blacklist=simpledrm_platform_driver_init)

Changes nothing.


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#9 2023-11-04 16:12:44

seth
Member
Registered: 2012-09-03
Posts: 48,406

Re: [SOLVED] flycast freezes whole system (in SDL KMS/DRM)

Try adding your self/fly to the "input" group (it's typically not required, but we'll see)

Online

#10 2023-11-04 16:19:19

d.ALT
Member
Registered: 2019-05-10
Posts: 911

Re: [SOLVED] flycast freezes whole system (in SDL KMS/DRM)

seth wrote:

"input" group

https://bbs.archlinux.org/viewtopic.php … 1#p2129381

d.ALT wrote:

Then, I remembered back in the "old" days that a user had to be inside audio, video and input groups in order to have control of peripherals (also inside X!). So, adding myself to that groups made flycast to properly run with mouse and keyboard support also!!! big_smile

It's in fact working, indeed:

$ grep input /etc/group
input:x:994:fly
seth wrote:

(it's typically not required,

So... What can I do now, then? Leave fly inside input?


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#11 2023-11-04 17:03:24

seth
Member
Registered: 2012-09-03
Posts: 48,406

Re: [SOLVED] flycast freezes whole system (in SDL KMS/DRM)

Yes.
It's probably expecting write permissions on the input devices (for whatever reason you'd have to ask upstream, though it might be an SDL problem)

Online

Board footer

Powered by FluxBB