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

(SOLVED)Annoying lag when opening some KDE applications

Tags: None
(comma "," separated)
User avatar
šumski
Registered Member
Posts
106
Karma
1
OS
OK, this is one terribly annoying issue.
Every time when i open dolphin and some other KDE apps (ie. gwenview) there's a lag - mouse movement is really slow - apps is taking a 2 - 7 seconds (it varies) to open and the whole workspace is frozen (no activity is shown in CPU usage plasmoid). This , for example, doesn't happen with konqueror, konsole, showphoto, systemsettings, etc.

Tried:
removing /var/tmp/$USER-cache , and &KDEHOME/cache-*
kbuildsycoca4 --noincremental
disabling/enabling compositing
disabling/enabling thumbnails
disabling/enabling various panels
clean config - new user
root user
disabling/enabling kdebugdialog
disabling/enabling nepomuk
removing $HOME.local/share/user-places.xbel

Note that this also happened on my Arch installation, but only with dolphin , and in much smaller scale, but did NOT happen on my Kubuntu 11.04 and Kubuntu 11.10 installations.

EDIT:
I'm using KDE 4.7.2 on openSUSE 12.1

Konsole output:

Code: Select all
 dolphin
dolphin(6072)/kio (KDirWatch) KDirWatchPrivate::KDirWatchPrivate: Can't use FAM (fam daemon not running?)
dolphin(6072)/kio (KDirWatch) KDirWatchPrivate::addEntry: Added File "/home/hrvoje/.local/share/user-places.xbel" for "" ["KDirWatch-1"]
dolphin(6072)/kio (bookmarks) KBookmarkManager::KBookmarkManager: starting KDirWatch for  "/home/hrvoje/.local/share/user-places.xbel"
dolphin(6072)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from "/var/tmp/kdecache-hrvoje/ksycoca4"
dolphin(6072)/kio (KDirListerCache) KDirListerCache::listDir: Listing directory: KUrl("trash:/")
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x8d72e0)
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::protoQ: creating ProtoQueue instance for "trash"
dolphin(6072)/kio (Scheduler) KIO::ProtoQueue::ProtoQueue: m_maxConnectionsTotal: 2 m_maxConnectionsPerHost: 2
dolphin(6072)/kio (KDirListerCache) KDirListerCache::listDir: Listing directory: KUrl("file:///home/hrvoje")
dolphin(6072)/kio (KDirWatch) KDirWatchPrivate::addEntry: Added Dir "/home/hrvoje" for "" ["KDirWatch-2"]
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x8ef0a0)
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::protoQ: creating ProtoQueue instance for "file"
dolphin(6072)/kio (Scheduler) KIO::ProtoQueue::ProtoQueue: m_maxConnectionsTotal: 5 m_maxConnectionsPerHost: 5
dolphin(6072)/kdeui (KMainWindow) KMainWindow::applyMainWindowSettings: KMainWindow::applyMainWindowSettings  "MainWindow"
dolphin(6072)/kdecore (K*TimeZone*) KSystemTimeZonesPrivate::instance: instance(): ... initialised
dolphin(6072)/kdecore (K*TimeZone*) KSystemTimeZonesPrivate::readConfig: readConfig(): local zone= "Europe/Belgrade"
dolphin(6072)/kdecore (K*TimeZone*) KSystemTimeZonesPrivate::readZoneTab: readZoneTab( "/usr/share/zoneinfo/zone.tab" )
dolphin(6072)/kio (KDirListerCache) KDirListerCache::listDir: Entry currently being listed: KUrl("trash:/") by (KDirLister(0x8a1fd0) )
dolphin(6072)/kio (KDirListerCache) KDirListerCache::stopListingUrl: KDirLister(0xaf18c0)  url= KUrl("trash:/")
dolphin(6072)/kio (Slave) KIO::Slave::createSlave: createSlave "trash" for KUrl("trash:/")
dolphin(6072)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-hrvoje/dolphinyJ6072.slave-socket"
dolphin(6072)/kio (Slave) KIO::Slave::createSlave: createSlave "file" for KUrl("file:///home/hrvoje")
dolphin(6072)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-hrvoje/dolphinXF6072.slave-socket"
dolphin(6072)/kio (KDirWatch) KDirWatchPrivate::addEntry: Added Dir "/var/lib/samba/usershares" for "" ["KDirWatch-2"]
dolphin(6072)/kio (KDirWatch) KDirWatchPrivate::addEntry: Added File "/etc/exports" for "" ["KDirWatch-2"]
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::ListJob(0x8ef0a0) KIO::Slave(0x865210)
dolphin(6072)/kio (KDirListerCache) KDirListerCache::slotResult: finished listing KUrl("file:///home/hrvoje")
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xc6e640)
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::ListJob(0x8d72e0) KIO::Slave(0x8f2e90)
dolphin(6072)/kio (KDirListerCache) KDirListerCache::slotResult: finished listing KUrl("trash:/")
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0xc6e640) KIO::Slave(0x865210)
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x82b090)
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::protoQ: creating ProtoQueue instance for "thumbnail"
dolphin(6072)/kio (Scheduler) KIO::ProtoQueue::ProtoQueue: m_maxConnectionsTotal: 1 m_maxConnectionsPerHost: 1
dolphin(6072)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-hrvoje/dolphinKP6072.slave-socket"
dolphin(6072)/kio (Slave) KIO::Slave::createSlave: createSlave "thumbnail" for KUrl("thumbnail:/home/hrvoje/Public")
dolphin(6072)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-hrvoje/dolphinab6072.slave-socket"
dolphin(6072)/kio (KIOJob) KIO::SlaveInterface::dispatch: error  104   "Cannot create thumbnail for directory"
dolphin(6072)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("thumbnail:/home/hrvoje/Public")
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0x82b090) KIO::Slave(0x867f70)
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xc6e670)
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0xc6e670) KIO::Slave(0x865210)
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xb5a4b0)
dolphin(6072)/kio (KIOJob) KIO::SlaveInterface::dispatch: error  104   "Cannot create thumbnail for directory"
dolphin(6072)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("thumbnail:/home/hrvoje/paketi")
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0xb5a4b0) KIO::Slave(0x867f70)
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xc6e700)
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0xc6e700) KIO::Slave(0x865210)
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x82bed0)
dolphin(6072)/kio (KIOJob) KIO::SlaveInterface::dispatch: error  104   "Cannot create thumbnail for directory"
dolphin(6072)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("thumbnail:/home/hrvoje/qBT_dir")
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0x82bed0) KIO::Slave(0x867f70)
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xc6ecb0)
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0xc6ecb0) KIO::Slave(0x865210)
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xc6e670)
dolphin(6072)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("thumbnail:/home/hrvoje/Documents")
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0xc6e670) KIO::Slave(0x867f70)
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xc6ed40)
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0xc6ed40) KIO::Slave(0x865210)
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x8b3eb0)
dolphin(6072)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
dolphin(6072)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
dolphin(6072)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
dolphin(6072)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
dolphin(6072)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
dolphin(6072)/kio (KDirListerCache) KDirListerCache::stopListingUrl: KDirLister(0x8fd3b0)  url= KUrl("file:///home/hrvoje")
dolphin(6072)/kio (KDirListerCache) KDirListerCache::forgetDirs: KDirLister(0x8fd3b0)  item moved into cache:  KUrl("file:///home/hrvoje")
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::cancelJob: KIO::TransferJob(0x8b3eb0) KIO::Slave(0x867f70)
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::cancelJob: Scheduler: killing slave  6084
dolphin(6072)/kio (Slave) KIO::Slave::kill: killing slave pid 6084 ( "thumbnail://" )
dolphin(6072)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0x8b3eb0) KIO::Slave(0x867f70)
dolphin(6072)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 20 (X_GetProperty)
  Resource id:  0x5000014
