This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Anyone else having suspend problems?

Tags: None
(comma "," separated)
larsonian
Registered Member
Posts
16
Karma
0

Anyone else having suspend problems?

Mon Jan 18, 2016 12:53 am
For several months suspend has been broken on my Plasma 5 arch installation. After suspend I will get one of the three scenarios:
-Panel and window decorations crash, but reappear. The bug tracker dialog appears.
- Panel and window decorations crash, and don't come back, the session is unusable.
-Occasionally I get a black screen, and can't even get a tty. I also get this if I manually turn the monitor off and back on.

I am using the Nvidia proprietary driver, which may be part of the problem, since I have an Intell and AMD laptops which both suspend perfectly when running Plasma. My Nvidia computer will suspend correctly if it is running Cinnamon desktop. I have tried suspending from a tty, suspending with compositing disabled, and replacing sddm with xinitrc. None of these has helped.

There are several bugs like this that have been reported, including one of mine. Any Ideas how the speed up the process of fixing this?
luebking
Karma
0
Window decorations refer to KWin, the problem is in transferring VBO data betwen RAM and VRAM (and seems to be a bug in the nvidia blob)
This can lead to invalid data, visual artifacts and a GL error (which we catch and reset all VBOs) or segfaults (which we unfortunately cannot catch) in the driver.

=> Suspending the compositor (SHIFT+Alt+F12) will destroy the GL context. If you do that before STR and resume (same shortcut) afterwards, you'll be on the safe side reg. kwin (unless you use the aurorae or plastik decoration pluginss, qtquick issue as below)

The panel would be plasmashell (got a crash dialog for that process as well?) - a QtQuick application which hard-depends on OpenGL. There's no way around that.

> Occasionally I get a black screen, and can't even get a tty
run "dmesg | grep NVRM"
Does it warn you about not using framebuffer consoles?
larsonian
Registered Member
Posts
16
Karma
0
So the bug I reported was probably the panel crashing. The case where window decorations disappear doesn't pop up the crash dialog- and I probably wouldn't be able to use it with the desktop in this state anyway. The command "dmesg | grep NVRM" gives the following output:

[ 4.278474] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 358.16 Mon Nov 16 19:25:55 PST 2015
[ 5.098489] NVRM: Your system is not currently configured to drive a VGA console
[ 5.098493] NVRM: on the primary VGA device. The NVIDIA Linux graphics driver
[ 5.098495] NVRM: requires the use of a text-mode VGA console. Use of other console
[ 5.098496] NVRM: drivers including, but not limited to, vesafb, may result in
[ 5.098497] NVRM: corruption and stability problems, and is not supported.
[ 1696.658550] NVRM: nvidia_frontend_open: minor 254, module->open() failed, error -4

Not sure what this means, most of the time I can access a tty just fine.

Also, i forgot to mention that I tried suspending the compositor with the hotkey, and it has no effect on the suspend bug.

Speaking of which, why does plasma 5 tear so badly when composition is suspended? On KDE 4 you could eliminate tearing by turning composition off, but with plasma 5 it's just the opposite.

I would love to see plasma 5 work better with the Nvidia proprietary driver, and would even be willing to donate a video card to a developer willing to work on this, since I have a GTX 750 ti that I am not currently using. Please let me know if there is more information you need.
luebking
Karma
0
The setup isn't supported by nvidia, see https://wiki.archlinux.org/index.php/GR ... ramebuffer

What do you mean by "plasma 5 tear so badly" - actually the desktop shell, ie. your wallpaper??
larsonian
Registered Member
Posts
16
Karma
0
I tried the grub fix- it makes my tty's look much nicer, but I'm not sure it fixed much else. If I suspend composition with the hotkey I get the crash with panel restarting, and the bug tracker dialog, but not so far the crash with the window decorations disappearing. This is at least a bit of an improvement, since I can continue using the desktop without restarting it.

I had another interesting failure when I tried powering the monitor off with the computer still on. The wallpaper and panel appear when I power the monitor back on, but the windows are missing. I get the previews of them when I mouse over the task switcher, but nothing when I click on it. At least I can use the menu to logout, and restart the session.

As for tearing I get it everywhere if composition isn't enabled. This includes playing videos, steam games, scrolling in Firefox, and moving windows. I would like to use the "suspend composition for fullscreen windows" option, but can't due to tearing. I am using the "tripplebuffer" xorg option, but am not sure it does anything. In KDE 4 tearing only happened when compositing was enabled, so it is strange that the opposite is true in plasma 5.

It's my feeling that there is some bad interaction between the Nvidia driver and Plasma 5, so if you or some other developer are willing to work on this, I will help in this as much as my limited abilities allow.
luebking
Karma
0
Not sure what you mean by "look much nicer", but your principal goal is to make that statement in dmesg disappear.


You need to provide the "developer information" from the crash dialog, otherwise it's not possible to tell anything about the crash.


The windows are certainly not gone if you get previews - they actually need to be mapped.
There's four possiblee cases:
1) The compositor doesn't paint them/they're minimized (unlikely, but suspending the compositor should show them immediately)
2) they're far away (start "konsole" and run "xwininfo -root -tree")
3) you're somehow on a new activity (where the windows are not, check the activity manager)
4) they're below the desktop (Alt+F2 should bring up krunner, enter "pkill plasmashell")

