Linux Installation Problems (Ubuntu 7.10)

Started by Zatarg, December 22, 2007, 15:24:31

Previous topic - Next topic

Zatarg

Hello.

After extracting the files, I tried to run
java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/lwjgl_fmod3.jar:jar/lwjgl_devil.jar:jar/jinput.jar: -Djava.library.path=native/linux org.lwjgl.test.WindowCreationTest
from the command line.

A window did appear, but all it did was fade between black and white background.  The title of the window was "Game".

The cmd line said:
The following keys are available:
ESCAPE:         Exit test
ARROW Keys:     Move window when in non-fullscreen mode
L:              List selectable display modes
0-8:            Selection of display modes
F:              Toggle fullscreen
SHIFT-F:        Toggle fullscreen with Display.destroy()/create() cycle
Found 57 display modes
Problem retrieving mode with 640x480x16@-1
Problem retrieving mode with 640x480x32@-1
Problem retrieving mode with 800x600x16@-1
Problem retrieving mode with 800x600x32@-1
Problem retrieving mode with 1024x768x16@-1
Problem retrieving mode with 1024x768x32@-1


Pressing L produces
[0]: null
[1]: 640 x 480 x 24 @79Hz
[2]: null
[3]: null
[4]: 800 x 600 x 24 @74Hz
[5]: null
[6]: null
[7]: 1024 x 768 x 24 @72Hz
[8]: null
[9]: null


On trying to switch to fullscreen i get
org.lwjgl.LWJGLException: Could not switch mode.
        at org.lwjgl.opengl.LinuxDisplay.nSwitchDisplayMode(Native Method)
        at org.lwjgl.opengl.LinuxDisplay.switchDisplayModeOnTmpDisplay(LinuxDisplay.java:430)
        at org.lwjgl.opengl.LinuxDisplay.switchDisplayMode(LinuxDisplay.java:420)
        at org.lwjgl.opengl.Display.switchDisplayMode(Display.java:302)
        at org.lwjgl.opengl.Display.setFullscreen(Display.java:487)
        at org.lwjgl.test.WindowCreationTest.handleInput(WindowCreationTest.java:228)
        at org.lwjgl.test.WindowCreationTest.execute(WindowCreationTest.java:128)
        at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:285)
Exception in thread "main" java.lang.IllegalStateException: Keyboard must be created before you can read events
        at org.lwjgl.input.Keyboard.next(Keyboard.java:464)
        at org.lwjgl.test.WindowCreationTest.handleInput(WindowCreationTest.java:157)
        at org.lwjgl.test.WindowCreationTest.execute(WindowCreationTest.java:128)
        at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:285)


Shift + F produces:
Performing Display.destroy()/create() cycle
org.lwjgl.LWJGLException: Could not switch mode.
        at org.lwjgl.opengl.LinuxDisplay.nSwitchDisplayMode(Native Method)
        at org.lwjgl.opengl.LinuxDisplay.switchDisplayModeOnTmpDisplay(LinuxDisplay.java:430)
        at org.lwjgl.opengl.LinuxDisplay.switchDisplayMode(LinuxDisplay.java:420)
        at org.lwjgl.opengl.Display.switchDisplayMode(Display.java:302)
        at org.lwjgl.opengl.Display.create(Display.java:753)
        at org.lwjgl.opengl.Display.create(Display.java:709)
        at org.lwjgl.opengl.Display.create(Display.java:691)
        at org.lwjgl.test.WindowCreationTest.handleInput(WindowCreationTest.java:226)
        at org.lwjgl.test.WindowCreationTest.execute(WindowCreationTest.java:128)
        at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:285)
Exception in thread "main" java.lang.IllegalStateException: Keyboard must be created before you can read events
        at org.lwjgl.input.Keyboard.next(Keyboard.java:464)
        at org.lwjgl.test.WindowCreationTest.handleInput(WindowCreationTest.java:157)
        at org.lwjgl.test.WindowCreationTest.execute(WindowCreationTest.java:128)
        at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:285)


When i ran
java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/lwjgl_fmod3.jar:jar/lwjgl_devil.jar:jar/jinput.jar:  -Djava.library.path=/home/lwjgluser/lwjgl/ org.lwjgl.test.WindowCreationTest


I got
The following keys are available:
ESCAPE:         Exit test
ARROW Keys:     Move window when in non-fullscreen mode
L:              List selectable display modes
0-8:            Selection of display modes
F:              Toggle fullscreen
SHIFT-F:        Toggle fullscreen with Display.destroy()/create() cycle
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
        at java.lang.Runtime.loadLibrary0(Runtime.java:823)
        at java.lang.System.loadLibrary(System.java:1030)
        at org.lwjgl.Sys$1.run(Sys.java:75)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.lwjgl.Sys.doLoadLibrary(Sys.java:68)
        at org.lwjgl.Sys.loadLibrary(Sys.java:84)
        at org.lwjgl.Sys.<clinit>(Sys.java:101)
        at org.lwjgl.opengl.Display.<clinit>(Display.java:111)
        at org.lwjgl.test.WindowCreationTest.initialize(WindowCreationTest.java:80)
        at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:284)


Does anyone know what's went wrong, or how i can fix it?

elias

Quote from: Zatarg on December 22, 2007, 15:24:31
Hello.

After extracting the files, I tried to run
java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/lwjgl_fmod3.jar:jar/lwjgl_devil.jar:jar/jinput.jar: -Djava.library.path=native/linux org.lwjgl.test.WindowCreationTest
from the command line.

A window did appear, but all it did was fade between black and white background.  The title of the window was "Game".