dolphin(6072)/kio (Slave) KIO::Slave::kill: killing slave pid 6078 ( "trash://" )
dolphin(6072)/kio (Slave) KIO::Slave::kill: killing slave pid 6079 ( "file://" )


gwenview:
Code: Select all
gwenview
gwenview(6105)/kio (KDirWatch) KDirWatchPrivate::KDirWatchPrivate: Can't use FAM (fam daemon not running?)
"/usr/bin/gwenview(6105)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files"
gwenview(6105)/nepomuk (library) {anonymous}::GlobalModelContainer::init: Connecting to local socket "/tmp/ksocket-hrvoje/nepomuk-socket"
"/usr/bin/gwenview(6105)" Soprano: "QLocalSocket::connectToServer: Invalid name"
gwenview(6105)/nepomuk (library) {anonymous}::GlobalModelContainer::init: Failed to connect to Nepomuk server via local socket "/tmp/ksocket-hrvoje/nepomuk-socket"
"/usr/bin/gwenview(6105)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files"
gwenview(6105)/nepomuk (library) {anonymous}::GlobalModelContainer::init: Connecting to local socket "/tmp/ksocket-hrvoje/nepomuk-socket"
"/usr/bin/gwenview(6105)" Soprano: "QLocalSocket::connectToServer: Invalid name"
gwenview(6105)/nepomuk (library) {anonymous}::GlobalModelContainer::init: Failed to connect to Nepomuk server via local socket "/tmp/ksocket-hrvoje/nepomuk-socket"
"/usr/bin/gwenview(6105)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files"
gwenview(6105)/nepomuk (library) {anonymous}::GlobalModelContainer::init: Connecting to local socket "/tmp/ksocket-hrvoje/nepomuk-socket"
"/usr/bin/gwenview(6105)" Soprano: "QLocalSocket::connectToServer: Invalid name"
gwenview(6105)/nepomuk (library) {anonymous}::GlobalModelContainer::init: Failed to connect to Nepomuk server via local socket "/tmp/ksocket-hrvoje/nepomuk-socket"
gwenview(6105)/kio (KDirWatch) KDirWatchPrivate::addEntry: Added File "/home/hrvoje/.local/share/user-places.xbel" for "" ["KDirWatch-2"]
gwenview(6105)/kio (bookmarks) KBookmarkManager::KBookmarkManager: starting KDirWatch for  "/home/hrvoje/.local/share/user-places.xbel"
gwenview(6105)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from "/var/tmp/kdecache-hrvoje/ksycoca4"
gwenview(6105)/kio (KDirListerCache) KDirListerCache::listDir: Listing directory: KUrl("trash:/")
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x948140)
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::protoQ: creating ProtoQueue instance for "trash"
gwenview(6105)/kio (Scheduler) KIO::ProtoQueue::ProtoQueue: m_maxConnectionsTotal: 2 m_maxConnectionsPerHost: 2
gwenview(6105)/kdecore (KLocale) KuitSemanticsPrivate::formatFromContextMarker: "Unknown semantic role '@addaction' in context marker for message {Name}."
gwenview(6105)/kdecore (KLocale) KuitSemanticsPrivate::formatFromContextMarker: "Unknown semantic role '@addaction' in context marker for message {Date}."
gwenview(6105)/kdecore (KLocale) KuitSemanticsPrivate::formatFromContextMarker: "Unknown semantic role '@addaction' in context marker for message {Size}."
"/usr/bin/gwenview(6105)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files"
gwenview(6105)/nepomuk (library) {anonymous}::GlobalModelContainer::init: Connecting to local socket "/tmp/ksocket-hrvoje/nepomuk-socket"
"/usr/bin/gwenview(6105)" Soprano: "QLocalSocket::connectToServer: Invalid name"
gwenview(6105)/nepomuk (library) {anonymous}::GlobalModelContainer::init: Failed to connect to Nepomuk server via local socket "/tmp/ksocket-hrvoje/nepomuk-socket"

it goes to here without a lag , and then it stops for a few seconds and then continues:

