View previous topic :: View next topic |
Author |
Message |
asturm Developer
Joined: 05 Apr 2007 Posts: 8933
|
Posted: Sun Aug 13, 2017 10:05 pm Post subject: |
|
|
Code: | $ grep "pam_ck_connector.*nox11" /etc/pam.d/system-login |
|
|
Back to top |
|
|
mrsteven Veteran
Joined: 04 Jul 2003 Posts: 1938
|
Posted: Sun Aug 13, 2017 10:29 pm Post subject: |
|
|
As a quick and dirty workaround, try to disable the seccomp USE-Flag for =kde-plasma/kscreenlocker-5.10.4, even if your kernel has CONFIG_SECCOMP enabled. In my case this helped and now I can unlock my screen again without further hackery.
According to strace(1), part of the problem is that seccomp prevents /usr/lib64/libexec/kscreenlocker_greet from creating a shared memory object in /dev/shm. Eventually I'm going to further investigate this issue, but currently I lack the time. _________________ Unix philosophy: "Do one thing and do it well."
systemd: "Do everything and do it wrong." |
|
Back to top |
|
|
jok n00b
Joined: 26 Jan 2008 Posts: 22 Location: Finland
|
Posted: Mon Aug 14, 2017 12:56 am Post subject: |
|
|
Code: | Session1:
unix-user = '1001'
realname = '(null)'
seat = 'Seat1'
session-type = 'unspecified'
session-class = 'user'
session-state = 'active'
active = TRUE
x11-display = ':0'
x11-display-device = '/dev/tty7'
display-device = ''
remote-host-name = ''
is-local = TRUE
on-since = '2017-08-13T22:10:14.605054Z'
login-session-id = '4'
XDG_RUNTIME_DIR = '/var/run/user/1001'
VTNr = '7'
|
asturm wrote: | Code: | $ grep "pam_ck_connector.*nox11" /etc/pam.d/system-login |
|
Code: | session optional pam_ck_connector.so nox11
|
|
|
Back to top |
|
|
jok n00b
Joined: 26 Jan 2008 Posts: 22 Location: Finland
|
Posted: Mon Aug 14, 2017 1:02 am Post subject: |
|
|
mrsteven wrote: | As a quick and dirty workaround, try to disable the seccomp USE-Flag for =kde-plasma/kscreenlocker-5.10.4, even if your kernel has CONFIG_SECCOMP enabled. In my case this helped and now I can unlock my screen again without further hackery.
According to strace(1), part of the problem is that seccomp prevents /usr/lib64/libexec/kscreenlocker_greet from creating a shared memory object in /dev/shm. Eventually I'm going to further investigate this issue, but currently I lack the time. |
I'll be damned, that works!
Thank you, this workaround will definitely do for now. |
|
Back to top |
|
|
freifunk_connewitz Apprentice
Joined: 08 Feb 2006 Posts: 231
|
Posted: Mon Aug 14, 2017 10:11 am Post subject: |
|
|
Hi yok, asturm and mrsteven,
I just wanted to confirm that the same problem with kscreenlocker-5.10.4 happened to me- and mrstevens workaround worked, too.
I didn't do an strace, but also here kscreenlocker_greet segfaulted, with these messages:
Code: | $ /usr/lib64/libexec/kscreenlocker_greet --testing
org.kde.kcoreaddons: Failed to establish shared memory mapping, will fallback to private memory -- memory usage will increase
Locked at 1502704938
KCrash: Application 'kscreenlocker_greet' crashing...
Segmentation fault |
Thanks for investigating and the workaround! |
|
Back to top |
|
|
Yamakuzure Advocate
Joined: 21 Jun 2006 Posts: 2280 Location: Adendorf, Germany
|
Posted: Mon Aug 14, 2017 12:14 pm Post subject: |
|
|
Did you log out and back into Plasma after your last upgrade? _________________ Important German:- "Aha" - German reaction to pretend that you are really interested while giving no f*ck.
- "Tja" - German reaction to the apocalypse, nuclear war, an alien invasion or no bread in the house.
|
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3921 Location: Hamburg
|
Posted: Mon Aug 14, 2017 4:41 pm Post subject: |
|
|
mrsteven wrote: | As a quick and dirty workaround, try to disable the seccomp USE-Flag for =kde-plasma/kscreenlocker-5.10.4, | works here, thx ! |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Tue Aug 15, 2017 2:05 pm Post subject: |
|
|
Quote: | The screen locker is broken and unlocking is not possible anymore.
In order to unlock switch to a virtual terminal (e.g. Ctrl+Alt+F2), log in and execute the command:
loginctl unlock-sessions
Afterwards switch back to the running session (Ctrl+Alt+F7). |
I know mrsteven has found a work-around for this annoying problem, but, purely to satisfy my own curiosity, I have been trying to devise a Bash script to unlock the KDE Plasma desktop when the problem occurs. However, I can't replicate the problem at will. Is there a simple way of triggering the problem so that I can test my script?
Code: | $ cat ~/unlock-session.sh
#!/bin/bash
session=Session$(ck-list-sessions | grep -B10 "x11-display = ':0" | grep -o -P '(?<=Session).*(?=:)')
echo "#!/bin/bash" > /unlock.sh
echo "su -c 'dbus-send --system --print-reply --dest=\"org.freedesktop.ConsoleKit\" /org/freedesktop/ConsoleKit/$session org.freedesktop.ConsoleKit.Session.Unlock'" >> /unlock.sh
chmod +x /unlock.sh
openvt -s -w /unlock.sh |
The procedure when the problem occurs would be:
1. Use Ctrl+Alt+F1 to switch to VT1.
2. Log in as root user.
3. Enter the command "/home/<username>/unlock-session.sh".
4. Use Ctrl+Alt+F7 to switch back to VT7, which (hopefully) should now be unlocked. _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8933
|
Posted: Tue Aug 15, 2017 2:47 pm Post subject: |
|
|
You could also look into consolekit-1.2.0 to possibly have such an unlock command available, since it is supposed to implement logind calls for Wayland compatibility. |
|
Back to top |
|
|
freifunk_connewitz Apprentice
Joined: 08 Feb 2006 Posts: 231
|
Posted: Tue Aug 15, 2017 9:13 pm Post subject: |
|
|
Yamakuzure wrote: | Did you log out and back into Plasma after your last upgrade? |
yes, problem persisted even after reboot.
Fitzcarraldo wrote: | I know mrsteven has found a work-around for this annoying problem, but, purely to satisfy my own curiosity, I have been trying to devise a Bash script to unlock the KDE Plasma desktop when the problem occurs. However, I can't replicate the problem at will. Is there a simple way of triggering the problem so that I can test my script? |
just upgrade kscreenlocker to version 5.10.4 as currently in the tree, without using mrstevens workaround, that is, with seccomp useflag as by default. then start the kde screenlocker. |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8933
|
Posted: Tue Aug 15, 2017 9:59 pm Post subject: |
|
|
Not necessarily, since it works for me and other people who tested it. |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Tue Aug 15, 2017 9:59 pm Post subject: |
|
|
freifunk_connewitz wrote: | Fitzcarraldo wrote: | I know mrsteven has found a work-around for this annoying problem, but, purely to satisfy my own curiosity, I have been trying to devise a Bash script to unlock the KDE Plasma desktop when the problem occurs. However, I can't replicate the problem at will. Is there a simple way of triggering the problem so that I can test my script? |
just upgrade kscreenlocker to version 5.10.4 as currently in the tree, without using mrstevens workaround, that is, with seccomp useflag as by default. then start the kde screenlocker. |
That was the first thing I tried. I can't reproduce the problem at will. The correct KDE Lock Screen appears and I can enter my password to unlock the screen and get back to the existing Plasma desktop. Perhaps someone who is experiencing the problem frequently could try the script and the procedure.
Code: | fitzcarraldo@meshedgedx ~ $ eix -I kscreenlocker
[I] kde-plasma/kscreenlocker
Available versions: (5) 5.10.4^t
{debug +pam seccomp test}
Installed versions: 5.10.4(5)^t(14:36:19 14/08/17)(pam seccomp -debug -test)
Homepage: https://www.kde.org/
Description: Library and components for secure lock screen architecture |
_________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8933
|
Posted: Sun Aug 20, 2017 7:27 am Post subject: |
|
|
So, since we established that USE=seccomp is enabled in all error cases, but not every USE=seccomp setup is affected, we've learned there might be a second component involved. Those of you who have enabled DRI3 raise your hands! Please switch back to DRI2 and USE=seccomp for testing. |
|
Back to top |
|
|
mrsteven Veteran
Joined: 04 Jul 2003 Posts: 1938
|
Posted: Thu Aug 24, 2017 9:40 pm Post subject: |
|
|
asturm wrote: | Those of you who have enabled DRI3 raise your hands! |
Yes, DRI3 with the modesetting driver on Intel hardware here.
Quote: | Please switch back to DRI2 and USE=seccomp for testing. |
I can confirm that this works: /usr/lib64/libexec/kscreenlocker_greet does not crash with seccomp and DRI2.
To those wondering how to disable DRI3 in KDE/Plasma 5: Put the following into ~/.config/plasma-workspace/env/kwin_env.sh:
Code: | #!/bin/sh
export LIBGL_DRI3_DISABLE=1 |
For a quick test you can also invoke /usr/lib64/libexec/kscreenlocker_greet directly, after exporting respective unsetting LIBGL_DRI3_DISABLE in your shell, e.g.:
Code: | export LIBGL_DRI3_DISABLE=1
/usr/lib64/libexec/kscreenlocker_greet --testing |
_________________ Unix philosophy: "Do one thing and do it well."
systemd: "Do everything and do it wrong." |
|
Back to top |
|
|
KShots Guru
Joined: 09 Oct 2003 Posts: 591 Location: Florida
|
Posted: Sun Sep 03, 2017 10:47 pm Post subject: |
|
|
Code: | rich@graendal ~ $ LIBGL_DRI3_DISABLE=1 /usr/lib64/libexec/kscreenlocker_greet --testing
org.kde.kcoreaddons: Failed to establish shared memory mapping, will fallback to private memory -- memory usage will increase
Locked at 1504478531
KCrash: Application 'kscreenlocker_greet' crashing...
Segmentation fault (core dumped) |
Code: | rich@graendal ~ $ emerge -pv nvidia-drivers
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ~] x11-drivers/nvidia-drivers-384.69:0/384::gentoo USE="X acpi driver kms multilib static-libs tools uvm -compat -gtk3 -pax_kernel -wayland" ABI_X86="32 (64) (-x32)" 0 KiB | emerge --info Code: | rich@graendal ~ $ emerge --info
Portage 2.3.6 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop/plasma/systemd, gcc-5.4.0, glibc-2.23-r4, 4.12.5-gentoo x86_64)
=================================================================
System uname: Linux-4.12.5-gentoo-x86_64-Intel-R-_Core-TM-_i7-6700HQ_CPU_@_2.60GHz-with-gentoo-2.3
KiB Mem: 16365840 total, 356248 free
KiB Swap: 8305660 total, 8305660 free
Timestamp of repository gentoo: Sun, 03 Sep 2017 22:30:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.28.1 p1.0) 2.28.1
app-shells/bash: 4.3_p48-r1::gentoo
dev-java/java-config: 2.2.0-r3::gentoo
dev-lang/perl: 5.24.1-r2::gentoo
dev-lang/python: 2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake: 3.7.2::gentoo
dev-util/pkgconfig: 0.28-r2::gentoo
sys-apps/baselayout: 2.3::gentoo
sys-apps/openrc: 0.28::gentoo
sys-apps/sandbox: 2.10-r3::gentoo
sys-devel/autoconf: 2.13::gentoo, 2.69::gentoo
sys-devel/automake: 1.11.6-r1::gentoo, 1.13.4::gentoo, 1.15-r2::gentoo
sys-devel/binutils: 2.28.1::gentoo
sys-devel/gcc: 5.4.0-r3::gentoo
sys-devel/gcc-config: 1.7.3::gentoo
sys-devel/libtool: 2.4.6-r3::gentoo
sys-devel/make: 4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc: 2.23-r4::gentoo
Repositories:
gentoo
location: /usr/portage
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
x-portage
location: /usr/local/portage
masters: gentoo
priority: 0
qt
location: /var/lib/layman/qt
sync-type: laymansync
sync-uri: https://anongit.gentoo.org/git/proj/qt.git
masters: gentoo
priority: 50
steam-overlay
location: /var/lib/layman/steam-overlay
sync-type: laymansync
sync-uri: https://github.com/anyc/steam-overlay.git
masters: gentoo
priority: 50
vifino-overlay
location: /var/lib/layman/vifino-overlay
sync-type: laymansync
sync-uri: https://github.com/vifino/vifino-overlay.git
masters: gentoo
priority: 50
Installed sets: @esteam
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=broadwell -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/sddm/scripts/Xsetup"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=broadwell -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi activities alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr clang cli cracklib crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gnome-keyring gpm gssapi gtk hidpi iconv ipv6 jpeg kde kerberos kipi kwallet lcms ldap libnotify mad mng modules mp3 mp4 mpeg multilib ncurses networkmanager nls nptl ogg openal opengl openmp pam pango pcre pdf phonon plasma plymouth png policykit postproc ppds pulseaudio qml qt3support qt4 qt5 readline sdl seccomp semantic-desktop session spell ssl startup-notification svg systemd tcpd threads tiff truetype udev udisks unicode upower usb vdpau vim-syntax vorbis widgets wxwidgets x264 xattr xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="64 32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" L10N="en en_US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="intel i965 nvidia nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS |
Haven't been able to lock my session in any way since updating plasma. I'm using systemd in case you couldn't tell from the emerge --info above.
EDIT:
re-emergning kscreensaver with USE="-seccomp" fixes the issue in my case, disabling DRI3 via environment variable does not. _________________ Life without passion is death in disguise
Last edited by KShots on Sun Sep 03, 2017 10:52 pm; edited 1 time in total |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8933
|
|
Back to top |
|
|
KShots Guru
Joined: 09 Oct 2003 Posts: 591 Location: Florida
|
Posted: Sun Sep 03, 2017 11:00 pm Post subject: |
|
|
Yep, confirmed - updating to kscreenlocker-5.10.5.1 works with seccomp enabled and with the above version of nvidia-drivers. Thanks! _________________ Life without passion is death in disguise |
|
Back to top |
|
|
mrsteven Veteran
Joined: 04 Jul 2003 Posts: 1938
|
Posted: Thu Sep 14, 2017 10:09 pm Post subject: |
|
|
Updating to =kde-plasma/kscreenlocker-5.10.5.1 does not help here (Intel modesetting with DRI3). Setting USE=-seccomp still works. _________________ Unix philosophy: "Do one thing and do it well."
systemd: "Do everything and do it wrong." |
|
Back to top |
|
|
freifunk_connewitz Apprentice
Joined: 08 Feb 2006 Posts: 231
|
Posted: Wed Sep 20, 2017 1:56 pm Post subject: |
|
|
mrsteven wrote: | Updating to =kde-plasma/kscreenlocker-5.10.5.1 does not help here (Intel modesetting with DRI3). Setting USE=-seccomp still works. |
I confirm DRI3+seccomp breaks kscreenlocking also for 5.10.5.1, removing either condition helps.
EDIT: But not on Intel but ATI/Radeon. |
|
Back to top |
|
|
|