The cmd line said:
The following keys are available:
ESCAPE:         Exit test
ARROW Keys:     Move window when in non-fullscreen mode
L:              List selectable display modes
0-8:            Selection of display modes
F:              Toggle fullscreen
SHIFT-F:        Toggle fullscreen with Display.destroy()/create() cycle
Found 57 display modes
Problem retrieving mode with 640x480x16@-1
Problem retrieving mode with 640x480x32@-1
Problem retrieving mode with 800x600x16@-1
Problem retrieving mode with 800x600x32@-1
Problem retrieving mode with 1024x768x16@-1
Problem retrieving mode with 1024x768x32@-1


Pressing L produces
[0]: null
[1]: 640 x 480 x 24 @79Hz
[2]: null
[3]: null
[4]: 800 x 600 x 24 @74Hz
[5]: null
[6]: null
[7]: 1024 x 768 x 24 @72Hz
[8]: null
[9]: null


WindowCreation test is kind of Windows centric with its multiple bit depths and what not. On linux, there's only one bit depth so a few modes will not be located and are null, which is perfectly normal.

Quote from: Zatarg on December 22, 2007, 15:24:31

On trying to switch to fullscreen i get
org.lwjgl.LWJGLException: Could not switch mode.
        at org.lwjgl.opengl.LinuxDisplay.nSwitchDisplayMode(Native Method)
        at org.lwjgl.opengl.LinuxDisplay.switchDisplayModeOnTmpDisplay(LinuxDisplay.java:430)
        at org.lwjgl.opengl.LinuxDisplay.switchDisplayMode(LinuxDisplay.java:420)
        at org.lwjgl.opengl.Display.switchDisplayMode(Display.java:302)
        at org.lwjgl.opengl.Display.setFullscreen(Display.java:487)
        at org.lwjgl.test.WindowCreationTest.handleInput(WindowCreationTest.java:228)
        at org.lwjgl.test.WindowCreationTest.execute(WindowCreationTest.java:128)
        at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:285)
Exception in thread "main" java.lang.IllegalStateException: Keyboard must be created before you can read events
        at org.lwjgl.input.Keyboard.next(Keyboard.java:464)
        at org.lwjgl.test.WindowCreationTest.handleInput(WindowCreationTest.java:157)
        at org.lwjgl.test.WindowCreationTest.execute(WindowCreationTest.java:128)
        at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:285)


Shift + F produces:
Performing Display.destroy()/create() cycle
org.lwjgl.LWJGLException: Could not switch mode.
        at org.lwjgl.opengl.LinuxDisplay.nSwitchDisplayMode(Native Method)
        at org.lwjgl.opengl.LinuxDisplay.switchDisplayModeOnTmpDisplay(LinuxDisplay.java:430)
        at org.lwjgl.opengl.LinuxDisplay.switchDisplayMode(LinuxDisplay.java:420)
        at org.lwjgl.opengl.Display.switchDisplayMode(Display.java:302)
        at org.lwjgl.opengl.Display.create(Display.java:753)
        at org.lwjgl.opengl.Display.create(Display.java:709)
        at org.lwjgl.opengl.Display.create(Display.java:691)
        at org.lwjgl.test.WindowCreationTest.handleInput(WindowCreationTest.java:226)
        at org.lwjgl.test.WindowCreationTest.execute(WindowCreationTest.java:128)
        at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:285)
Exception in thread "main" java.lang.IllegalStateException: Keyboard must be created before you can read events
        at org.lwjgl.input.Keyboard.next(Keyboard.java:464)
        at org.lwjgl.test.WindowCreationTest.handleInput(WindowCreationTest.java:157)
        at org.lwjgl.test.WindowCreationTest.execute(WindowCreationTest.java:128)
        at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:285)


Failing to switch modes are a real problem, though. Try to enable debugging (-Dorg.lwjgl.util.Debug=true) and see if there's some useful hints before the exception. Also see if xrandr works at all by switching display mode manually (use the 'xrandr' tool or some equivalent GUI).

Quote from: Zatarg on December 22, 2007, 15:24:31

When i ran
java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/lwjgl_fmod3.jar:jar/lwjgl_devil.jar:jar/jinput.jar:  -Djava.library.path=/home/lwjgluser/lwjgl/ org.lwjgl.test.WindowCreationTest


I got
The following keys are available:
ESCAPE:         Exit test
ARROW Keys:     Move window when in non-fullscreen mode
L:              List selectable display modes
0-8:            Selection of display modes
F:              Toggle fullscreen
SHIFT-F:        Toggle fullscreen with Display.destroy()/create() cycle
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
        at java.lang.Runtime.loadLibrary0(Runtime.java:823)
        at java.lang.System.loadLibrary(System.java:1030)
        at org.lwjgl.Sys$1.run(Sys.java:75)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.lwjgl.Sys.doLoadLibrary(Sys.java:68)
        at org.lwjgl.Sys.loadLibrary(Sys.java:84)
        at org.lwjgl.Sys.<clinit>(Sys.java:101)
        at org.lwjgl.opengl.Display.<clinit>(Display.java:111)
        at org.lwjgl.test.WindowCreationTest.initialize(WindowCreationTest.java:80)
        at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:284)


Does anyone know what's went wrong, or how i can fix it?

The native path is probably wrong. Why is -Djava.library.path different than the other runs?

- elias

elias

If xrandr is somehow broken on your setup (if fullscreen works immediately after a reboot, you're probably running into a known (but fixed in X 7.3) bug with xrandr) then try disabling xrandr by using the switch -DLWJGL_DISABLE_XRANDR=true.

- elias