Code: Select all
gwenview(6105)/kio (KDirListerCache) KDirListerCache::listDir: Entry currently being listed: KUrl("trash:/") by (KDirLister(0x955dc0) )
"/usr/bin/gwenview(6105)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files"
gwenview(6105)/nepomuk (library) {anonymous}::GlobalModelContainer::init: Connecting to local socket "/tmp/ksocket-hrvoje/nepomuk-socket"
"/usr/bin/gwenview(6105)" Soprano: "QLocalSocket::connectToServer: Invalid name"
gwenview(6105)/nepomuk (library) {anonymous}::GlobalModelContainer::init: Failed to connect to Nepomuk server via local socket "/tmp/ksocket-hrvoje/nepomuk-socket"
gwenview(6105)/kdeui (kdelibs): Attempt to use QAction "edit_redo" with KXMLGUIFactory!
gwenview(6105)/kdeui (kdelibs): Attempt to use QAction "edit_undo" with KXMLGUIFactory!
gwenview(6105)/kdeui (KMainWindow) KMainWindow::applyMainWindowSettings: KMainWindow::applyMainWindowSettings  "MainWindow"
gwenview(6105)/kdecore (K*TimeZone*) KSystemTimeZonesPrivate::instance: instance(): ... initialised
gwenview(6105)/kdecore (K*TimeZone*) KSystemTimeZonesPrivate::readConfig: readConfig(): local zone= "Europe/Belgrade"
gwenview(6105)/kdecore (K*TimeZone*) KSystemTimeZonesPrivate::readZoneTab: readZoneTab( "/usr/share/zoneinfo/zone.tab" )
"/usr/bin/gwenview(6105)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files"
gwenview(6105)/nepomuk (library) {anonymous}::GlobalModelContainer::init: Connecting to local socket "/tmp/ksocket-hrvoje/nepomuk-socket"
"/usr/bin/gwenview(6105)" Soprano: "QLocalSocket::connectToServer: Invalid name"
gwenview(6105)/nepomuk (library) {anonymous}::GlobalModelContainer::init: Failed to connect to Nepomuk server via local socket "/tmp/ksocket-hrvoje/nepomuk-socket"
gwenview(6105)/kio (KDirListerCache) KDirListerCache::listDir: Entry currently being listed: KUrl("trash:/") by (KDirLister(0x955dc0) ,  KDirLister(0xbc3070) )
gwenview(6105)/kio (KDirListerCache) KDirListerCache::stopListingUrl: KDirLister(0xdf5140)  url= KUrl("trash:/")
gwenview(6105)/kio (KDirListerCache) KDirListerCache::listDir: Entry currently being listed: KUrl("trash:/") by (KDirLister(0x955dc0) ,  KDirLister(0xbc3070) )
gwenview(6105)/kio (KDirListerCache) KDirListerCache::stopListingUrl: KDirLister(0xbb9b70)  url= KUrl("trash:/")
gwenview(6105)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("")
gwenview(6105)/kio (Slave) KIO::Slave::createSlave: createSlave "trash" for KUrl("trash:/")
gwenview(6105)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-hrvoje/gwenviewwX6105.slave-socket"
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::ListJob(0x948140) KIO::Slave(0x951d10)
gwenview(6105)/kio (KDirListerCache) KDirListerCache::slotResult: finished listing KUrl("trash:/")
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xa54b40)
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::protoQ: creating ProtoQueue instance for "file"
gwenview(6105)/kio (Scheduler) KIO::ProtoQueue::ProtoQueue: m_maxConnectionsTotal: 5 m_maxConnectionsPerHost: 5
gwenview(6105)/kio (Slave) KIO::Slave::createSlave: createSlave "file" for KUrl("file:///home/hrvoje/Pictures")
gwenview(6105)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-hrvoje/gwenviewZK6105.slave-socket"
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0xa54b40) KIO::Slave(0xe04610)
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xc1c130)
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::protoQ: creating ProtoQueue instance for "thumbnail"
gwenview(6105)/kio (Scheduler) KIO::ProtoQueue::ProtoQueue: m_maxConnectionsTotal: 1 m_maxConnectionsPerHost: 1
gwenview(6105)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-hrvoje/gwenviewEa6105.slave-socket"
gwenview(6105)/kio (Slave) KIO::Slave::createSlave: createSlave "thumbnail" for KUrl("thumbnail:/home/hrvoje/Pictures")
gwenview(6105)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-hrvoje/gwenviewqq6105.slave-socket"
gwenview(6105)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("thumbnail:/home/hrvoje/Pictures")
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0xc1c130) KIO::Slave(0x9b8200)
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x8d1060)
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0x8d1060) KIO::Slave(0xe04610)
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xdda850)
gwenview(6105)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("thumbnail:/home/hrvoje/Desktop/Pictures")
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0xdda850) KIO::Slave(0x9b8200)
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x8d9f20)
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0x8d9f20) KIO::Slave(0xe04610)
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xdd9380)
gwenview(6105)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("thumbnail:/home/hrvoje/Downloads")
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0xdd9380) KIO::Slave(0x9b8200)
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x7e9ff0)
gwenview(6105)/kio (KIOJob) KIO::SlaveInterface::dispatch: error  111   "/tmp/kde-hrvoje/kmail2IA4408.index.1.2"
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0x7e9ff0) KIO::Slave(0xe04610)
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x95ddc0)
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0x95ddc0) KIO::Slave(0xe04610)
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x98e5e0)
gwenview(6105)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("thumbnail:/home/hrvoje/Desktop/Documents")
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0x98e5e0) KIO::Slave(0x9b8200)
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x9a6240)
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0x9a6240) KIO::Slave(0xe04610)
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xa09720)
gwenview(6105)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("thumbnail:/usr/share/wallpapers/openSUSEdefault/contents/images")
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0xa09720) KIO::Slave(0x9b8200)
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xb732b0)
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0xb732b0) KIO::Slave(0xe04610)
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xdbdc90)
gwenview(6105)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("thumbnail:/home/hrvoje/Documents")
gwenview(6105)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0xdbdc90) KIO::Slave(0x9b8200)
gwenview(6105) Gwenview::MainWindow::Private::sideBarConfigGroupName: Should not happen!
gwenview(6105)/kio (KDirListerCache) KDirListerCache::stopListingUrl: KDirLister(0x955dc0)  url= KUrl("trash:/")
gwenview(6105)/kio (KDirListerCache) KDirListerCache::stopListingUrl: KDirLister(0xbc3070)  url= KUrl("trash:/")
gwenview(6105)/kio (KDirListerCache) KDirListerCache::forgetDirs: KDirLister(0xbc3070)  item moved into cache:  KUrl("trash:/")
gwenview(6105)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
gwenview(6105)/kio (Slave) KIO::Slave::kill: killing slave pid 6404 ( "trash://" )
gwenview(6105)/kio (Slave) KIO::Slave::kill: killing slave pid 6407 ( "thumbnail://" )
gwenview(6105)/kio (Slave) KIO::Slave::kill: killing slave pid 6406 ( "file://" )


gwenview with nepomuk running:
Code: Select all
gwenview
gwenview(7081)/kio (KDirWatch) KDirWatchPrivate::KDirWatchPrivate: Can't use FAM (fam daemon not running?)
gwenview(7081)/nepomuk (library) {anonymous}::GlobalModelContainer::init: Connecting to local socket "/tmp/ksocket-hrvoje/nepomuk-socket"
gwenview(7081)/kio (KDirWatch) KDirWatchPrivate::addEntry: Added File "/home/hrvoje/.local/share/user-places.xbel" for "" ["KDirWatch-2"]
gwenview(7081)/kio (bookmarks) KBookmarkManager::KBookmarkManager: starting KDirWatch for  "/home/hrvoje/.local/share/user-places.xbel"
gwenview(7081)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from "/var/tmp/kdecache-hrvoje/ksycoca4"
gwenview(7081)/kio (KDirListerCache) KDirListerCache::listDir: Listing directory: KUrl("trash:/")
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x958820)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::protoQ: creating ProtoQueue instance for "trash"
gwenview(7081)/kio (Scheduler) KIO::ProtoQueue::ProtoQueue: m_maxConnectionsTotal: 2 m_maxConnectionsPerHost: 2
gwenview(7081)/kdecore (KLocale) KuitSemanticsPrivate::formatFromContextMarker: "Unknown semantic role '@addaction' in context marker for message {Name}."
gwenview(7081)/kdecore (KLocale) KuitSemanticsPrivate::formatFromContextMarker: "Unknown semantic role '@addaction' in context marker for message {Date}."
gwenview(7081)/kdecore (KLocale) KuitSemanticsPrivate::formatFromContextMarker: "Unknown semantic role '@addaction' in context marker for message {Size}."


here starts the lag, and here it continues to load:

Code: Select all
gwenview(7081)/kio (KDirListerCache) KDirListerCache::listDir: Entry currently being listed: KUrl("trash:/") by (KDirLister(0x9541f0) )
gwenview(7081)/kdeui (kdelibs): Attempt to use QAction "edit_redo" with KXMLGUIFactory!
gwenview(7081)/kdeui (kdelibs): Attempt to use QAction "edit_undo" with KXMLGUIFactory!
gwenview(7081)/kdeui (KMainWindow) KMainWindow::applyMainWindowSettings: KMainWindow::applyMainWindowSettings  "MainWindow"
gwenview(7081)/kdecore (K*TimeZone*) KSystemTimeZonesPrivate::instance: instance(): ... initialised
gwenview(7081)/kdecore (K*TimeZone*) KSystemTimeZonesPrivate::readConfig: readConfig(): local zone= "Europe/Belgrade"
gwenview(7081)/kdecore (K*TimeZone*) KSystemTimeZonesPrivate::readZoneTab: readZoneTab( "/usr/share/zoneinfo/zone.tab" )
gwenview(7081)/kio (KDirListerCache) KDirListerCache::listDir: Entry currently being listed: KUrl("trash:/") by (KDirLister(0x9541f0) ,  KDirLister(0xbcd260) )
gwenview(7081)/kio (KDirListerCache) KDirListerCache::stopListingUrl: KDirLister(0xdf7920)  url= KUrl("trash:/")
gwenview(7081)/kio (KDirListerCache) KDirListerCache::listDir: Entry currently being listed: KUrl("trash:/") by (KDirLister(0x9541f0) ,  KDirLister(0xbcd260) )
gwenview(7081)/kio (KDirListerCache) KDirListerCache::stopListingUrl: KDirLister(0xbc4400)  url= KUrl("trash:/")
gwenview(7081)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("")
gwenview(7081)/kio (Slave) KIO::Slave::createSlave: createSlave "trash" for KUrl("trash:/")
gwenview(7081)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-hrvoje/gwenviewXF7081.slave-socket"
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::ListJob(0x958820) KIO::Slave(0x980570)
gwenview(7081)/kio (KDirListerCache) KDirListerCache::slotResult: finished listing KUrl("trash:/")
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x9aed10)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0x9aed10) KIO::Slave(0x980570)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x9afaa0)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0x9afaa0) KIO::Slave(0x980570)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xe343b0)
gwenview(7081)/kio (KIOJob) KIO::SlaveInterface::dispatch: error  163   "Malformed URL trash:/"
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::DirectCopyJob(0xe343b0) KIO::Slave(0x980570)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xa74860)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::protoQ: creating ProtoQueue instance for "file"
gwenview(7081)/kio (Scheduler) KIO::ProtoQueue::ProtoQueue: m_maxConnectionsTotal: 5 m_maxConnectionsPerHost: 5
gwenview(7081)/kio (Slave) KIO::Slave::createSlave: createSlave "file" for KUrl("file:///home/hrvoje/Pictures")
gwenview(7081)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-hrvoje/gwenviewab7081.slave-socket"
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0xa74860) KIO::Slave(0xe29390)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xd34d20)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::protoQ: creating ProtoQueue instance for "thumbnail"
gwenview(7081)/kio (Scheduler) KIO::ProtoQueue::ProtoQueue: m_maxConnectionsTotal: 1 m_maxConnectionsPerHost: 1
gwenview(7081)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-hrvoje/gwenviewVE7081.slave-socket"
gwenview(7081)/kio (Slave) KIO::Slave::createSlave: createSlave "thumbnail" for KUrl("thumbnail:/home/hrvoje/Pictures")
gwenview(7081)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-hrvoje/gwenviewqq7081.slave-socket"
gwenview(7081)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("thumbnail:/home/hrvoje/Pictures")
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0xd34d20) KIO::Slave(0xbb8020)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xe29bd0)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0xe29bd0) KIO::Slave(0xe29390)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xaaed90)
gwenview(7081)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("thumbnail:/home/hrvoje/Desktop/Pictures")
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0xaaed90) KIO::Slave(0xbb8020)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xa052f0)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0xa052f0) KIO::Slave(0xe29390)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xa52ae0)
gwenview(7081)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("thumbnail:/home/hrvoje/Downloads")
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0xa52ae0) KIO::Slave(0xbb8020)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x98d600)
gwenview(7081)/kio (KIOJob) KIO::SlaveInterface::dispatch: error  111   "/tmp/kde-hrvoje/kmail2IA4408.index.1.2"
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0x98d600) KIO::Slave(0xe29390)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x893930)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0x893930) KIO::Slave(0xe29390)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xcdf3c0)
gwenview(7081)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("thumbnail:/home/hrvoje/Desktop/Documents")
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0xcdf3c0) KIO::Slave(0xbb8020)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xcc0d40)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0xcc0d40) KIO::Slave(0xe29390)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x90e360)
gwenview(7081)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("thumbnail:/usr/share/wallpapers/openSUSEdefault/contents/images")
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0x90e360) KIO::Slave(0xbb8020)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x95ac10)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0x95ac10) KIO::Slave(0xe29390)
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xd356a0)
gwenview(7081)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("thumbnail:/home/hrvoje/Documents")
gwenview(7081)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0xd356a0) KIO::Slave(0xbb8020)
gwenview(7081) Gwenview::MainWindow::Private::sideBarConfigGroupName: Should not happen!
gwenview(7081)/kio (KDirListerCache) KDirListerCache::stopListingUrl: KDirLister(0x9541f0)  url= KUrl("trash:/")
gwenview(7081)/kio (KDirListerCache) KDirListerCache::stopListingUrl: KDirLister(0xbcd260)  url= KUrl("trash:/")
gwenview(7081)/kio (KDirListerCache) KDirListerCache::forgetDirs: KDirLister(0xbcd260)  item moved into cache:  KUrl("trash:/")
gwenview(7081)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
gwenview(7081)/kio (Slave) KIO::Slave::kill: killing slave pid 7284 ( "trash://" )
gwenview(7081)/kio (Slave) KIO::Slave::kill: killing slave pid 7287 ( "thumbnail://" )
gwenview(7081)/kio (Slave) KIO::Slave::kill: killing slave pid 7286 ( "file://" )

Last edited by šumski on Sun Oct 23, 2011 12:20 pm, edited 1 time in total.
User avatar
šumski
Registered Member
Posts
106
Karma
1
OS
Same thing in Icewm session
User avatar
google01103
Manager
Posts
6668
Karma
25
is the folder that opens when these apps start have a very large number of entries?

if you create a new users does it experience the lag?


OpenSuse Leap 42.1 x64, Plasma 5.x

User avatar
šumski
Registered Member
Posts
106
Karma
1
OS
Yes, this also happens with new and root users.

For gwenview i provided no arguments (the lag is also present when opening specific file) , and dolphin opens $HOME:

Code: Select all
ls -A
.acetoneiso   
.dbus
Games               
.local               
.pulse                     
Videos
.adobe         
Desktop       
.gconf             
.macromedia           
.pulse-cookie             
.VirtualBox
.aptitude     
.directory     
.gnome2             
.mozilla             
qBT_dir                   
.windows-serial
arch_chroot   
.dmrc         
.gnupg             
.mplayer             
.recently-used             
.wine
backup         
Documents     
.gstreamer-0.10     
Music                 
.rpmdb                     
.Xauthority
.bash_history 
Downloads     
.gtkrc-2.0-kde4     
.nano                 
.selected_editor           
.Xdefaults
.bash_logout   
.dropbox       
.gvfs               
.nanorc               
.skel                     
.xine
.bashrc       
Dropbox       
.htoprc             
.opera               
.smolt                     
.xinput.d
.bazaar       
.dropbox-dist 
.ICEauthority       
.opera-next           
Src                       
.Xresources
.bzr.log       
.e             
.icons             
paketi               
.ssh                       
.xsession-errors
.cache         
.emacs.d       
.imageshack_upload 
.phoronix-test-suite 
.strigi                   
.zcompdump
.config       
.esd_auth     
.jdownloader       
Pictures             
.subversion               
.zsh_history
.conkycolors   
.face.icon     
.kAwOkenrc         
.pki                 
.sudo_as_admin_successful 
.zshrc
.conkyrc       
.fontconfig   
.kde4               
.profile             
.teamviewer               
.zshrc~
.conkyrc~     
.fonts         
.kderc             
.project-neon-kde     
Templates                 
.zshrc.save
.conkyrc.bak   
.fonts.conf   
.libreoffice       
Public               
.thumbnails
User avatar
šumski
Registered Member
Posts
106
Karma
1
OS
removed fglrx - issue no longer appears. Why??
You would like to use open drivers, but powersaving and HDMI doesn't work good for me , so i'm stuck with catalyst (for now)
User avatar
šumski
Registered Member
Posts
106
Karma
1
OS
OK - tried downgrading xserver to 1.9.3 from opensuse 11.4 repo - and it works great (using catalyst drivers)
User avatar
šumski
Registered Member
Posts
106
Karma
1
OS
This issue has come to haunt me again. I have upgraded to openSuSE 12.2, and i don't want to run xserver compiled against library stack that is ~1.5 years old. I have tried to recompile 1.9.5 in 12.2, successfully but with much hurdles :)
This has solved this lagging issue, but introduced other freezes (related to xf86-input-synaptics). I have found some fixes and backported to 1.9.5 but freezing was not stoped. Finally i decided to:
a) Try vanilla xserver, without SuSE patches
b) Import Ubuntu patches to this vanilla setup

With vanilla xserver, lagging was also present, so that lead me to try with b) and eliminate patches one by one, until i find the one responsible for a fix. (This is also rather cumbersome, cause ubuntu patches rather lack descriptions, and judging by content there wasn't anything obvious.)
So i applied all the patches. Issue was gone - yay!!! :D
However, i got a small problem with my keyboard layout - it wouldn't change from english (only in X)!
So, i took a look which patch touches keyboard configuration - it was 190_cache-xkbcomp_output_for_fast_start_up.patch
Code: Select all
 diff --git a/configure.ac b/configure.ac
index 2693ce7..6665c10 100644
--- a/configure.ac
+++ b/configure.ac
@@ -515,9 +515,9 @@ AC_MSG_RESULT([$FONTPATH])
 AC_ARG_WITH(xkb-path,         AS_HELP_STRING([--with-xkb-path=PATH], [Path to XKB base dir (default: ${datadir}/X11/xkb)]),
             [ XKBPATH="$withval" ],
             [ XKBPATH="${datadir}/X11/xkb" ])
-AC_ARG_WITH(xkb-output,       AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${datadir}/X11/xkb/compiled)]),
+AC_ARG_WITH(xkb-output,       AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${localstatedir}/cache/xkb)]),
             [ XKBOUTPUT="$withval" ],
