SpottyMatt / raspbian-stepmania-arcade

Guide & scripts to turn a Raspberry Pi into a StepMania arcade machine
83 stars 7 forks source link

Stepmania doesn’t load and system lags #2

Closed tony2win closed 5 years ago

tony2win commented 5 years ago

I followed the instructions to install on a new 3b+ running stretch. Everything seemed fine, but when I reboot, Stepmania doesn’t auto start, and the system seems to be bogged down, though I’m not sure how to diagnose.

SpottyMatt commented 5 years ago

Please provide the following information, and let's see if we can figure anything out:

System Info

  1. List every device that is connected to the Raspberry Pi, and how (e.g. "Monitor over HDMI, keyboard over USB, mouse over bluetooth, etc)
  2. Output of free -h (how much RAM is allocated to the GPU)
  3. Contents of /boot/config.txt (use three backticks to include it in a GitHub Issue, e.g. ```contents```

Diagnostic Info

Once the Pi starts up and is "sluggish," please run the following commands and report their output:

  1. ps aux | grep step (what's running)
  2. top -b -n 1 -o +%CPU (what's taking up CPU)
  3. ls /tmp/.X11-unix/ (what display servers are available)

By Hand

Run killall stepmania (stop stepmania if running) in a terminal, then run /usr/local/stepmania-5.2/stepmania --verbose (start stepmania by hand). Eventually the command will stop generating output; please report every line it prints.

If StepMania opens, you may need to exit out of it to collect that information.

A Note On Commands

All of the commands above assume you're looking at the one and only monitor connected to the Raspberry Pi when you run them. If this is not the kind of setup you have, please let me know.

tony2win commented 5 years ago

Well, it seems the system freezes up after a while, necessitating a pull of the power cable and connecting back again. It's not immediate, but if I just leave the pi powered on and turn my monitor on, I can come back a few hours later and there's absolutely no response (num-lock on keyboard doesn't turn on/off). Also, there are no files in /usr/loca/stepmania-5.2/ , even though the directory exists. Definitely seems to be part of the issues I'm having. I've tried the whole process with a clean flash of raspbian a few times now.

Edit — I’m not sure if the system starts lagging and hangs eventually with nothing running — I run chromium to load this github project page on the pi. I’m not sure if leaving that up has anything to do with it — it’s just a bit odd.

I flash a fresh Raspbian Stretch image (official), and proceed to do the initial setup/updates recommended by the system. I enable ssh and vnc in raspi-config -- I also modify /etc/ssh/sshd_config to change my ssh port.

After the first reboot, I proceed to do this in terminal: 1) git clone https://github.com/SpottyMatt/raspian-3b-stepmania-arcade stepmania 2) cd stepmania/ 3) make

Then comes the 2 or so hour wait... afterward, I don't see any issues listed toward the end of the output in terminal. Then reboot... and that's where I stand.

pi@raspberrypi:~ $ free -h
              total        used        free      shared  buff/cache   available
Mem:           621M        143M        288M         24M        189M        404M
Swap:           99M          0B         99M
pi@raspberrypi:~ $ cat /boot/config.txt
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
dtoverlay=vc4-kms-v3d
boot_delay=2
gpu_mem=384
max_usb_current=1
pi@raspberrypi:~ $ ps aux | grep step
pi         928  0.0  0.0   4376   580 pts/1    S+   17:21   0:00 grep --color=auto step
pi@raspberrypi:~ $ top -b -n 1 -o +%CPU
top - 17:22:22 up 35 min,  3 users,  load average: 0.02, 0.03, 0.00
Tasks: 128 total,   1 running,  84 sleeping,   0 stopped,   1 zombie
%Cpu(s):  0.4 us,  0.4 sy,  0.0 ni, 99.1 id,  0.1 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem :   636336 total,   291704 free,   149364 used,   195268 buff/cache
KiB Swap:   102396 total,   102396 free,        0 used.   411628 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
  460 root      20   0  182532  57860  43592 S  15.8  9.1   0:19.42 Xorg
  929 pi        20   0    8112   3148   2744 R  15.8  0.5   0:00.07 top
    1 root      20   0   26932   5868   4768 S   0.0  0.9   0:02.13 systemd
    2 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kthreadd
    4 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker/0:+
    6 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 mm_percpu_+
    7 root      20   0       0      0      0 S   0.0  0.0   0:00.03 ksoftirqd/0
    8 root      20   0       0      0      0 I   0.0  0.0   0:01.09 rcu_sched
    9 root      20   0       0      0      0 I   0.0  0.0   0:00.00 rcu_bh
   10 root      rt   0       0      0      0 S   0.0  0.0   0:00.01 migration/0
   11 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/0
   12 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/1
   13 root      rt   0       0      0      0 S   0.0  0.0   0:00.00 migration/1
   14 root      20   0       0      0      0 S   0.0  0.0   0:00.01 ksoftirqd/1
   16 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker/1:+
   17 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/2
   18 root      rt   0       0      0      0 S   0.0  0.0   0:00.00 migration/2
   19 root      20   0       0      0      0 S   0.0  0.0   0:00.05 ksoftirqd/2
   21 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker/2:+
   22 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/3
   23 root      rt   0       0      0      0 S   0.0  0.0   0:00.00 migration/3
   24 root      20   0       0      0      0 S   0.0  0.0   0:00.01 ksoftirqd/3
   26 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker/3:+
   27 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kdevtmpfs
   28 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 netns
   33 root      20   0       0      0      0 S   0.0  0.0   0:00.00 khungtaskd
   34 root      20   0       0      0      0 S   0.0  0.0   0:00.00 oom_reaper
   35 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 writeback
   36 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kcompactd0
   37 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 crypto
   38 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kblockd
   39 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 watchdogd
   40 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 rpciod
   41 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 xprtiod
   44 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kswapd0
   45 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 nfsiod
   55 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kthrotld
   56 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 iscsi_eh
   57 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 dwc_otg
   58 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 DWC Notifi+
   59 root       1 -19       0      0      0 S   0.0  0.0   0:00.00 vchiq-slot+
   60 root       1 -19       0      0      0 S   0.0  0.0   0:00.00 vchiq-recy+
   61 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 vchiq-sync+
   62 root      20   0       0      0      0 S   0.0  0.0   0:00.00 vchiq-keep+
   63 root      10 -10       0      0      0 S   0.0  0.0   0:00.00 SMIO
   65 root     -51   0       0      0      0 S   0.0  0.0   0:01.21 irq/92-mmc1
   67 root      20   0       0      0      0 S   0.0  0.0   0:00.55 mmcqd/0
   68 root      20   0       0      0      0 S   0.0  0.0   0:00.02 jbd2/mmcbl+
   69 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 ext4-rsv-c+
   70 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 ipv6_addrc+
   89 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker/1:+
   93 root      20   0   23012   4464   4032 S   0.0  0.7   0:00.72 systemd-jo+
   98 root      20   0       0      0      0 I   0.0  0.0   0:00.15 kworker/1:2
  117 root      20   0       0      0      0 I   0.0  0.0   0:00.13 kworker/3:2
  126 root      20   0   14732   3436   2628 S   0.0  0.5   0:00.73 systemd-ud+
  127 root     -51   0       0      0      0 S   0.0  0.0   0:00.00 irq/169-us+
  222 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 cfg80211
  224 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 brcmf_wq/m+
  225 root      20   0       0      0      0 S   0.0  0.0   0:00.36 brcmf_wdog+
  227 root      20   0       0      0      0 I   0.0  0.0   0:00.00 kworker/3:3
  271 systemd+  20   0   17280   3664   3264 S   0.0  0.6   0:00.14 systemd-ti+
  312 message+  20   0    6628   3652   3112 S   0.0  0.6   0:00.29 dbus-daemon
  319 root      20   0    5300   2456   2252 S   0.0  0.4   0:00.02 cron
  320 root      20   0   23748   2692   2232 S   0.0  0.4   0:00.11 rsyslogd
  324 avahi     20   0    6532   3156   2788 S   0.0  0.5   0:00.65 avahi-daem+
  329 nobody    20   0    5296   2472   2232 S   0.0  0.4   0:00.03 thd
  330 root      20   0    7380   4280   3832 S   0.0  0.7   0:00.11 systemd-lo+
  359 root      20   0    2948   1792   1384 S   0.0  0.3   0:00.02 dhcpcd
  363 avahi     20   0    6404    324     16 S   0.0  0.1   0:00.00 avahi-daem+
  419 root      20   0    5688   2724   2492 S   0.0  0.4   0:00.02 vncserver-+
  430 root      20   0   43796  32184  16804 S   0.0  5.1   0:02.75 vncserver-+
  435 root      20   0   39956   7324   6564 S   0.0  1.2   0:00.14 lightdm
  437 root      20   0    5880   2844   2380 S   0.0  0.4   0:00.09 login
  441 root      20   0       0      0      0 I   0.0  0.0   0:00.58 kworker/0:3
  444 root      20   0   10208   4712   4184 S   0.0  0.7   0:00.06 sshd
  456 root      20   0   10136   4044   3500 S   0.0  0.6   0:00.34 wpa_suppli+
  477 root      20   0   16624  12556  12052 S   0.0  2.0   0:01.49 vncagent
  483 root      20   0   32188   7904   7056 S   0.0  1.2   0:00.13 lightdm
  494 pi        20   0    9656   5784   5036 S   0.0  0.9   0:00.14 systemd
  497 pi        20   0   11188   1256     68 S   0.0  0.2   0:00.00 (sd-pam)
  502 pi        20   0   52184  12008  10784 S   0.0  1.9   0:00.35 lxsession
  511 pi        20   0    6500   3508   3104 S   0.0  0.6   0:00.11 dbus-daemon
  554 pi        20   0    6180   4064   2772 S   0.0  0.6   0:00.21 bash
  569 pi        20   0    3824   1920   1708 S   0.0  0.3   0:00.02 unclutter
  573 pi        20   0    3796    228     16 S   0.0  0.0   0:00.01 ssh-agent
  584 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker/u9+
  585 root      20   0    2096    152     16 S   0.0  0.0   0:00.00 hciattach
  586 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker/u9+
  595 pi        20   0   39468   5812   5264 S   0.0  0.9   0:00.06 gvfsd
  596 root      20   0    7272   3792   3500 S   0.0  0.6   0:00.04 bluetoothd
  602 pi        20   0   56488   6508   5852 S   0.0  1.0   0:00.07 gvfsd-fuse
  620 root      20   0   35036   3568   3248 S   0.0  0.6   0:00.02 bluealsa
  623 pi        20   0   53216  14268  11824 S   0.0  2.2   0:00.52 openbox
  627 pi        20   0   42752   8768   7828 S   0.0  1.4   0:00.06 lxpolkit
  633 pi        20   0  140368  24188  19660 S   0.0  3.8   0:06.67 lxpanel
  637 pi        20   0  133444  27412  24288 S   0.0  4.3   0:01.17 pcmanfm
  642 root      10 -10       0      0      0 S   0.0  0.0   0:00.00 krfcommd
  647 pi        20   0    3796    228     16 S   0.0  0.0   0:00.00 ssh-agent
  654 root      20   0   40200   7324   6616 S   0.0  1.2   0:00.07 polkitd
  671 pi        20   0   27808  12456  10340 S   0.0  2.0   0:00.80 vncserverui
  680 pi        20   0   28444   6356   5836 S   0.0  1.0   0:00.04 menu-cached
  684 pi        20   0   27136  14928  13488 S   0.0  2.3   0:00.17 vncserverui
  687 pi        20   0   74304  10348   9268 S   0.0  1.6   0:00.10 gvfs-udisk+
  689 pi        20   0       0      0      0 Z   0.0  0.0   0:00.00 sh
  696 root      20   0   59204   8476   7076 S   0.0  1.3   0:00.13 udisksd
  706 pi        20   0   37160   4312   3972 S   0.0  0.7   0:00.02 gvfs-goa-v+
  710 pi        20   0   50784   4800   4208 S   0.0  0.8   0:00.02 gvfs-afc-v+
  715 pi        20   0   38680   5112   4596 S   0.0  0.8   0:00.02 gvfs-gphot+
  719 pi        20   0   37108   4700   4272 S   0.0  0.7   0:00.02 gvfs-mtp-v+
  745 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker/2:+
  794 pi        20   0   51152   7936   7064 S   0.0  1.2   0:00.08 gvfsd-trash
  817 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker/0:+
  818 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker/3:+
  825 root      20   0       0      0      0 I   0.0  0.0   0:00.50 kworker/u8+
  828 root      20   0       0      0      0 I   0.0  0.0   0:00.18 kworker/1:1
  833 root      20   0       0      0      0 I   0.0  0.0   0:00.08 kworker/2:1
  835 root      20   0       0      0      0 I   0.0  0.0   0:00.79 kworker/u8+
  853 pi        20   0   47384  19496  16140 S   0.0  3.1   0:01.15 lxterminal
  854 pi        20   0    2360   1388   1252 S   0.0  0.2   0:00.00 gnome-pty-+
  855 pi        20   0    6120   4188   2896 S   0.0  0.7   0:00.16 bash
  863 root      20   0       0      0      0 I   0.0  0.0   0:00.02 kworker/2:0
  864 root      20   0       0      0      0 I   0.0  0.0   0:00.33 kworker/0:0
  869 root      20   0       0      0      0 I   0.0  0.0   0:00.01 kworker/u8+
  887 root      20   0       0      0      0 I   0.0  0.0   0:00.02 kworker/2:2
  888 root      20   0       0      0      0 I   0.0  0.0   0:00.29 kworker/0:1
  889 root      20   0   11528   5760   5024 S   0.0  0.9   0:00.22 sshd
  899 pi        20   0   11528   3408   2680 S   0.0  0.5   0:00.03 sshd
  902 pi        20   0    6200   4340   2968 S   0.0  0.7   0:00.31 bash
pi@raspberrypi:~ $ ls /tmp/.X11-unix/
X0
pi@raspberrypi:~ $ cd /usr/local/stepmania-5.2/
pi@raspberrypi:/usr/local/stepmania-5.2 $ ls -a
.  ..
SpottyMatt commented 5 years ago

Also, there are no files in /usr/loca/stepmania-5.2/

Well, that's definitely the problem, inasmuch as StepMania wasn't installed to where it's supposed to be, so it definitely won't be auto-starting.

Is there any chance you have the output from the build (after you ran make) anywhere?

If not, could you navigate to the directory where you've cloned this repository and run make install 2>&1 | tee ~/stepmania-install.log? If StepMania built successfully but just didn't get put into the rigt place, this will either do it or print an error message giving a clue as to why. The output will be saved in the ~/stepmania-install.log file in addition to being printed. Please attach that output (or put the contents in a gist if it's too large to fit in a GitHub Issue comment)

If that doesn't work and you've got time to kill, you could run the whole thing over again with make 2>&1 | tee ~/stepmania-full.log, which might help indicate where things failed if they failed earlier than the "install."

Other notes:

  1. Memory settings looks correct.
  2. /boot/config.txt looks correct.
  3. Mouse/Keyboard/Monitor setup seems unlikely to cause problems.
  4. Sluggishness is not explained; SM isn't running and (despite giving 384MB of the 1024 MB of RAM to the GPU) there's plenty of free RAM.
  5. Crash isn't explained; PI doesn't appear overclocked.

Further (ancillary) questions:

  1. What is the rated maximum capacity of the power supply you're using? I use a 3.5A supply to run SM on my pi.
  2. What is the resolution of the monitor you have connected? Higher resolutions might explain the sluggishness? I find my Pi 3B+, even overclocked, isn't a superstar with the stock Raspian desktop environment at 2k - 4k resolutions.
tomo39 commented 5 years ago

I could not start, the situation is the same. If openGL is turned off, it will start manually

SpottyMatt commented 5 years ago

@tomo39 , can you provide any of the information I asked about in the previous message?

  1. Full output of the initial make command
  2. Full output of the make install 2>&1 | tee ~/stepmania-install.log command
  3. The specifications of the power supply you're using
  4. Resolution of the monitor connected to your Pi
tomo39 commented 5 years ago

Thank you for your reply.

raspberry pi3 moniter Diginnos DG-NP09D USB mouse Keybord

Turning on GLdrver will not start and freeze

1.make command

git clone https://github.com/SpottyMatt/raspian-3b-stepmania-arcade stepmania cd stepmania/ make

2.stepmania-install.log

[ 1%] Built target ffmpeg [ 1%] Built target cppformat [ 2%] Built target glew [ 4%] Built target png [ 8%] Built target lua-5.1 [ 8%] Built target jsoncpp [ 24%] Built target tommath [ 45%] Built target tomcrypt [ 47%] Built target rage [ 47%] Built target GtkModule [100%] Built target StepMania

  1. power supply Anker PowerPort 5V 2.4A

4.monitor Resolution pi@raspberrypi:~ $ tvservice -s state 0x120009 [HDMI CEA (5) RGB lim 16:9], 1920x1080 @ 60.00Hz, interlaced

I increased the swapfile or changed the resolution, but it did not start up Please let me know if you do not mind

pi@raspberrypi:~$ free -h total used free shared buff/cache available Mem: 621M 139M 283M 15M 197M 417M Swap: 2.0G 2.2M 2.0G

pi@raspberrypi:~ $ nano /boot/config.txt

Uncomment this to enable the lirc-rpi module

dtoverlay=vc4-kms-v3d

Additional overlays and parameters are documented /boot/overlays/README

Enable audio (loads snd_bcm2835)

dtparam=audio=on gpu_mem=384 dtoverlay=vc4-kms-v3d boot_delay=2 max_usb_current=1 gpu_mem=384 gpu_mem=384 dtoverlay=vc4-kms-v3d

gpu_mem=384 dtoverlay=vc4-kms-v3d

SpottyMatt commented 5 years ago

@tony2win, @tomo39,

I figured it out. It is fixed now.

Please run git pull in this repository's directory, then run make stepmania-install.

If you've already spent the 2 hours compiling, this should take just a few seconds, and then everything should correctly work as advertised.

Thank you for your patience!

Note:

StepMania may fail to load all the way the first time it comes up. If it does fail, running make stepmania-install a second time should be enough; you need the settings from https://github.com/SpottyMatt/raspian-3b-stepmania-arcade/blob/5c81454239674ba52e3bb0ed56de8676405a2158/stepmania-install/Preferences.ini in ~/.stepmania-5.0/Save/Preferences.ini but the setup scripts do not currently do this properly.

Details:

It was fixed with these 2 commits:

  1. eea8099826286de6d4f1dbc66057b4802cce536d
  2. 9ef656d25f7710ffda0eb00116bd7a6f2631f12f
tomo39 commented 5 years ago

It worked, thank you for responding I changed a lot of Pi settings Also install and operate from the beginning I'm really thankful to you

SpottyMatt commented 5 years ago

Glad to hear!

I'm about to push a huge change to the way this repo is set up, so @tony2win , you should use

git fetch
git checkout 9ef656d25f7710ffda0eb00116bd7a6f2631f12f
make stepmania-install

instead of the original git pull-based instructions.