Please don't ask me what or why this happens, never seen and there's so far been no bugreport in this direction.


Tearing in client X (firefox) is not related to client Y (plasmashell) - client X simply doesn't align to vblank and this is only covered by the compositor doing so.

If you have an effective
Option "TripleBuffer" "True" # nb.: *one* "p"
in the xorg.conf, this will be confirmed in /var/log/Xorg.0.log
larsonian
Registered Member
Posts
16
Karma
0
The dmesg error did disappear, I'm just not sure it helps anything else. By "nicer", I mean the text is less fuzzy, although the size seems to be about the same. The panel crash I have already reported, although I was lumping it in with the window decoration crash at the time, and maybe should re-report it. it was marked as a duplicate bug anyway. I will try to duplicate the "invisible/inaccessible window crash and report a bug, but it will have to wait until tomorrow evening, as I am out of time.
luebking
Karma
0
larsonian wrote:The panel crash I have already reported

Link?
larsonian
Registered Member
Posts
16
Karma
0
larsonian
Registered Member
Posts
16
Karma
0
More details on the monitor power off crash-

The hidden apps are still running, they show up in top using CPU and RAM. The panel and menu are both fully functional. I was able to add the activities switcher to the panel with plasma in this state. I only have one activity running, though so it's not terribly useful. Applications can be started, but they don't have a title bar. if I start more than one, there is no way to switch to the first one- it stays hidden under the second.

Suspending composition definitely seems to prevent the "no window decorations" crash, which is nice since that one required restarting the desktop. I also haven't seen the "black screen" crash since I applied the framebuffer fix to grub. This used to be the most common result when turning off the monitor.

Quick question- what's the best way to kill a malfunctioning plasma session? Using "sudo systemctl restart sddm" gives a clean restart, but if I have a second login it is restarted as well. I have also tried "killall -U", but this tends to break things. Sddm gives an error box about qdbus or kdbus if I do this.
luebking
Karma
0
larsonian wrote:https://bugs.kde.org/show_bug.cgi?id=357551

That's the mighty nullptr QScreen bug, it's supposed to be fixed in Qt5.6 and caused us tons of crash reports.
larsonian wrote:
larsonian wrote:Applications can be started, but they don't have a title bar.


Means KWin crashed (likely for the same bug in QScreen - it potentially affects *all* clients on *any* randr event) and didn't auto-restart (likely due to https://bugs.kde.org/show_bug.cgi?id=353428)

W/o a window manager, the new plasmashell desktop window can easily show up above all other windows.

larsonian wrote:Quick question- what's the best way to kill a malfunctioning plasma session?


Kill the relevant ksmserver process (it keeps the session open) or enable zapping and use ctrl+alt+backspace, see
http://unix.stackexchange.com/questions ... tbackspace
larsonian
Registered Member
Posts
16
Karma
0
Thanks, I am looking forward to 5.6.

Another quick note on monitor power issues; if I enable "screen energy savings" to turn the monitor off after a timeout, normal keyboard activity won't bring back the desktop. If I switch to a tty, the screen will remain blank. If I switch back, though, the desktop will reappear, usually unbroken. If instead, I hit the monitor power button, I get the "desktop as top window" bug where I cant access open windows. When manually powering off the monitor, I can "end run" this bug by switching to a tty first. The tty will come back black, but when I switch to the desktop it is unbroken.

I will enable CTRL+ALT+backspace. I started out on Mandrake, and was annoyed when it started being standard practice for distros to disable this.
luebking
Karma
0
Please notice that the relevant update will be Qt 5.6, not plasma-desktop (or kf5)

About the screen issues, run "kcmshell5 kded" and disable and stop the kscreen daemon in the lower section.
I assume it will reconfigure the screen layout when the monitor goes into suspend/off mode and that causes the randr events which trigger the qscreen segfaults.
larsonian
Registered Member
Posts
16
Karma
0
Disabling kscreen seems to fix most issues with manually powering off the monitor. The desktop comes back unbroken most of the time, although sometimes I do get the "panel crash" with the bug tracker dialog opening. Actually I think it is plasmashell that crashed- but either way, the desktop restarts itself to a normal state.

If the monitor is turned off by plasma's power management ("screen energy saving- switch off after X minutes" in settings), the desktop now comes back, but waking it up is a bit strange. It can't be woken up by normal keyboard input. It can be woken up by switching to a tty, then back to the desktop. It can also be woken up by hitting the monitor power switch, then any key on the keyboard. If I just hit the power switch the backlight comes on, but the screen remains blank, and the backlight goes out after a bit.

Is there anything here I should file a bug report on, or are these all known issues?
luebking
Karma
0
I frankly don't know what powerdevil is doing there, but if you activate dpms, X11 should re-activate the monitor on any input event. Disable powerdevil (also kded kcm) and see how your monitor reacts to

Code: Select all
xset dpms force standby
xset dpms force suspend
xset dpms force off


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft