Startup vs. terminal Xorg

crbenesch

New Member


Messages: 1

#1
Hi guys and gals,

Been using FreeBSD for almost a decade now, and I rarely use X on it. However, with the setup I am running now, I want to have it display my security camera's RTSP on an HDMI port.

I'm running dual 2 core xeons (soon to upgrade to quad cores) a little light on frequency (2.3 GHz) but otherwise good little CPUs, 16 gb ram, a Radeon M220 card which is supported by the native ati driver. I've got xorg and the right drivers and opengl / opencl installed. I am trying to run cvlc on a spectrwm display.

When I boot up, log in and startx it all works. 7% cpu usage, which is acceptable and expected.

The problem is when I put it into rc.local to su to the cam user and start X, Xorg is using 112% CPU.

Does anyone know why X would be using so much CPU on rc.local compared to from a login terminal? I checkced Xorg.0.log and dont see anything about missing drivers or trying ot use vesa or anything.

Stumped.
 

Martin Paredes

Member

Thanks: 12
Messages: 44

#2
What did you put in rc.local?

Does anyone know why X would be using so much CPU on rc.local compared to from a login terminal?
Maybe it is because the process get nicer priority (it run as root).

The manual for rc(8) implies tha rc.local is going out.

Typically, the /usr/local/etc/rc.d/ mechanism is used instead of rc.local these days but if you want to use rc.local, it is still supported.
 

kpedersen

Daemon

Thanks: 373
Messages: 1,217

#3
Is it to do with DRM? If you run just xterm from your rc.local and then execute the program do you see something like

Code:
libGL error: failed to open drm device: Permission denied
 

NapoleonWils0n

Member

Thanks: 4
Messages: 22

#4
Hi guys and gals,

Been using FreeBSD for almost a decade now, and I rarely use X on it. However, with the setup I am running now, I want to have it display my security camera's RTSP on an HDMI port.

I'm running dual 2 core xeons (soon to upgrade to quad cores) a little light on frequency (2.3 GHz) but otherwise good little CPUs, 16 gb ram, a Radeon M220 card which is supported by the native ati driver. I've got xorg and the right drivers and opengl / opencl installed. I am trying to run cvlc on a spectrwm display.

When I boot up, log in and startx it all works. 7% cpu usage, which is acceptable and expected.

The problem is when I put it into rc.local to su to the cam user and start X, Xorg is using 112% CPU.

Does anyone know why X would be using so much CPU on rc.local compared to from a login terminal? I checkced Xorg.0.log and dont see anything about missing drivers or trying ot use vesa or anything.

Stumped.
HI Mate

Have you added yourself to the video group
replace username with your username

Bash:
sudo pw usermod username -G video
check which groups your user is in

Bash:
groups username
im in these groups
username wheel operator video

try adding yourself to the video group and then do a reboot to pick up the change
then check top again and see if the cpu usage is reduced

hope that helps
 

kpedersen

Daemon

Thanks: 373
Messages: 1,217

#5
Also, I cannot find this officially documented anywhere but for my radeon to work I needed the following in /etc/rc.conf

Code:
kld_list="radeonkms"
To load the radeonkms kernel module. Otherwise you are stuck with vesa and non accelerated rendering.
 
Top