-            [ XKBOUTPUT="compiled" ])
+            [ XKBOUTPUT="${localstatedir}/cache/xkb" ])
 AC_ARG_WITH(default-xkb-rules, AS_HELP_STRING([--with-default-xkb-rules=RULES],
                                    [Keyboard ruleset (default: base/evdev)]),
                                 [ XKB_DFLT_RULES="$withval" ],
@@ -1204,7 +1204,7 @@ AC_DEFINE_DIR(XKB_BIN_DIRECTORY, XKB_BIN_DIRECTORY, [Path to XKB bin dir])
 dnl Make sure XKM_OUTPUT_DIR is an absolute path
 XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1`
 if [[ x$XKBOUTPUT_FIRSTCHAR != x/ -a x$XKBOUTPUT_FIRSTCHAR != 'x$' ]] ; then
-   XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT"
+   AC_MSG_ERROR([xkb-output must be an absolute path.])
 fi
 
 dnl XKM_OUTPUT_DIR (used in code) must end in / or file names get hosed
diff --git a/xkb/README.compiled b/xkb/README.compiled
index 71caa2f..a4a2ae0 100644
--- a/xkb/README.compiled
+++ b/xkb/README.compiled
@@ -4,10 +4,10 @@ current keymap and/or any scratch keymaps used by clients.  The X server
 or some other tool might destroy or replace the files in this directory,
 so it is not a safe place to store compiled keymaps for long periods of
 time.  The default keymap for any server is usually stored in:
-     X<num>-default.xkm
-where <num> is the display number of the server in question, which makes
-it possible for several servers *on the same host* to share the same
-directory.
+     server-<SHA1>.xkm
+
+where <SHA1> is the SHA1 hash of keymap source, so that compiled
+keymap of different keymap sources are stored in different files.
 
 Unless the X server is modified, sharing this directory between servers on
 different hosts could cause problems.
diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
index cb2dfc3..e531540 100644
--- a/xkb/ddxLoad.c
+++ b/xkb/ddxLoad.c
@@ -30,6 +30,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 #include <xkb-config.h>
 
+#ifdef HAVE_SHA1_IN_LIBGCRYPT   /* Use libgcrypt for SHA1 */
+#include <gcrypt.h>
+#else                           /* Use OpenSSL's libcrypto */
+#warning "xkbcomp caching support disabled"
+#endif
+
 #include <stdio.h>
 #include <ctype.h>
 #include <X11/X.h>
@@ -43,20 +49,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #define   XKBSRV_NEED_FILE_FUNCS
 #include <xkbsrv.h>
 #include <X11/extensions/XI.h>
+#include <errno.h>
 #include "xkb.h"
 
-        /*
-         * If XKM_OUTPUT_DIR specifies a path without a leading slash, it is
-         * relative to the top-level XKB configuration directory.
-         * Making the server write to a subdirectory of that directory
-         * requires some work in the general case (install procedure
-         * has to create links to /var or somesuch on many machines),
-         * so we just compile into /usr/tmp for now.
-         */
-#ifndef XKM_OUTPUT_DIR
-#define   XKM_OUTPUT_DIR   "compiled/"
-#endif
-
 #define   PRE_ERROR_MSG "\"The XKEYBOARD keymap compiler (xkbcomp) reports:\""
 #define   ERROR_PREFIX   "\"> \""
 #define   POST_ERROR_MSG1 "\"Errors from xkbcomp are not fatal to the X server\""
@@ -165,6 +160,47 @@ OutputDirectory(char *outdir, size_t size)
     }
 }
 
+#ifndef SHA_DIGEST_LENGTH
+#define SHA_DIGEST_LENGTH 20
+#endif
+
+static Bool
+Sha1Asc(char sha1Asc[SHA_DIGEST_LENGTH * 2 + 1], const char *input)
+{
+    int i;
+    unsigned char sha1[SHA_DIGEST_LENGTH];
+
+#ifdef HAVE_SHA1_IN_LIBGCRYPT   /* Use libgcrypt for SHA1 */
+    static int init;
+    gcry_md_hd_t h;
+    gcry_error_t err;
+
+    if (!init) {
+        if (!gcry_check_version(NULL))
+            return BadAlloc;
+        gcry_control(GCRYCTL_DISABLE_SECMEM, 0);
+        gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0);
+        init = 1;
+    }
+
+    err = gcry_md_open(&h, GCRY_MD_SHA1, 0);
+    if (err)
+        return BadAlloc;
+    gcry_md_write(h, input, strlen(input));
+    memcpy(sha1, gcry_md_read(h, GCRY_MD_SHA1), 20);
+    gcry_md_close(h);
+#endif
+
+    /* convert sha1 to sha1_asc */
+    for (i = 0; i < SHA_DIGEST_LENGTH; ++i) {
+        sprintf(sha1Asc + i * 2, "%02X", sha1[i]);
+    }
+
+    return Success;
+}
+
+/* call xkbcomp and compile XKB keymap, return xkm file name in
+   nameRtrn */
 static Bool
 XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
                            XkbComponentNamesPtr names,
@@ -172,7 +208,11 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
                            unsigned need, char *nameRtrn, int nameRtrnLen)
 {
     FILE *out;
-    char *buf = NULL, keymap[PATH_MAX], xkm_output_dir[PATH_MAX];
+    char *buf = NULL, xkmfile[PATH_MAX], xkm_output_dir[PATH_MAX];
+    char *tmpXkmFile = NULL;
+    char *canonicalXkmFileName = NULL;
+    char sha1Asc[SHA_DIGEST_LENGTH * 2 + 1], xkbKeyMapBuf[100 * 1024];
+    int ret, result;
 
     const char *emptystring = "";
     char *xkbbasedirflag = NULL;
@@ -183,14 +223,68 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
     /* WIN32 has no popen. The input must be stored in a file which is
        used as input for xkbcomp. xkbcomp does not read from stdin. */
     char tmpname[PATH_MAX];
-    const char *xkmfile = tmpname;
+    const char *xkbfile = tmpname;
 #else
-    const char *xkmfile = "-";
+    const char *xkbfile = "-";
 #endif
 
-    snprintf(keymap, sizeof(keymap), "server-%s", display);
+    /* Write keymap source (xkbfile) to memory buffer `xkbKeyMapBuf',
+       of which SHA1 is generated and used as result xkm file name  */
+    memset(xkbKeyMapBuf, 0, sizeof(xkbKeyMapBuf));
+    out = fmemopen(xkbKeyMapBuf, sizeof(xkbKeyMapBuf), "w");
+    if (NULL == out) {
+        ErrorF("[xkb] Open xkbKeyMapBuf for writing failed\n");
+        return FALSE;
+    }
+    ret = XkbWriteXKBKeymapForNames(out, names, xkb, want, need);
+    if (fclose(out) != 0) {
+        ErrorF
+            ("[xkb] XkbWriteXKBKeymapForNames error, perhaps xkbKeyMapBuf is too small\n");
+        return FALSE;
+    }
+#ifdef DEBUG
+    if (xkbDebugFlags) {
+        ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
+        fputs(xkbKeyMapBuf, stderr);
+    }
+#endif
+    if (!ret) {
+        ErrorF
+            ("[xkb] Generating XKB Keymap failed, giving up compiling keymap\n");
+        return FALSE;
+    }
+
+    DebugF("[xkb] computing SHA1 of keymap\n");
+    if (Success == Sha1Asc(sha1Asc, xkbKeyMapBuf)) {
+        snprintf(xkmfile, sizeof(xkmfile), "server-%s", sha1Asc);
+    }
+    else {
+        ErrorF("[xkb] Computing SHA1 of keymap failed, "
+               "using display name instead as xkm file name\n");
+        snprintf(xkmfile, sizeof(xkmfile), "server-%s", display);
+    }
 
     OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));
