Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems using desmume emulator
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  
Author Message
LemonadeLlama
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2021
Posts: 101
Location: New Zealand

PostPosted: Fri Jun 25, 2021 10:48 am    Post subject: Problems using desmume emulator Reply with quote

Hey, I'm new to Gentoo, so I'll probably have a lot of newbie questions. Just warning you now.

Anyway, I've recently installed games-emulation/desmume, and I tried running Kirby: Squeak Squad with default configuration as a test. The framerate and sound are both very choppy most of the time, making the game unplayable. It's also very inconsistent though, so I'm hoping it's fixable.

When I open desmume, my terminal spits this out:

Quote:

CPU mode: Interpreter
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
Microphone successfully inited.
DeSmuME 0.9.12 git#0 dev+ x64-JIT SSE4.2+AVX2
Using 4 threads for video filter.
SoftRasterizer: Running using 4 additional threads. (Multithreading enabled.)


I've tried using both the SoftRasterizer and the OpenGL emulation setting but both give the same poor performance.

I'm running the default/linux/amd64/17.1 profile, since I have no intention of using a full desktop environment. I just use dwm to manage my windows. I'm also using the nouveau drivers instead of the nvidia drivers for my GTX970.

Also, here are the flags I used:
Quote:
sudo equery u desmume
[ Legend : U - final flag setting for installation]
[ : I - package is installed with flag ]
[ Colors : set, unset ]
* Found these USE flags for games-emulation/desmume-0.9.11_p20210409:
U I
+ + gdb : Enable support for the remote GDB stub
+ + gui : Enable support for a graphical user interface
+ + openal : Use media-libs/openal for microphone input
- - wifi : Enable support for Wi-Fi (experimental and discouraged)


I'm really hoping it's just reinstalling some packages or re-configuring my kernel, but that's why I'm asking.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30822
Location: here

PostPosted: Fri Jun 25, 2021 11:04 am    Post subject: Reply with quote

Welcome to gentoo forums.

I don't know package but the problem seems related to media-libs/openal package, see this github issue upstream
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
LemonadeLlama
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2021
Posts: 101
Location: New Zealand

PostPosted: Fri Jun 25, 2021 11:27 am    Post subject: Reply with quote

fedeliallalinea wrote:
Welcome to gentoo forums.

I don't know package but the problem seems related to media-libs/openal package, see this github issue upstream


I'll look into it. Just overall, are there any particular kernel configurations, packages, USE flags, etc. that I should look out for?

This is my @world so far:
Quote:

app-admin/sudo
app-admin/sysklogd
app-editors/vim
app-portage/gentoolkit
dev-python/distro
dev-python/lxml
dev-vcs/git
games-emulation/desmume
gui-libs/display-manager-init
media-gfx/feh
media-gfx/gimp
media-sound/alsa-utils
net-misc/dhcpcd
net-misc/netifrc
net-p2p/rtorrent
net-vpn/openvpn
sys-apps/mlocate
sys-apps/pciutils
sys-boot/grub:2
sys-fs/dosfstools
sys-kernel/genkernel
sys-kernel/gentoo-sources
sys-kernel/linux-firmware
sys-process/cronie
www-client/firefox
x11-apps/xinit
x11-apps/xrandr
x11-apps/xsetroot
x11-base/xorg-drivers
x11-base/xorg-server
x11-misc/dmenu
x11-misc/sddm
x11-terms/rxvt-unicode
x11-terms/xterm
x11-wm/dwm
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Fri Jun 25, 2021 12:45 pm    Post subject: Reply with quote

Does this desmume have an option to run with increased verbosity? Is there anything logged into dmesg or kernel log when it runs? Is it known to work with nouveau?
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2696

PostPosted: Fri Jun 25, 2021 1:46 pm    Post subject: Reply with quote

What kind of cpu are you using? If mobile / low frequency it'd probably be terrible, I believe it's more important than the GPU for desmume (Edit: well rather, emulation in general -- even if it seem like running this should be trivial being old DS).

Some games can be worse than others too, may want to try another.

Not that I really use desmume beside having updated the ebuild (previous version was >6 years old, using gtk2 and sdl1), it runs fine on my own machine though:
Code:
CPU mode: Interpreter
Microphone successfully inited.
DeSmuME 0.9.12 git#0 x64-JIT SSE4.2+AVX2
Using 12 threads for video filter.
SoftRasterizer: Running using 12 additional threads. (Multithreading enabled.)

OpenAL should be unrelated, it can be disabled too. This is for microphone input while it uses SDL2 for audio output.

Edit: on that note, you could try another SDL_AUDIODRIVER, like SDL_AUDIODRIVER=pulse or whatever works better for you (=alsa, =jack, or even =dummy to disable it and see -- I imagine something like alsa->pulseplugins could be messy, not sure what SDL is defaulting to here). It "could" hurt performance if it's trying to sync video with broken audio, but if issue is the cpu then that won't do a thing.
Back to top
View user's profile Send private message
LemonadeLlama
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2021
Posts: 101
Location: New Zealand

