I've changed an i2c config file so current baudrate is 300000. I do a reboot and start an i2c baudrate checking program. sudo ./checkbr But what I get seems to be usual baudrate settings(default). Then I do a startx and load a gui. I open a terminal and make same steps. After sudo ./checkbr I'm getting desired baudrate = 300000. Why can't I get 300000 without x server loaded? I've also tried removing i2c_bcm2708 and re-adding it with baudrate = 300000 but still no results unless I do startx. If it's important, I do check a baudrate with a c++ piece of code which reads data from i2c in a loop and measures time needed to read it. In case of X server off I get 3x slower read speed than with a X started.
EDIT: Something may be wrong with my code so here it goes.
for (;;) {
I2CInterface.readRegister(MPU6050_ADDRESS, MPU6050_RA_ACCEL_XOUT_H, 14, data);
oldTime = curTime;
clock_gettime(CLOCK_REALTIME, &curTime);
dt = ( (static_cast<int64_t>(curTime.tv_sec)*1000000000 + static_cast<int64_t> (curTime.tv_nsec)) - (static_cast<int64_t>(oldTime.tv_sec)*1000000000 +
static_cast<int64_t>(oldTime.tv_nsec)) ) /1000000000.0;
printf( "%7f \n", dt);
}
I2CInterface.readRegister last 2 parameters are number of bytes and where to store it.