fullscreen applications causes application graphics to freeze

Hello
I seem to be having a weird problem with the graphics. Occasionally the graphics output seems to freeze for some applications. It seems to happen mostly for flash player, but it sometimes happens to Firefox, and twice to Kwin. Usually the only way to fix it is the the restart the application in question, though with Firefox, bringing up the close window dialogue and clicking cancel also fixes it. It seems to have something to do with fullscreen applications. It can be triggered by the screensaver or various games. Switching to fullscreen in Minecraft seems to trigger it consistently though other applications does not seem to consistently trigger it.

I’m on opensuse 13.2 with a Nvidia GTX 780 and Nvidia driver 346.35.

Try toggling “Suspend desktop effects for fullscreen windows” in “Configure Desktop”/Systemsettings->Desktop Effects->Advanced.
This can cause problems with some graphics drivers.

“Suspend desktop effects for fullscreen windows” is already off. Enabling it doesn’t seem to change anything.

And if you disable desktop effects completely? Does this help?

OTOH, it might also be the resolution change when switching to fullscreen might be the problem.
Try to disable the “KScreen2” service in Configure Desktop->Startup and Shutdown->Service Management.

And maybe post your /var/log/Xorg.0.log and/or the output of “glxinfo|grep render” (you might have to install Mesa-demo-x) to see whether your nvidia driver is working.

No, disabling desktop effects does not seem to change anything, nor does stopping the KScreen2 service. The applications in question shouldn’t change the resolution anyway though, should they?

The driver seems to be working fine.

> glxinfo|grep render
direct rendering: Yes
OpenGL renderer string: GeForce GTX 780/PCIe/SSE2
    GL_ARB_compute_variable_group_size, GL_ARB_conditional_render_inverted, 
    GL_KTX_buffer_region, GL_NVX_conditional_render, GL_NVX_gpu_memory_info, 
    GL_NV_conditional_render, GL_NV_copy_depth_to_color, GL_NV_copy_image, 
    GL_NV_path_rendering, GL_NV_pixel_data_range, GL_NV_point_sprite, 
    GL_ARB_compute_variable_group_size, GL_ARB_conditional_render_inverted, 
    GL_KTX_buffer_region, GL_NVX_conditional_render, GL_NVX_gpu_memory_info, 
    GL_NV_conditional_render, GL_NV_copy_depth_to_color, GL_NV_copy_image, 
    GL_NV_path_rendering, GL_NV_pixel_data_range, GL_NV_point_sprite, 
    GL_EXT_render_snorm, GL_EXT_robustness, GL_EXT_sRGB, 
    GL_NV_conditional_render, GL_NV_copy_buffer, GL_NV_copy_image, 
    GL_NV_packed_float_linear, GL_NV_path_rendering, 
    GL_OES_element_index_uint, GL_OES_fbo_render_mipmap, 

Well, the thread’s title is “fullscreen applications causes application graphics to freeze”. And fullscreen applications probably do change the resolution…

The driver seems to be working fine.

Yes.

No idea then, other than a bug in the graphics driver or a hardware problem (card overheating e.g.).

Well, the resolution stays the same. Though some test with other applications and kde’s resolution settings shows that switching the resolution might be what triggers it. Would it be possible for an application to “change” the resolution to the same as it was? That might be what happens with Minecraft, going to fullscreen there cause the screen to blink in black which might indicate some kind of mode-setting.

This also seems to get triggered by switching session.

Also Mpv crashes when this occurs.

> mpv --hwdec=vdpau --hwdec-codecs=h264,mpeg1video,mpeg2video,vc1,mpeg4,wmv3 --vo=opengl-hq videoplayback.mp4
Playing: videoplayback.mp4
 (+) Video --vid=1 (*) (h264)
 (+) Audio --aid=1 --alang=und (*) (aac)
