Wednesday, January 20, 2016

Kubuntu Wily 15.10 KDE upgrade from 5.4.3 to 5.5.3

So, Kubuntu 15.10 told me I had an update - a big update.  I'm pretty sure it's the KDE 5.5.2 that was put out last month.  Kubuntu is low on staff right now, so it takes longer for KDE releases to get repackaged.  Still, I'm thrilled that this is available.  Actually, the upgrade is to KDE 5.5.3 - amd64 4:5.5.3a-ubuntu1~ubuntu15.10~ppa5.  It looks like Qt is being upgraded to 5.5.1 - amd64 5.5.1+dfsg-1ubuntu1~wily1~test1.

Unfortunately, the upgrade didn't go smoothly.  It booted up into a TTY on the first reboot.  It looked like the nVidia driver didn't find any compatible displays so X wouldn't come up.  I switched to intel (prime-select) and rebooted, but now it's showing me a "low graphics mode" dialog with options for trying full graphical mode, reconfiguring, console, etc.  Dropped to a console.

MORALE OF THE STORY: SDDM was trying to start X before the nVidia driver was fully initialized, so X couldn't find any compatible displays.

SOLUTION: Use a systemd timer to delay the start of SDDM - I used 5s.  See the bottom of this post.

It's trying to load the failsafe X server and I'm still getting errors!

Rebooting back into nvidia mode to diagnose logs more thoroughly.

The Xorg log shows me this error:

(EE) modeset(G0): drmSetMaster failed: Invalid argument
...
(EE) addScreen/ScreenInit failed for gpu driver 0 -1

prime-offload.log shows:

Sorry we only support randr 1.4 or higher

The Xorg failsafe log shows me nothing terribly useful.

Google gave me this:

http://askubuntu.com/questions/613021/nvidia-xorg-crashes-on-15-04-drmsetmaster-failed-invalid-argument

I ran nvidia-xconfig.  Same error - no difference.

Doing an apt-get -s remove --purge nvidia-* shows me these files would be removed:

nvidia-352 [352.63-0ubuntu0.15.10.1
nvidia-opencl-icd-352
nvidia-prime [0.8.1]
nvidia-settings [352.21-0ubuntu1]

Do it.

On reinstall, it's trying to build the kernel modules for 4.4.0-rc2, which I haven't had installed in a while.  Where is it finding this??

Huh, there is an initramfs file in my /boot with that version.  Oops.  Deleted it via update-initramfs -d -k 4.4.0-rc2+.  Seemed to do something.

Let's reinstall the nvidia drivers.  Gonna purge first and reinstall.  Super safe...

Seemed to go smoothly, no errors.  ::sigh::  Reboot.

Still no joy.  Same Xorg error.  Still the same, weird prime-offload error.

Manually running startx as root... display is black (no backlight).  Switched to TTY2 and did 'sudo pkill X' - at least tty1 is back.

Let's prime-select to 'intel' and reboot.

Wouldn't reboot gracefully - had to use power button.  Hung on the glowing Kubuntu logo.

OK, in intel mode I got the same "system is running in low graphics mode" dialog.  Let's select "try running with default graphical mode".

Whoa, kde 5.5.3 came right up!  Dang!  With a funky new background.  Yay!

Indeed, we're running on KDE 5.5.3 and Qt 5.5.1.  Woo-hoo!

Moral of the story: switch to intel mode after upgrade and then figure out why nvidia's broken (again).

My old xorg.conf was:

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0@0:2:0"
    Option "AccelMethod" "None"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1@0:0:0"
    Option "ConstrainCursor" "off"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "IgnoreDisplayDevices" "CRT"
EndSection


I'm going to prime-select to nvidia and reboot.

Still seeing the exact same errors.  Looking at journalctl -b is helpful.  Here are some relevant errors:

sddm Running /usr/bin/X -nolisten tcp -auth /var/run/sddm/{...} -background none -noreset -displayfd 17 vt7
sddm running display setup script "/usr/share/sddm/scripts/Xsetup"
sddm /usr/bin/xauth bad "remove" command line
sddm /usr/bin/xauth bad "add" command line
sddm Display server stopped.
sddm Running display stop script "/usr/share/sddm/scripts/Xstop"

It then tries again with additional problems:

sddm Running /usr/bin/X -nolisten tcp -auth /var/run/sddm/{...} -background none -noreset -displayfd 17 vt7
sddm running display setup script "/usr/share/sddm/scripts/Xsetup"
sddm /usr/bin/xauth bad "remove" command line
sddm /usr/bin/xauth bad "add" command line
sddm Display server stopped.
sddm Running display stop script "/usr/share/sddm/scripts/Xstop"
sddm QProcess Destroyed while process ("/usr/lib/x86-64-linux-gnu/sddm/sddm-helper") is still running
sddm-helper Received a wrong opcode instead of AUTHENTICATED: 0
sddm.service: Main process exited, code=dumped, status=11/SEGV
sddm.service: Failed to schedule restart job: Transaction is destructive.
sddm.service: Failed with result 'resources'.
Started X.org diagnosis failsafe.

WTF?

I did get it running by manually running 'systemctl restart sddm' from the TTY.  Hey, that's something!

Here's an interesting exchange about a problem similar to this:

https://bbs.archlinux.org/viewtopic.php?id=189145

As always, it's between arch users - apparently the geniuses of the Linux world.

He suggests delaying sddm by creating a systemd timer that runs after a set period.  Huh.  Here's what he used:


cat /etc/systemd/system/sddm.timer 
[Unit]
Description=Start sddm service fixed time after boot

[Timer]
OnStartupSec=20
Unit=sddm.service

[Install]
WantedBy=multi-user.target

He then disabled sddm.service and enables the timer:

systemctl disable sddm.service
systemctl enable sddm.timer

I changed the "WantedBy" dependency to "graphical.target" instead of "multi-user" target and the delay to 5s.  On my system sddm was wanted by graphical.target and not multi-user.target.

Huh, it worked.  Damn!

KDE 5.5.3 on Kubuntu Wily 15.10

I recently updated my Kubuntu Wily Verix 547 (nVidia Optimus) laptop from KDE 5.4.3 to 5.5.3 via backports and it's performing well so far!  The system feels very smooth now, the notification area is consistent and predictable, suspend/resume feels like it's a solved problem, and the system as a whole feels more stable.  Note that the Kubuntu packagers also upped Qt to 5.5.1, which is probably also a piece of the ever-improving KDE puzzle.

Thanks for all the hard work!

There are a few problems, still, mainly related to Optimus.  My system won't currently start X using the discrete (970M) video card.  X says it can't find an output and fails.  With prime-select in 'intel mode, the system boots to a "running in low graphics mode" dialog but will load successfully when selecting the normal graphical boot.  The Verix is an Intel 4810QM which has a perfectly serviceable IGPU for non-gaming work, so this is acceptable for now.  But, I'll be fighting with nVidia soon enough, I'm sure.

Wednesday, January 13, 2016

KDE Plasma 5 Notifications - missing characters??

Sometimes I'll see this very strange behavior when notifications pop up.  Some characters are simply not displayed.  Here's an example:

It should say:

System Notification Helper
A system restart is needed to complete the update process

Is that bizarre or what?  Here are the mising letters:

e
s e e s e e e e e s s

So, it looks like 'e' is missing a lot.  I never noticed that it was only ees and esses.  But, not all ees and esses - just some of them.

I've noticed them in other notification types as well, not just system restarts.

Plasma 5 resume image corruption issues

I frequently have plasma (5.4.3 in Kubuntu 15.10 Wily) issues on resume from suspend (wake from sleep).  Often times plasma crashes but usually automatically restarts. This post is about a different issue - image corruption.  Note that I have a 970M-based nVidia Optimus laptop running PRIME in nvidia mode.  I don't run off the integrated GPU (intel) enough to notice the problem.

Sometimes a portion of the screen is corrupted.  On my system this takes the form of a "snow" image, mostly white with lots of light-colored dots, reminding me of the snow image analog TVs would display when no signal was present.

Once, the "snow" was present in a Konsole window.  The decorations and border were fine, but the actual console content was this snow image.

Other times, the desktop background was this snow image.

Interestingly, the functionality of the desktop remains unchanged.  I can switch between desktops, move windows, etc.  And compositing is still enabled, with my fancy desktop-cube switcher and wobbly windows.  But, the background remained snowy.

The only way I found to fix it, short of logging out and back on, was by disabling compositing ("disable desktop effects" - shift-alt-F12).  The background image was correctly displayed.  I then re-enabled compositing and all was good.

Confusing, but there you have it.  At least I didn't have to end my session and restart X!

Friday, January 8, 2016

Plasma in Kubuntu Wily (15.10) crashes on resume

Every time I suspend my laptop (Verix 547 with nVidia 970M in optimus), Plasma crashes.  Well, not every time, but quite frequently.  Here's the error I see:



Application: Plasma (plasmashell), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
[Current thread is 1 (Thread 0x7fefbcd2f800 (LWP 2622))]

Thread 12 (Thread 0x7fefa688e700 (LWP 2624)):
#0 0x00007fefb74df8dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1 0x00007fefbb526bd2 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2 0x00007fefbb52874f in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3 0x00007fefa9450a39 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so
#4 0x00007fefb7bd22be in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5 0x00007fefb6cc16aa in start_thread (arg=0x7fefa688e700) at pthread_create.c:333
#6 0x00007fefb74eaeed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 11 (Thread 0x7fef9ffff700 (LWP 2668)):
#0 0x00007fefb7e08664 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#1 0x00007fefb428b77d in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007fefb428c11b in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007fefb428c2fc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x00007fefb7e0929b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5 0x00007fefb7daf75a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6 0x00007fefb7bcd3d4 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7 0x00007fefba3f5f85 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#8 0x00007fefb7bd22be in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9 0x00007fefb6cc16aa in start_thread (arg=0x7fef9ffff700) at pthread_create.c:333
#10 0x00007fefb74eaeed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 10 (Thread 0x7fef9555c700 (LWP 2679)):
#0 0x00007fefb428b728 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1 0x00007fefb428c11b in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007fefb428c2fc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007fefb7e0929b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4 0x00007fefb7daf75a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5 0x00007fefb7bcd3d4 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6 0x00007fefba3f5f85 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#7 0x00007fefb7bd22be in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8 0x00007fefb6cc16aa in start_thread (arg=0x7fef9555c700) at pthread_create.c:333
#9 0x00007fefb74eaeed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 9 (Thread 0x7fef8ec5a700 (LWP 2691)):
#0 0x00007fefb7e0722e in QTimerInfoList::repairTimersIfNeeded() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#1 0x00007fefb7e072a3 in QTimerInfoList::timerWait(timespec&) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2 0x00007fefb7e0867e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3 0x00007fefb428b77d in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x00007fefb428c11b in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007fefb428c2fc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6 0x00007fefb7e0929b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7 0x00007fefb7daf75a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8 0x00007fefb7bcd3d4 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9 0x00007fefba3f5f85 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#10 0x00007fefb7bd22be in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007fefb6cc16aa in start_thread (arg=0x7fef8ec5a700) at pthread_create.c:333
#12 0x00007fefb74eaeed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 8 (Thread 0x7fef8d359700 (LWP 2708)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007fefbc781114 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Script.so.5
#2 0x00007fefbc781159 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Script.so.5
#3 0x00007fefb6cc16aa in start_thread (arg=0x7fef8d359700) at pthread_create.c:333
#4 0x00007fefb74eaeed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 7 (Thread 0x7fef867fa700 (LWP 2714)):
#0 0x00007fefb74df8dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1 0x00007fefb428c1ec in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007fefb428c2fc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007fefb7e0929b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4 0x00007fefb7daf75a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5 0x00007fefb7bcd3d4 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6 0x00007fefbad71ef6 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#7 0x00007fefb7bd22be in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8 0x00007fefb6cc16aa in start_thread (arg=0x7fef867fa700) at pthread_create.c:333
#9 0x00007fefb74eaeed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 6 (Thread 0x7fef8580f700 (LWP 2715)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007fefb7bd355b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2 0x00007fefbade4b3e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#3 0x00007fefbade53c3 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#4 0x00007fefb7bd22be in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5 0x00007fefb6cc16aa in start_thread (arg=0x7fef8580f700) at pthread_create.c:333
#6 0x00007fefb74eaeed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 5 (Thread 0x7feeeae00700 (LWP 2857)):
#0 0x00007fefb7e08633 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#1 0x00007fefb428b77d in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007fefb428c11b in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007fefb428c2fc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x00007fefb7e0929b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5 0x00007fefb7daf75a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6 0x00007fefb7bcd3d4 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7 0x00007feeed0978f7 in KCupsConnection::run() () from /usr/lib/x86_64-linux-gnu/libkcupslib.so
#8 0x00007fefb7bd22be in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9 0x00007fefb6cc16aa in start_thread (arg=0x7feeeae00700) at pthread_create.c:333
#10 0x00007fefb74eaeed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7feee9ec1700 (LWP 2867)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007fefb7bd355b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2 0x00007fefbade4b3e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#3 0x00007fefbade53c3 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#4 0x00007fefb7bd22be in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5 0x00007fefb6cc16aa in start_thread (arg=0x7feee9ec1700) at pthread_create.c:333
#6 0x00007fefb74eaeed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7feee120a700 (LWP 2927)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007fefb7bd355b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2 0x00007fefbade4b3e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#3 0x00007fefbade53c3 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#4 0x00007fefb7bd22be in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5 0x00007fefb6cc16aa in start_thread (arg=0x7feee120a700) at pthread_create.c:333
#6 0x00007fefb74eaeed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7feee0a09700 (LWP 3020)):
[KCrash Handler]
#6 __strstr_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strstr-sse2-unaligned.S:40
#7 0x00007fefbadc280a in QSGRenderContext::initialize(QOpenGLContext*) () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#8 0x00007fefbade5619 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#9 0x00007fefb7bd22be in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007fefb6cc16aa in start_thread (arg=0x7feee0a09700) at pthread_create.c:333
#11 0x00007fefb74eaeed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7fefbcd2f800 (LWP 2622)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007fefb7bd355b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2 0x00007fefbade183b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#3 0x00007fefbade432f in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#4 0x00007fefbade493b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#5 0x00007fefb80dc7c5 in QWindow::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#6 0x00007fefbae14fd3 in QQuickWindow::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#7 0x00007fefbc8b1efb in PlasmaQuick::Dialog::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libKF5PlasmaQuick.so.5
#8 0x00007fefb888fb8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#9 0x00007fefb8895230 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007fefb7db1f1b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007fefb80d5336 in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#12 0x00007fefb80d607d in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#13 0x00007fefb80bb5b8 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#14 0x00007fefa947d250 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so
#15 0x00007fefb428bff7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#16 0x00007fefb428c250 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#17 0x00007fefb428c2fc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007fefb7e0927f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007fefb7daf75a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007fefb7db72cc in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00000000004322c3 in main (argc=2, argv=<optimized out>) at ../../shell/main.cpp:176


Yeah, a lot of crap.  I think all that matters is the actual location of the error:

Application: Plasma (plasmashell), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185

I'm not the only one dealing with this - try googling and you'll find more.  Fortunately, Plasmashell automatically restarts and the session isn't restarted, so it's not a huge loss.

Because I'm running on Kubuntu 15.10 and they've paired KDE5 with Qt 5.4, I've read that that this old Qt is part of the problem.  Supposedly the Kubuntu team is working on packaging Plasma 5.5 with Qt 5.5 (or 5.6?) - 5.5.1 is available for Xenial but not yet packaged for Wily.  We'll see what happens when the newer Plasma is in wily-backports.

Tuesday, January 5, 2016

Kubuntu 15.10 - SDDM crashes

Sometimes sddm-greeter will refuse to start.  The greeter simply presents a blank screen.  A syslog entry shows:

Jan  5 16:24:43 jason-verix kernel: [ 1666.636093] sddm-greeter[2074]: segfault  at 18 ip 00007f49c6e30e38 sp 00007ffdeda61c70 error 4 in libqxcb.so[7f49c6de7000+b5000]

This happened every time.  I tried restarting via systemd:

systemctl restart sddm

This produced the same error.  I tried restarting X with no luck, also pkill'ing X - still no luck.  So, I brought down SDDM:

sudo service sddm stop

and brought it back up

sudo service sddm start

And it came up.  I don't understand why.  Frustrating!

Note that it may be worthwhile delaying the start of sddm to give the video driver more time to initialize the displays.  Another set of problems I was having was resolved by this technique, which is described here:

http://jasontechstuff.blogspot.com/2016/01/kubuntu-wily-1510-kde-upgrade-from-543.html

Monday, January 4, 2016

Upgrading from Kubuntu 14.10 to 15.10 - can't access my work's WiFi

So, after the torturous upgrade from Kubuntu 14.10 to 15.10, I at least got to the point where I could start plasma (but only in intel mode, not nvidia).  But, when I got to work, I discovered I couldn't access my company's guest network (WPA2 personal authentication).  I could connect, but DNS failed.  I saw this error in the log:

blah blah NetworkManager /etc/resolvconf/update.d/libc: Warning resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf

I'm not sure how this broke during the upgrade, but simply reconfiguring the resolvconf did the trick:

sudo dpkg-reconfigure resolvconf

Another reboot and I'm back in action.  Whew!

Upgrading from Kubuntu 14.10 to 15.10 - can't log in

School has been intense and I haven't felt comfortable making the switch from Kubuntu 14.10 to 15.10 on my main laptop.  This involves transitioning from KDE4 to KDE5 with all of the attendant breakages that will inevitably occur.

But, since 14.10 support ended almost 6 months ago (Canonical only promises 9 months of package updates for non-LTS releases) and I'm going to end up on KDA/Plasma5 no matter what, I decided to take the plunge and do the in-place distribution upgrade.  I have a separate /home partition so I could have simply wiped / and reinstalled directly, which is the recommended process.  Eh, call me a masochist.

Note that this ALSO switched from upstart (a SysV-based init daemon) to systemd.  And a new session manager, SDDM, away from lightDM.  Lots of scary changes at once.

Note that you can't go from 14.10 to 15.10, you MUST go thru 15.04 (Vivid).  The upgrade to 15.04 went well, surprisingly, and I was able to boot back into the new system with no problems.  I didn't fiddle around in 15.04 - I just went straight into the next distribution upgrade to 15.10 (Wily - sorry, Vivid, I hardly knew ye).

Then the pain began.  It wouldn't boot for one thing - just came up in a black screen.  I ended up doing a recovery mode boot and could at least get the recovery menu to come up.  Whew.

Most of the problems for this laptop are related to the Optimus configuration.  So, I tried switching back to the intel driver (prime-select intel).  Still no joy.

I ended up uninstalling xorg-edgers and graphics-drivers PPAs and trying various incarnations of the Ubuntu-packaged nVIDIA drivers (nvidia-35[258]).  After much fiddling, I ended up being able to get a greeter, but only in intel mode.

However, I couldn't log in.  The greeter would go away and give me a black screen, and then 10s later the greeter would come back.  No change in the "failsafe" login.

I couldn't find any obvious issues in the logs, but I knew that updating KDE can be fragile and previous configurations can confuse newer components.  So, I tried creating  new user via useradd and seeing what would happen.

After a reboot, the greeter came up and I was able to log in via the new user.  HALLELUJAH!

At that point I went back to my original user account and began bisecting all of my configuration, specifically the entries in .local, .config, and .kde.  I would move a configuration directory into a backup area and reboot.  If plasma came up, then I'd try a different "configuration" of configuration directories until I found a config directory that broke the login.

After much directory moving and renaming, I ended up narrowing it down to kded5 in .local/share.  So, I simply removed that config and I was able to get back in.

WHEW.

I still can't re-enable the nvidia driver.  prime-select nvidia causes the same login problem, except that instead of looping back to the greeter, it just hangs.  Joy.  More testing to come.