+    /* set nameRtrn, fail if it's too small */
+    if ((strlen(xkmfile) + 1 > nameRtrnLen) && nameRtrn) {
+        ErrorF("[xkb] nameRtrn too small to hold xkmfile name\n");
+        return FALSE;
+    }
+    strncpy(nameRtrn, xkmfile, nameRtrnLen);
+
+    /* if the xkm file already exists, reuse it */
+    canonicalXkmFileName = Xprintf("%s%s.xkm", xkm_output_dir, xkmfile);
+    if (access(canonicalXkmFileName, R_OK) == 0) {
+        /* yes, we can reuse the old xkm file */
+        LogMessage(X_INFO, "XKB: reuse xkmfile %s\n", canonicalXkmFileName);
+        result = TRUE;
+        goto _ret;
+    }
+    LogMessage(X_INFO, "XKB: generating xkmfile %s\n", canonicalXkmFileName);
+
+    /* continue to call xkbcomp to compile the keymap. to avoid race
+       condition, we compile it to a tmpfile then rename it to
+       xkmfile */
 
 #ifdef WIN32
     strcpy(tmpname, Win32TempDir());
@@ -214,15 +308,21 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
         }
     }
 
+    if ((tmpXkmFile = tempnam(xkm_output_dir, NULL)) == NULL) {
+        ErrorF("[xkb] Can't generate temp xkm file name");
+        result = FALSE;
+        goto _ret;
+    }
+
     if (asprintf(&buf,
                  "\"%s%sxkbcomp\" -w %d %s -xkm \"%s\" "
-                 "-em1 %s -emp %s -eml %s \"%s%s.xkm\"",
+                 "-em1 %s -emp %s -eml %s \"%s\"",
                  xkbbindir, xkbbindirsep,
                  ((xkbDebugFlags < 2) ? 1 :
                   ((xkbDebugFlags > 10) ? 10 : (int) xkbDebugFlags)),
-                 xkbbasedirflag ? xkbbasedirflag : "", xkmfile,
+                 xkbbasedirflag ? xkbbasedirflag : "", xkbfile,
                  PRE_ERROR_MSG, ERROR_PREFIX, POST_ERROR_MSG1,
-                 xkm_output_dir, keymap) == -1)
+                 tmpXkmFile) == -1)
         buf = NULL;
 
     free(xkbbasedirflag);
@@ -233,6 +333,11 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
         return FALSE;
     }
 
+    /* there's a potential race condition between calling tempnam()
+       and invoking xkbcomp to write the result file (potential temp
+       file name conflicts), but since xkbcomp is a standalone
+       program, we have to live with this */
+
 #ifndef WIN32
     out = Popen(buf, "w");
 #else
@@ -240,32 +345,43 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
 #endif
 
     if (out != NULL) {
-#ifdef DEBUG
-        if (xkbDebugFlags) {
-            ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
-            XkbWriteXKBKeymapForNames(stderr, names, xkb, want, need);
+        /* write XKBKeyMapBuf to xkbcomp */
+        if (EOF == fputs(xkbKeyMapBuf, out)) {
+            ErrorF("[xkb] Sending keymap to xkbcomp failed\n");
+            result = FALSE;
+            goto _ret;
         }
-#endif
-        XkbWriteXKBKeymapForNames(out, names, xkb, want, need);
 #ifndef WIN32
         if (Pclose(out) == 0)
 #else
         if (fclose(out) == 0 && System(buf) >= 0)
 #endif
         {
+            /* xkbcomp success */
             if (xkbDebugFlags)
                 DebugF("[xkb] xkb executes: %s\n", buf);
-            if (nameRtrn) {
-                strlcpy(nameRtrn, keymap, nameRtrnLen);
+
+            /* if canonicalXkmFileName already exists now, we simply
+               overwrite it, this is OK */
+            ret = rename(tmpXkmFile, canonicalXkmFileName);
+            if (0 != ret) {
+                ErrorF("[xkb] Can't rename %s to %s, error: %s\n",
+                       tmpXkmFile, canonicalXkmFileName, strerror(errno));
+
+                /* in case of error, don't unlink tmpXkmFile, leave i
+                   for debugging */
+
+                result = FALSE;
+                goto _ret;
             }
-            free(buf);
 #ifdef WIN32
             unlink(tmpname);
 #endif
-            return TRUE;
+            result = TRUE;
+            goto _ret;
         }
         else
-            LogMessage(X_ERROR, "Error compiling keymap (%s)\n", keymap);
+            LogMessage(X_ERROR, "Error compiling keymap (%s)\n", xkbfile);
 #ifdef WIN32
         /* remove the temporary file */
         unlink(tmpname);
@@ -280,8 +396,17 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
     }
     if (nameRtrn)
         nameRtrn[0] = '\0';
-    free(buf);
-    return FALSE;
+    result = FALSE;
+
+ _ret:
+    if (tmpXkmFile)
+        free(tmpXkmFile);
+    if (canonicalXkmFileName)
+        free(canonicalXkmFileName);
+    if (buf)
+        free(buf);
+
+    return result;
 }
 
 static FILE *
@@ -368,7 +493,6 @@ XkbDDXLoadKeymapByNames(DeviceIntPtr keybd,
                (*xkbRtrn)->defined);
     }
     fclose(file);
-    (void) unlink(fileName);
     return (need | want) & (~missing);
 }

Dropping this patch gave me my keyboard back, but introduced that lag again - i have found the guilty party! :)
So, if someone is also searching for a solution, here it is :)
User avatar
šumski
Registered Member
Posts
106
Karma
1
OS
Found almost the same patch in mageia xorg-server package, only without the first hunk, without it i have my layout back, but lag is back - this have now revealed the issue. Every time dolphin and gwenview start i get:
Code: Select all
(II) XKB: generating xkmfile /var/lib/xkb/compiled/server-5C7047CF742639AABDAFF8C0F67FE66288BCBFE7.xkm

Why is regenerating new xkmfile file needed with every start of those apps?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Does the directory /var/lib/xkb/compiled/ exist, and does your user have read/write permissions to it?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
šumski
Registered Member
Posts
106
Karma
1
OS
I'll need to check again, i have reverted to 'official' package.

Here are the relevant parts of SuSE's vs Ubuntu configuration

openSuSE's xorg-x11-spec:
Code: Select all
%configure CFLAGS="%{optflags} -fno-strict-aliasing" \
       --sysconfdir=/etc \
            --enable-builddocs \
            --enable-install-libxf86config \
            --enable-xdmcp \
            --enable-xdm-auth-1 \
            --enable-dri \
            --enable-dri2 \
            --enable-dmx \
            --enable-xnest \
            --enable-kdrive \
            --enable-kdrive-evdev \
            --enable-xephyr \
            --disable-xfake \
            --disable-xfbdev \
            --enable-record \
            --enable-xcsecurity \
            --with-sha1=libcrypto \