Trying to use hardware decoding.
AO: [pulse] 44100Hz stereo 2ch float
VO: [opengl-hq] 1280x720 vdpau
AV: 00:00:01 / 01:35:12 (0%) A-V:  0.142 Dropped: 6
[ffmpeg/video] h264: hardware accelerator failed to decode picture
AV: 00:00:01 / 01:35:12 (0%) A-V:  0.150 Dropped: 7
[vo/opengl-hq/vdpau] Got display preemption notice! Will attempt to recover.
[vo/opengl-hq/vdpau] Recovered from display preemption.
[ffmpeg/video] h264: hardware accelerator failed to decode picture
AV: 00:00:01 / 01:35:12 (0%) A-V:  0.248 Dropped: 8
[ffmpeg/video] h264: hardware accelerator failed to decode picture
AV: 00:00:01 / 01:35:12 (0%) A-V:  0.244 Dropped: 8
[ffmpeg/video] h264: hardware accelerator failed to decode picture
Segmenteringsfel1:35:12 (0%) A-V:  0.244 Dropped: 8

You mean switching to text mode and back via Ctrl+Alt+Fx?

You could try to disable the framebuffer then, see here: https://wiki.archlinux.org/index.php/GRUB/Tips_and_tricks#Disable_framebuffer

One of the KWin developers has suggested this here: https://forum.kde.org/viewtopic.php?f=111&t=124332&p=327165&hilit=nvidia#p327165

It also happen when switching to a different graphical session.

Not sure if I’ve managed to disable the frambuffer properly (I still have “/dev/fb0”), but nothing seems to have changed.

Yes, but it happens when you switch between different VTs via Ctrl+Alt+Fx, right? That’s what I meant.
There’s not really a difference whether you switch between a graphical session and a text mode session, or betweed two graphical sessions I think.

Not sure if I’ve managed to disable the frambuffer properly (I still have “/dev/fb0”), but nothing seems to have changed.

Well, did you try both ways described on that page? Did you run “sudo grub2-mkconfig -o /boot/grub2/grub.cfg” to apply the change?

Sorry, I can’t really help you more with this. I don’t really know anything about this.
Personally I only use open-source KMS drivers anyway, and never had a problem with switching between VTs either…

According to http://kb.digium.com/articles/FAQ/How-to-disable-the-Linux-frame-buffer-if-it-s-causing-problems (which I found with a quick google now), /dev/fb0 should not exist when the framebuffer is disabled. And that page suggests e.g. adding “nomodeset” to the kernel command line to disable it, so try this too, probably in addition to GRUB_TERMINAL_OUTPUT=console and/or GRUB_GFXPAYLOAD_LINUX=text.
(on openSUSE 13.2 you can use YaST->System->Boot Loader->Kernel Parameters to modify the kernel command line, or add it to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub and run “sudo mkconfig -o /boot/grub2/grub.cfg” afterwards)

Tried all of those (“nomodeset”, “GRUB_TERMINAL_OUTPUT=console” and “GRUB_GFXPAYLOAD_LINUX=text”) and the Grub menu is now text only, however I still have “/dev/fb0” and I still have the problem.

Well, no idea then, sorry. I don’t even use nvidia at all myself.

Regarding the original problem, you might want to ask in the KDE forums though:
http://forum.kde.org

Maybe the KWin developers might have an idea or be able to tell you how to correctly disable the framebuffer.

Have you tried already whether the problem also occurs in other X sessions? (IceWM should be installed by default)

Another suggestion: you probably use the G03 driver, right?
You could try to upgrade to the newer G04 driver, maybe this would work better?

I get the same result under most DEs. Under LXDE though it does not get triggered when going to fullscreen in Minecraft. Changing resolution still triggers it though.

No, I already have G04.

Ok, so it isn’t restricted to KDE/KWin, but a general problem.

No, I already have G04.

Well, then maybe try G03 instead.

Might be a bug in the G04 driver, so also a bugreport to nvidia might be a good idea.