PostPosted: Sat Jun 26, 2021 2:42 am    Post subject: Reply with quote

I'm using an Intel i5 4690k CPU.

Also, I can now rule out graphics problems. I was getting bad performance when using firefox, but it turns out I had to load in some nvidia firmware through the kernel's CONFIG_EXTRA_FIRMWARE to fix that.
Turns out following the wiki helps out. Who could have guessed? Everything's buttery smooth now as far as my GPU is concerned.

I also tried reinstalling desmume with the openal flag removed
Code:

[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for games-emulation/desmume-0.9.11_p20210409:
 U I
 + + gdb    : Enable support for the remote GDB stub
 + + gui    : Enable support for a graphical user interface
 - - openal : Use media-libs/openal for microphone input
 - - wifi   : Enable support for Wi-Fi (experimental and discouraged)


I still get the same errors with ALSOFT after that though. Here's the full output of desmume after loading a ROM:
Code:

CPU mode: Interpreter
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
Microphone successfully inited.
DeSmuME 0.9.12 git#0 dev+ x64-JIT SSE4.2+AVX2
Using 4 threads for video filter.
OGL/SDL Renderer has finished the initialization.
OpenGL: Successfully created geometry shaders.
OpenGL: Successfully created postprocess shaders.
OpenGL: Successfully created FBOs.
OpenGL: Successfully created multisampled FBO.
OpenGL: Renderer initialized successfully (v3.2.0).
[ Driver Info -
    Version: 4.3 (Core Profile) Mesa 21.1.3
    Vendor: nouveau
    Renderer: NV124 ]

ROM game code: AKWE
ROM crc: 5C90DF04
ROM serial: NTR-AKWE-USA
ROM chipID: 00003FC2
ROM internal name: KIRBY DRO
ROM developer: Nintendo

Slot1 auto-selected device type: Retail MC+ROM
Slot2 auto-selected device type: None (0xFF)
BackupDevice: size = 64 Kbit
CPU mode: Interpreter
Already decrypted.
WIFI: MAC Address = 00:09:BF:12:34:56
WIFI: Emulation level is OFF.


Finally, if it helps, I have this error at the end of my Xorg log:
Code:

[    18.884] (EE) Failed to open authorization file "/var/run/sddm/{80426e59-3d3a-4c94-a40b-bfe2fba0ad65}": No such file or directory
[    25.998] (EE) event4  - Logitech Gaming Keyboard G105: client bug: event processing lagging behind by 28ms, your system is too slow
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2696

PostPosted: Sat Jun 26, 2021 2:51 am    Post subject: Reply with quote

Oh, you're using nouveau. Have you tried nvidia-drivers instead?

wrt disabling openal, while I still don't think it's related to your issue, looks like a bug (no need to report it, I'll look into it) -- upstream provides a meson option to disable it (which is in the ebuild, and disabled by default either way), but.. turns out the option doesn't work and I missed that :?
Edit: openal bit should be fixed in -r1


Last edited by Ionen on Sat Jun 26, 2021 3:16 am; edited 1 time in total
Back to top
View user's profile Send private message
LemonadeLlama
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2021
Posts: 101
Location: New Zealand

PostPosted: Sat Jun 26, 2021 3:03 am    Post subject: Reply with quote

Ionen wrote:
Oh, you're using nouveau. Have you tried nvidia-drivers instead?


I have not. Does the wiki explain how to switch between nouveau -> nvidia or nvidia -> nouveau :?:
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2696

PostPosted: Sat Jun 26, 2021 3:23 am    Post subject: Reply with quote

LemonadeLlama wrote:
Ionen wrote:
Oh, you're using nouveau. Have you tried nvidia-drivers instead?
I have not. Does the wiki explain how to switch between nouveau -> nvidia or nvidia -> nouveau :?:
Assuming nouveau is built as a module (i.e. it can be disabled), your card isn't well over ~10 years old (and perhaps not supported by current drivers), and you're not using custom Xorg configuration, it should be as simple as just emerging nvidia-drivers and rebooting (it'll blacklist nouveau by default). If want to go back to nouveau, depclean it.
Edit: oh and, add yourself to video group (gpasswd -a myusername video), the ebuild will mention this too, just saying in case.

Proper way would be to set VIDEO_CARDS="nvidia" instead of nouveau and updating -UDav @world, which will include nvidia-drivers.

Issue with nouveau is that it typically can't change the power state of your card, so you're always running in low power mode. Not to say if it'll really help or not in this particular case.
Back to top
View user's profile Send private message
LemonadeLlama
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2021
Posts: 101
Location: New Zealand

PostPosted: Sat Jun 26, 2021 3:52 am    Post subject: Reply with quote

Ionen wrote:
it should be as simple as just emerging nvidia-drivers and rebooting (it'll blacklist nouveau by default). If want to go back to nouveau, depclean it.
Proper way would be to set VIDEO_CARDS="nvidia" instead of nouveau and updating -UDav @world, which will include nvidia-drivers.


But this: https://wiki.gentoo.org/wiki/Nouveau_%26_nvidia-drivers_switching article on the wiki says I also need to blacklist some modules and create some script called /etc/local.d/nvidia.start. Is switching to the proprietary drivers really as simple as changing VIDEO_CARDS and updating @world?
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2696

PostPosted: Sat Jun 26, 2021 4:01 am    Post subject: Reply with quote

Yes, the blacklist file used to not be installed by default but it is for every nvidia-drivers version in tree now as /etc/modprobe.d/nvidia-blacklist-nouveau.conf

That page seems to want to have both at once so you can switch back&forth without changing configurations every time or depcleaning drivers, i.e. complicating things especially if you just want try it out.

If anything goes wrong, just go back to VIDEO_CARDS=nouveau using the console and depclean nvidia-drivers (will remove the blacklist file).
Back to top
View user's profile Send private message
LemonadeLlama
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2021
Posts: 101
Location: New Zealand

PostPosted: Sat Jun 26, 2021 5:33 am    Post subject: Reply with quote

Still nothing after switching to the nvidia drivers. I don't think this is a driver issue.

Code:

CPU mode: Interpreter
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
Microphone successfully inited.
DeSmuME 0.9.12 git#0 dev+ x64-JIT SSE4.2+AVX2
Using 4 threads for video filter.
OGL/SDL Renderer has finished the initialization.

OpenGL: Successfully created geometry shaders.
OpenGL: Successfully created postprocess shaders.
OpenGL: Successfully created FBOs.
OpenGL: Successfully created multisampled FBO.
OpenGL: Renderer initialized successfully (v3.2.0).
[ Driver Info -
    Version: 3.2.0 NVIDIA 470.42.01
    Vendor: NVIDIA Corporation
    Renderer: NVIDIA GeForce GTX 970/PCIe/SSE2 ]

ROM game code: AKWE
ROM crc: 5C90DF04
ROM serial: NTR-AKWE-USA
ROM chipID: 00003FC2
ROM internal name: KIRBY DRO
ROM developer: Nintendo

Slot1 auto-selected device type: Retail MC+ROM
Slot2 auto-selected device type: None (0xFF)
BackupDevice: size = 64 Kbit
CPU mode: Interpreter
Already decrypted.
WIFI: MAC Address = 00:09:BF:12:34:56
WIFI: Emulation level is OFF.



On a potentially unrelated note, I get the following error when I try starting nvidia-settings:

Code:

(nvidia-settings:2938): GLib-GObject-CRITICAL **: 17:15:25.589: g_object_unref: assertion 'G_IS_OBJECT (object)' failed


How do I fix this?
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2696

PostPosted: Sat Jun 26, 2021 6:16 am    Post subject: Reply with quote

Afraid I don't know for desmume then, last thing I could think of is if you're using a wrong cpu scaling governor
i.e. if cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor returns userspace it's likely wrong unless you know what you're doing, but anything else should be fine (preferably schedutils or performance).

Also, have you tried other roms and/or audio output as mentioned in an earlier post?

Still doubt it's related, but you can emerge --sync and upgrade it to -r1 still with USE=-openal to get rid of the openal error.

That aside, nvidia-drivers should still improve things for GPU-bound applications though, so I suggest you keep using it anyway.

LemonadeLlama wrote:
Code:
(nvidia-settings:2938): GLib-GObject-CRITICAL **: 17:15:25.589: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
How do I fix this?
I assume it's still working normally right? These are just noise, I know the CRITICAL sounds bad but not really, you can ignore it (nvidia-settings is just not the best written software there is and I get that message as well).
Back to top
View user's profile Send private message
LemonadeLlama
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2021
Posts: 101
Location: New Zealand

PostPosted: Wed Aug 04, 2021 9:21 am    Post subject: Reply with quote

Well, I don't know what happened, but after a recent world update, everything seems to be fine :?

I guess I can close this topic now.
Back to top
View user's profile Send private message
MikeNigh
n00b
n00b


Joined: 03 Dec 2018
Posts: 10

PostPosted: Wed Sep 22, 2021 2:29 am    Post subject: Reply with quote

This will allow openal to set the real-time priority for the thread -

https://wiki.gentoo.org/wiki/Project:Sound/How_to_Enable_Realtime_for_Multimedia_Applications

However for me it did solve the "[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)", but it did not solve getting dwarf-fortress to run (still segmentation faulted). I was able to previously get dwarf fortress to run on root, but instead I just downloaded the latest dwarf fortress from their site, deleted the df_linux/libs/libstdc++.so.6 which gave this error -

./libs/Dwarf_Fortress: /home/.../games/df_linux/libs/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/lib64/libGLU.so.1)

and dwarf-fortress worked!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gamers & Players 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