Linux Fullscreen Issue

Hi,

I installed elementary os and sdk 3.2 a few days ago. I run the project and it opens with 1920 x 1080 60Hz settings. But when it starts my monitor says “no signal”. If i run with 50Hz fullscreen or 60Hz windowed mode or all other resolutions and frequecy everything is ok. Only problem is 1080 60hz that is max settings.

Also when it starts the Application console gives an error. I think it was happening before monitor signal lost.

Here is;

java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData
at sun.java2d.xr.XRPMBlitLoops.cacheToTmpSurface(XRPMBlitLoops.java:148)
at sun.java2d.xr.XrSwToPMBlit.Blit(XRPMBlitLoops.java:356)
at sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:959)
at sun.java2d.pipe.DrawImage.renderImageCopy(DrawImage.java:577)
at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:67)
at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:1014)
at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3318)
at sun.awt.image.ImageRepresentation.drawToBufImage(ImageRepresentation.java:813)
at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:1021)
at sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:186)
at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3318)
at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3296)
at javax.swing.ImageIcon.paintIcon(ImageIcon.java:425)
at org.openide.util.ImageUtilities$LazyDisabledIcon.paintIcon(ImageUtilities.java:908)
at javax.swing.plaf.basic.BasicButtonUI.paintIcon(BasicButtonUI.java:292)
at javax.swing.plaf.basic.BasicButtonUI.paint(BasicButtonUI.java:216)
at com.nilo.plaf.nimrod.NimRODButtonUI.paint(NimRODButtonUI.java:180)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
at javax.swing.plaf.metal.MetalButtonUI.update(MetalButtonUI.java:150)
at com.nilo.plaf.nimrod.NimRODButtonUI.update(NimRODButtonUI.java:117)
at javax.swing.JComponent.paintComponent(JComponent.java:780)
at javax.swing.JComponent.paint(JComponent.java:1056)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paint(JComponent.java:1065)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paint(JComponent.java:1065)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paint(JComponent.java:1065)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paint(JComponent.java:1065)
at org.netbeans.swing.tabcontrol.TabbedContainer.paint(TabbedContainer.java:994)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paint(JComponent.java:1065)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579)
at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502)
at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:306)
at javax.swing.RepaintManager.paint(RepaintManager.java:1272)
at javax.swing.JComponent._paintImmediately(JComponent.java:5158)
at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
at javax.swing.JComponent.paintImmediately(JComponent.java:4950)
at javax.swing.RepaintManager$4.run(RepaintManager.java:831)
at javax.swing.RepaintManager$4.run(RepaintManager.java:814)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:738)
at javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1732)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

also here is my “xrandr” output from terminal.

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 476mm x 268mm
   1920x1080     60.00*+  50.00    59.94  
   1920x1080i    60.00    50.00    59.94  
   1680x1050     59.88  
   1280x1024     75.02    60.02  
   1440x900      59.90  
   1280x960      60.00  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1440x576      50.00  
   1024x768      75.03    70.07    60.00  
   1440x480      60.00    59.94  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    72.81    66.67    60.00    59.94  
   720x400       70.08  
DVI-0 disconnected (normal left inverted right x axis y axis)

By the way, i can play Dont Get Starve 1920 x 1080 60Hz Fullscreen in Linux. So i didnt know that the issue is related JME or LWJGL or Linux?

thanks.

Well the issue you posted is related to the sdk itself. But you are talking about the settings dialog of the Engine itself right?

For some reason we have severe Problems with fullscreen on Linux currently and iirc it was related to the frequency in the dropdown not being set correctly

2 Likes

Thank you for replying.

The result does not change whether I select settings in the first opening settings screen of JME or this callings.

appSettings.setResolution(1920, 1080);
appSettings.setFrequency(60);
app.setSettings(appSettings);
app.start();

But,

appSettings.setResolution(1920, 1080);
appSettings.setFrequency(50);
app.setSettings(appSettings);
app.start();

it runs correctly.

Can you try it with 59.94 for instance? Does it run without specifying any frequency?
And maybe you can search around here, it has been discussed several times, but no fixes were done yet

it have to cast double to integer and i have already tested with 59 and result does not change. Only works 50 or lesser.

If your ruining dual monitors with nvida drivers, it cheats with modelines to get around xrandr limitations. That is it adds incorrect refresh rates to allow the modeline. To test this put everything back to a single monitor and see if you have the same problem. Also check the actual refresh rate on the monitor.

And just tried with my current build (latest pull from git) and i can’t even get fullscreen :confused:

However these modelines that are populated via nivida drivers are 99% of the time the reason.

No i have not dual monitors and nvidia drivers. I have one monitor and here is my driver output

Graphics:  Card: Advanced Micro Devices [AMD/ATI] Curacao PRO [Radeon R7 370 / R9 270/370 OEM] bus-ID: 01:00.0
Display Server: X.Org 1.19.5 drivers: ati,radeon (unloaded: fbdev,vesa) Resolution: 1920x1080@60.00hz
GLX Renderer: AMD PITCAIRN (DRM 2.50.0 / 4.13.0-36-generic, LLVM 5.0.0)
GLX Version: 3.0 Mesa 17.2.8 Direct Rendering: Yes

thanks for replying.

Unfortunately i have never used those cards on linux. But if i get my fullscreen back i’ll be sure to post the fix if it seems relevant.