%ifarch s390 s390x
            --disable-xorg \
            --disable-aiglx \
%else
            --enable-xorg \
%if 0%{?suse_version} > 1120
       --enable-config-udev \
%endif
%endif
%if %vnc
            --disable-xcliplist \
%endif
            --with-log-dir="/var/log" \
            --with-os-name="openSUSE" \
            --with-os-vendor="SUSE LINUX" \
            --with-fontrootdir="/usr/share/fonts" \
            --with-xkb-path="/usr/share/X11/xkb" \
            --with-xkb-output="/var/lib/xkb/compiled" \
       --with-default-font-path="/usr/share/fonts/misc:unscaled,\
/usr/share/fonts/Type1/,/usr/share/fonts/100dpi:unscaled,\
/usr/share/fonts/75dpi:unscaled,/usr/share/fonts/URW/,\
/usr/share/fonts/cyrillic:unscaled,\
/usr/share/fonts/misc/sgi:unscaled,\
/usr/share/fonts/truetype/,built-ins"


Ubuntu's debian/rules:
Code: Select all
ifeq ($(DEB_HOST_ARCH_OS), linux)
   build_xfbdev = --enable-xfbdev
   selinux = --disable-xselinux
   xkbrules = --with-default-xkb-rules=evdev
else
...
confflags += \
        --disable-silent-rules \
        --disable-static \
        --without-dtrace \
        --disable-strict-compilation \
        --disable-debug \
        $(config_tests) \
        --with-int10=x86emu \
        --with-extra-module-dir="/usr/lib/${DEB_HOST_MULTIARCH}/xorg/extra-modules,/usr/lib/xorg/extra-modules" \
        --with-os-vendor="$(VENDOR)" \
        --with-builderstring="$(SOURCE_NAME) $(SOURCE_VERSION) ($(BUILDER))" \
        --with-xkb-path=/usr/share/X11/xkb \
        --with-xkb-output=/var/lib/xkb \
        $(xkbrules) \
        --disable-devel-docs \
        --disable-install-libxf86config \
        --enable-mitshm \
        --enable-xres \
        --disable-xcsecurity \
        --disable-xcalibrate \
        --disable-tslib \
        --enable-dbe \
        --disable-xf86bigfont \
        --enable-dpms \
        $(config_backend) \
        --enable-xorg \
        --disable-xquartz \
        --disable-xwin \
        --disable-xfake \
        --disable-install-setuid \
        --enable-gestures


SuSE's xkeyboard-config:
Code: Select all
%configure --with-xkb-rules-symlink=xfree86,xorg \
            --with-xkb-base=/usr/share/X11/xkb \
            --enable-compat_rules \
            --disable-runtime-deps \
            --disable-xkbcomp-symlink
...
mkdir -p $RPM_BUILD_ROOT/var/lib/xkb
ln -snf /usr/bin/xkbcomp $RPM_BUILD_ROOT/usr/share/X11/xkb/xkbcomp
# Bug 335553
mkdir -p $RPM_BUILD_ROOT/var/lib/xkb/compiled/
ln -snf /var/lib/xkb/compiled/ $RPM_BUILD_ROOT/usr/share/X11/xkb/compiled

Ubuntu's debian/rules for xkeyboard-config:
Code: Select all
xkb_base := /usr/share/X11/xkb
...
override_dh_auto_configure:
   dh_auto_configure -- \
     --with-xkb-rules-symlink=xfree86,xorg \
     --with-xkb-base=$(xkb_base) \
     --disable-runtime-deps


Current permissions (with official/not patched xorg):
Code: Select all
ls -l /var/lib/xkb/
total 32
drwxr-xr-x 2 root root  4096 Aug 24 12:43 compiled
-rw-r--r-- 1 root root 12292 Aug 15 22:45 server-0-evdev-evdev-hr-(null)-(null).xkm
-rw-r--r-- 1 root root 11264 Aug 15 22:45 server-0-evdev-pc105-us--.xkm

ls -l /var/lib/xkb/compiled/
total 4
-rw-r--r-- 1 root root 644 Jul 25 21:42 README.compiled

EDIT:
With patched xorg i get a flood of messages in Xorg.0.log
Code: Select all
[316901.046] (II) XKB: generating xkmfile /var/lib/xkb/compiled/server-2F7661722F6C69622F786B622F636F6D70696C65.xkm
[316933.284] (II) XKB: reuse xkmfile /var/lib/xkb/compiled/server-2F7661722F6C69622F786B622F636F6D70696C65.xkm
[317043.557] (II) XKB: reuse xkmfile /var/lib/xkb/compiled/server-2F7661722F6C69622F786B622F636F6D70696C65.xkm
-II-

Every time i start dolphin/gwenview it tries to reuse that xkm file
Here are contents of:
Code: Select all
ls -l /var/lib/xkb/
total 4
drwxr-xr-x 2 root root 4096 Aug 24 14:32 compiled

ls -l /var/lib/xkb/compiled/
total 28
-rw-r--r-- 1 root root   621 Aug 24 13:05 README.compiled
-rw-r--r-- 1 root root 11320 Aug 24 14:30 server-0000000000000000000000000000000000000000.xkm
-rw-r--r-- 1 root root 11312 Aug 24 14:32 server-2F7661722F6C69622F786B622F636F6D70696C65.xkm

Last edited by šumski on Fri Aug 24, 2012 12:54 pm, edited 1 time in total.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Okay - it seems that the recompilation is definitely an issue, so would recommend contacting the X developers - or the folks at your distribution who are responsible for the bleeding edge X (OpenSUSE has a OBS repository available I believe, running similar code to OpenSUSE Factory for X11 only).


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
šumski
Registered Member
Posts
106
Karma
1
OS
That's probably way to go, but still, why is xkbcomp called with every start of mentioned apps? I don't get that part.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Likely because the X Keyboard maps need to be "recompiled" (for some reason or another) which isn't possible under your user due to permissions/folder existance - resulting in the recompile happening over and over again.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
šumski
Registered Member
Posts
106
Karma
1
OS
bcooksley wrote:Likely because the X Keyboard maps need to be "recompiled" (for some reason or another)

I would like to find out that reason :)
Anyway, thanks for trying to help ;)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I would suggest contacting the X developers (or appropriate people for your distribution) who may be able to help you debug the issue.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kde-naveen, Sogou [Bot]