LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Access via vnc viewer slow when host is non-root, fast when root. Why? (https://www.linuxquestions.org/questions/slackware-14/access-via-vnc-viewer-slow-when-host-is-non-root-fast-when-root-why-4175605742/)

Ook 05-11-2017 04:29 PM

Access via vnc viewer slow when host is non-root, fast when root. Why?
 
This is a bit of a weird one. I have a box I use as a game server, and from time to time I start up xfce, run x11vnc, and remote in via vncviewer. Works good, but is really slow. I do this via a non-root account, of course.

The other day I started xfce from the root account ( I know, I know, never do this, no I don't normally do this, was just testing some stuff). Started x11vnc, and remoted in via vncviewer. And I immediately noticed that performance was easily ten times faster. MUCH faster.

Why would this be so? Why would running xfce and x11vnc via non-root be so slow, and doing it as root be so fast?

The computer and account I use to remote into it is non-root and does not change. It's just that when I run xfce and x11vnc on the server as root, it is ten times faster than when run via non-root.

bassmadrigal 05-11-2017 05:27 PM

Is it possible your regular user isn't part of the video group, and thus doesn't have proper video acceleration while X is running?

Ook 05-11-2017 05:46 PM

Quote:

Originally Posted by bassmadrigal (Post 5709350)
Is it possible your regular user isn't part of the video group, and thus doesn't have proper video acceleration while X is running?

Checked that, user is part of video group.

I just realized this has nothing to do with x11vnc or vncserver or remote access. I just went to the machine and started xfce as the non-root user and realized performance is very bad at the machine itself. It's X/xfce itself for the non-root users that is very slow.

This is a normal Slackware 14.2 64 bit install, nothing special, nothing modified, and a fairly clean install.

The only thing out of the ordinary is I have an old GeForce 8400 GS. I have the proprietary nVidia driver loaded.

Performance in xfce as root is superb. Performance for non-root users is very poor. I'm not quite sure where to even start looking for this one, as I've never seen this before.

I created a new user account just to make sure it wasn't a problem with the other user, and a brand new user account likewise performs poorly.

Ook 05-11-2017 05:50 PM

I may just swap out video cards because if I run xfce, after a while the box hard locks. I've been running this as a game server for quite a while, and it's rock solid. Until I start xfce, then it eventually locks solid. Mmmm replacing the video card sounds better and better, though that does not explain the performance problems.

It's an old Asus m4xx series board. It's been a good board, does not have onboard video. No stability problems when running as a game server without a gui running.

Richard Cranium 05-11-2017 09:51 PM

Anything in the logs?

Ook 05-11-2017 10:28 PM

I see what looks like video related errors in syslog right before it hard locks. I also see this:

kernel: [ 2642.874845] NVRM: os_schedule: Attempted to yield the CPU while in atomic or interrupt context

Tomorrow I'm going to drop a different video card in the box and see what happens.

slackartist 05-12-2017 12:32 AM

yea im not too sure but when my video card completely failed it had to do withthe display so not too sure if its at fault here would be my guess

Ook 05-12-2017 10:21 AM

Quote:

Originally Posted by slackartist (Post 5709444)
yea im not too sure but when my video card completely failed it had to do withthe display so not too sure if its at fault here would be my guess

It would explain the crashes after running X/xfce for a while, but it does not explain the performance problem with non-root users. At any rate, it's the quickest and easiest next step. Results to follow...

I'm wondering if this is just some quirk (read:bug) in the nvidia driver for old video cards like this? Nvidia drivers can be touch-and-go, good one version and crap the next. And how many of us have these old video cards still kicking around? OK, probably a lot of us, I only recently got rid of my socket-A boards and all of my ISA cards...I still have a big box of floppies somewhere...

Richard Cranium 05-12-2017 10:52 AM

If it's a really old card, then maybe you can try using the nouveau driver instead of the nVidia one.

I've got one of those in a testbed machine...
Code:

root@testbed:~# lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation G86 [GeForce 8400 GS] (rev a1)

...and normal X operations appear to run just fine with the nouveau driver, including glxgears. I'm not gaming on that one, however.

Ook 05-12-2017 10:54 AM

Quote:

Originally Posted by Richard Cranium (Post 5709626)
If it's a really old card, then maybe you can try using the nouveau driver instead of the nVidia one.

I've got one of those in a testbed machine...
Code:

root@testbed:~# lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation G86 [GeForce 8400 GS] (rev a1)

...and normal X operations appear to run just fine with the nouveau driver, including glxgears. I'm not gaming on that one, however.

I actually was using the nouveau driver, and thought that was causing the problem. I'll start from scratch tonight, swap video card and take it from there.

slackartist 07-06-2017 07:09 PM

you could check your Xwrapper.config in your x11 directory i just figured out. works good but it wasnt performance but see here:

allowed_users=anybody

works

https://wiki.archlinux.org/index.php/xorg
https://wiki.archlinux.org/index.php/Systemd/User

and i should probably add this like seen on the second link i have
needs_root_rights=yes

i did see this somewhere else , and it was bugging me for some time since i had a few systems where i could startx a session without sudo. Then it was that xwrapper error i think it might have threw. or user as console something like that for the rest of my computers. glad I got this then .

Darth Vader 07-07-2017 04:51 PM

NVidia driver use for 2D acceleration (i.e. painting the desktop) also the 3D engine, so an explanation for a slow working speed as non-root could be a problematic user access to the special devices for NVidia. Read: user permissions on /dev.

Ook 10-14-2017 09:46 PM

I know this is an old thread, but I FINALLY got around to replacing the video card. The new card uses the same driver as the old one, so nothing changed except a quick swap of video card. AND now performance as a non-root user is superb, like you would expect it to be. And so far, it has not locked up. The old card would hard lock the machine every ten minutes or so IF an X server was running. In the console it would run week after week, rock solid, but start up xfce? Blammo, hard lock. The new card has not yet done this.

So I conclude that (98% probability) the old card was defective or (2% probability) the driver just never worked right with this particular card. I think it was an old nVidia 8400 chip set, and was a very old card. Having met some of nVidia's engineers a few years ago when I was in school, and having used their cards and drivers for ... 20 years? ... I'm of the opinion that while most of their stuff is quite good, many of their driver versions, and a few of their chipsets, are pure horse ****.....

</soapbox>

OK, now i feel better....


All times are GMT -5. The time now is 08:38 AM.