High FPS as root, low as user (linux)

Feedback and support for the PC version of Osmos
jake
Posts: 8
Joined: Tue Dec 21, 2010 2:03 am

High FPS as root, low as user (linux)

Postby jake » Tue Dec 21, 2010 11:26 am

Problem:
Osmos running under root averages 60 FPS. Osmos running under my normal user averages five seconds per frame judging by the time it takes the Hemisphere logo to fade in. I start the game using startx -- :1 and a custom .xinitrc (below).

Hardware:
Radeon x300
AMD Athlon 1.8 GHz
1.5 GB ram

Software
Ubuntu 10.04
X and Radeon drivers from xorg-edgers (https://launchpad.net/~xorg-edgers/+archive/ppa)

My .xinitrc is the same for both accounts:

Code: Select all

#!/bin/bash
xmodmap ~/.config/Xmodmap &
xset m 4 8 &
xrandr -s 800x600
exec Osmos


Osmos logs
root

Code: Select all

Log opened on Tue Dec 21 11:21:57 2010
Commandline: ./Osmos.bin32
Preinitializing game: HEMI version 1.6.0 1314
Localization: using language "en"
Localization: loaded Osmos-en.loc
Arch: AMD Athlon(tm) 64 Processor 2800+
OS: Linux 2.6.32-25-generic (#45-Ubuntu SMP Sat Oct 16 19:48:22 UTC 2010)
Using sound
Showing splash
xmodmap:  unable to open file '/root/Xmodmap' for reading
xmodmap:  1 error encountered, aborting.
Using fullscreen mode: 800 x 600
Not using vsync
Initializing GLRenderDevice...
OpenGL version: 2.1 Mesa 7.10-devel
Initializing game
Initializing GLRenderer...
Loading textures
Loading fonts
Backed up stats to Stats/Backup/Osmos_0004.sta
Initializing SoundSystem...
Initializing OpenAL
Getting OpenAL device list
Found 4 devices:
  Device 0: PulseAudio Software (3: OPENAL DEFAULT)
  Device 1: ALSA Software
  Device 2: OSS Software (2: OSMOS DEFAULT)
  Device 3: PortAudio Software
Pass 1: no valid device was specified (-1)
Pass 2: attempting device 2: "OSS Software"...
Failed to open device
Pass 3: attempting device 0: "PulseAudio Software"...
Failed to open device
WARNING: Failed to initialize OpenAL
App exiting -- bye!
Writing config to Config.cfg
Log closed on Tue Dec 21 11:22:06 2010

normal user

Code: Select all

Log opened on Tue Dec 21 11:17:04 2010
Commandline: ./Osmos.bin32
Preinitializing game: HEMI version 1.6.0 1314
Localization: using language "en"
Localization: loaded Osmos-en.loc
Arch: AMD Athlon(tm) 64 Processor 2800+
OS: Linux 2.6.32-25-generic (#45-Ubuntu SMP Sat Oct 16 19:48:22 UTC 2010)
Using sound
Showing splash
Using fullscreen mode: 800 x 600
Not using vsync
Initializing GLRenderDevice...
OpenGL version: 2.1 Mesa 7.10-devel
Initializing game
Initializing GLRenderer...
Loading textures
Loading fonts
Initializing SoundSystem...
Initializing OpenAL
Getting OpenAL device list
Found 4 devices:
  Device 0: PulseAudio Software (3: OPENAL DEFAULT)
  Device 1: ALSA Software
  Device 2: OSS Software (2: OSMOS DEFAULT)
  Device 3: PortAudio Software
Pass 1: no valid device was specified (-1)
Pass 2: attempting device 2: "OSS Software"...
Failed to open device
Pass 3: attempting device 0: "PulseAudio Software"...
Creating OpenAL context
Opened device "PulseAudio Software"
Device supports maximum 256 sources
Streaming music
Loading pre-splash sounds
Loading post-splash sounds

jake
Posts: 8
Joined: Tue Dec 21, 2010 2:03 am

Re: High FPS as root, low as user (linux)

Postby jake » Tue Dec 21, 2010 11:29 am

BTW, love this game, impressed with how well it runs in linux and my ancient video card (despite needing root for the moment..). Bought it as part of the HumbleBundle. I'll be keeping an eye out on Hemisphere.

Anyhow, thanks in advance for any help!

User avatar
Meal Worms
Posts: 624
Joined: Wed Apr 22, 2009 12:22 pm
Location: Toronto, Ontario, Canada
Contact:

Re: High FPS as root, low as user (linux)

Postby Meal Worms » Tue Dec 21, 2010 1:08 pm

Hi jake,

Hmmm, not sure what to suggest here -- it seems as if something at the driver level is different between your root and user accounts. Perhaps there are some driver config files that aren't present for your user account?

Dave

jake
Posts: 8
Joined: Tue Dec 21, 2010 2:03 am

Re: High FPS as root, low as user (linux)

Postby jake » Thu Dec 23, 2010 6:56 pm

Yep, turns out normal user accounts aren't using the fancy drivers. I've got a thread open over at the Ubuntu forums, but if anyone around these parts has a suggestion, I'd love to hear it. I'll post back here once I've got it worked out.

Code: Select all

jake@daedalus:/home$ sudo glxinfo | grep "renderer string"
OpenGL renderer string: Gallium 0.4 on ATI RV370
jake@daedalus:/home$ glxinfo | grep "renderer string"
OpenGL renderer string: Software Rasterizer

Henrik Holst
Posts: 6
Joined: Wed Dec 22, 2010 2:48 pm

Re: High FPS as root, low as user (linux)

Postby Henrik Holst » Mon Jan 03, 2011 8:51 pm

Perhaps your driver files are only readable for root?

Check /var/log/Xorg.0.log and see if it loads some *.so when running as root that it does not on your user account and then check if that file has read rights for the "others".

This is how it looks for me running with fglrx drivers (Catalyst drivers for AMD Radeon)

Code: Select all

henrik@ubuntu:~$ grep '\.so' /var/log/Xorg.0.log
[    22.030] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[    22.030] (II) Loading /usr/lib/xorg/extra-modules/modules/extensions/libglx.so
[    22.044] (II) Loading /usr/lib/xorg/modules/extensions/libextmod.so
[    22.044] (II) Loading /usr/lib/xorg/modules/extensions/libdbe.so
[    22.045] (II) Loading /usr/lib/xorg/modules/extensions/librecord.so
[    22.045] (II) Loading /usr/lib/xorg/modules/extensions/libdri.so
[    22.045] (II) Loading /usr/lib/xorg/modules/extensions/libdri2.so
[    22.046] (II) Loading /usr/lib/xorg/extra-modules/modules/drivers/fglrx_drv.so
[    22.055] (II) Loading /usr/lib/xorg/extra-modules/modules/linux/libfglrxdrm.so
[    22.059] (II) Loading /usr/lib/xorg/modules/libvgahw.so
[    22.060] (II) Reloading /usr/lib/xorg/extra-modules/modules/linux/libfglrxdrm.so
[    22.155] (II) Loading /usr/lib/xorg/modules/libvbe.so
[    22.282] (II) Loading /usr/lib/xorg/modules/libfb.so
[    24.750] (==) fglrx(0): OpenGL ClientDriverName: "fglrx_dri.so"
[    24.766] (II) Loading /usr/lib/xorg/extra-modules/modules/glesx.so
[    24.766] (II) Loading /usr/lib/xorg/extra-modules/modules/amdxmm.so
[    25.154] (II) AIGLX: Loaded and initialized /usr/lib64/dri/fglrx_dri.so
[    25.171] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so


use for example this

Code: Select all

sudo chmod +r /usr/lib/xorg/modules/extensions/*
to set read rights to everyone to all the files in that path.

jake
Posts: 8
Joined: Tue Dec 21, 2010 2:03 am

Re: High FPS as root, low as user (linux)

Postby jake » Mon Jan 24, 2011 3:26 pm

I found my solution at askubuntu.com: http://askubuntu.com/questions/22993/wh ... nless-root

It was simple as adding my normal user account to the video group, ie: adduser jake video

Thanks all for the help here, it helped me ask better questions which helped me get the answer!


Return to “Osmos PC (Win/Mac/Linux)”

Who is online

Users browsing this forum: No registered users and 23 guests