Description of problem: Recently, logins (via ssh or also su) became very slow, taking 10-15 sec. It turned out (credits to Radim Vansa), that it's caused by calling /etc/profile.d/qt-graphicssystem.sh script, which calls lspci every time, which is obviously slow. It's a workaround for BZ #810161 and it's seem to be there for very long time. However, we started to observed such slow down recently, so not completely sure what exactly triggers this misbehavior. Version-Release number of selected component (if applicable): kde-settings-23-8 observed also on FC22 How reproducible: always Steps to Reproduce: 1. run e.g. `su -` Actual results: it takes about 10-15 sec to switch user Expected results: user is switched immediately
*obviously* slow? $ time lspci >& /dev/null real 0m0.025s user 0m0.018s sys 0m0.007s That said, if it indeed is slow, perhaps we can come up with a way to cache the results so it doesn't have to run *every* time.
well, "obviously" wasn't proper wording, sorry. on my machine: $time lspci >& /dev/null real 0m8.744s user 0m0.005s sys 0m0.734s As I mention, this seems to be there for quite a long time, while I start observing such slow logins couple of weeks back, so it's probably regression in some other component which makes lspci being slow. That being said, I still think this is not an ideal solution, calling it only once and caching result would be definitely better.
just for completeness, according to strace lspci seems to get stuck when reading config of VGA/NVIDIA device: open("/sys/bus/pci/devices/0000:01:00.0/config", O_RDONLY) = 3
I have got exactly the same issue. The problem is with fairly long access to /sys/bus/pci/devices/0000:01:00.0/config (where 0000:01:00.0 is NVIDIA Corporation GK107GLM [Quadro K1100M] (rev a1)). By the way, after the file is accessed, there is around 10secs period when the access to it is instant. Then it gets slow again. (I suspect that the core problem might be kernel related so I have filled the following bug: https://bugzilla.kernel.org/show_bug.cgi?id=113791. Nevertheless, is that workaround still needed?)
Unfortunately, I can't think of any way to cache this in a safe way. I had considered using $XDG_RUNTIME_DIR, but it appears that location gets cleared when user sessions end. WORKAROUND: try setting environment variable either globally or in your user shell (ie, bash .profile or whatever): QT_GRAPHICSSYSTEM_CHECKED=1 that should short-circuit and skip the check
@Rex Dieter: ok, thanks for your effort! If there isn't any safe way how to cache, feel free to close it. Thanks.
I suppose we could also consider moving this to /etc/X11/xinit/xinitrc.d
kde-settings-23-11.fc23.1 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-d8dbbc4b73
kde-settings-23-11.fc23.1 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-d8dbbc4b73
kde-settings-23-11.fc23.1 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.