# Screen resolution changes after restarting X



## balanga (Nov 7, 2014)

I'm just finding my way around using X.Org and have noticed that when I first boot up and run `startx` X starts in high resolution - 1400 x 1050, but then when I exit and restart, the resolution is much lower. To restore high resolution, I need to reboot.

Can anyone explain this and suggest what I need to do to fix it?

My graphics card is an ATI FireGL T2/T2e.


----------



## fonz (Nov 9, 2014)

Hmm, that's odd. Can you post the output of `startx` in both situations, and your X.Org configuration file if you have one?


----------



## balanga (Nov 10, 2014)

fonz said:


> Hmm, that's odd. Can you post the output of `startx` in both situations, and your X.Org configuration file if you have one?



Do you mean Xorg.0.log for both instances?

I tried to use `diff -y --suppress-common-lines` to highlight the differences but both logfiles are completely different due to having each line prefixed by some number the significance of which I am not aware. I guess I need to try and ignore the first twelve characters in the comparison but I'm not sure how to go about that.

As for the configuration file, do you mean xorg.conf.new?

There are also a number of serverauth.xxxx files which may have some relevance but I have no idea what they are for.


----------



## fonz (Nov 10, 2014)

balanga said:


> Do you mean Xorg.0.log for both instances?
> 
> I tried to use `diff -y --suppress-common-lines` to highlight the differences but both logfiles are completely different due to having each line prefixed by some number the significance of which I am not aware. I guess I need to try and ignore the first twelve characters in the comparison but I'm not sure how to go about that.


You could use `cut -c 14- /var/log/Xorg.0.log > /tmp/something` to trim off the prefixes (the number 14 is the character position to start from, adjust according to your needs).



balanga said:


> As for the configuration file, do you mean xorg.conf.new?


Please note that xorg.conf.new (probably in /root/) isn't used by X.Org at all. It has to be copied to (exactly) /etc/X11/xorg.conf in order to be picked up.


----------



## Juanitou (Nov 10, 2014)

balanga said:


> There are also a number of serverauth.xxxx files which may have some relevance but I have no idea what they are for.


They are not relevant. AFAIR, these are created by startx when enable_xauth is set, and not deleted when Xorg is not shut down properly.

There are certainly some clues in your log files, Xorg indicates what resolution it chooses and why.


----------



## Beeblebrox (Nov 10, 2014)

balanga:

How do you exit?
Can you switch (before exiting) to tty* with alt+F*?
How do you restart?

Can you switch (after restarting) to tty* with alt+F*?
Output of `# kldstat -v | grep radeon`
For vt resolution, set in /boot/loader.conf

```
kern.vt.fb.default_mode="1024x768"
```


----------



## balanga (Nov 10, 2014)

fonz said:


> You could use `cut -c 14- /var/log/Xorg.0.log > /tmp/something` to trim off the prefixes (the number 14 is the character position to start from, adjust according to your needs).
> 
> 
> Please note that xorg.conf.new (probably in /root/) isn't used by X.Org at all. It has to be copied to (exactly) /etc/X11/xorg.conf in order to be picked up.




After cutting off the first 14 characters, the only difference in the log files was the time at which the logfile was written.

There are no files in /etc/X11.


----------



## fonz (Nov 10, 2014)

balanga said:


> There are no files in /etc/X11.


I assume you created xorg.conf.new using `Xorg -configure`. In that case, copy it to /etc/X11/xorg.conf and see if that helps.


----------



## balanga (Nov 10, 2014)

fonz said:


> I assume you created xorg.conf.new using `Xorg -configure`. In that case, copy it to /etc/X11/xorg.conf and see if that helps.



I just tried that, but it makes no difference.

I boot up, run `startx`. X comes up in high resolution. I exit using Fluxbox's exit option and then rerun `startx` and X comes up in a lower resolution.

If I attempt to run an app_lication_ such as Abiword it comes up as though expecting to be in high resolution, but it isn't, so that when I maximise the window it expects the screen to be much bigger, i.e. it doesn't fit on the screen at all. In high resolution it fits nicely on the screen, as does Chromium or Opera.


----------



## balanga (Nov 10, 2014)

Beeblebrox said:


> balanga:
> 
> How do you exit?
> Can you switch (before exiting) to tty* with alt+F*?
> ...



I exit from X using Fluxbox's Exit option.

I can't switch to a TTY from within X.

X is restarted after exiting by simply running `startx` again.

Running `kldstat` in a TTY generates:

```
2      1 0xc75ee000 f9000     radeonkms.ko
7      1 0cx7a70000 2000      radeonkmsfw_cp.ko
```

I set the screen resolution in text mode using 
	
	



```
allscreens_flags="MODE_280"
```
in /etc/rc.conf.


----------



## fonz (Nov 10, 2014)

Beeblebrox said:


> Can you switch (before exiting) to tty* with alt+F*?


Mind you: that should be *Ctrl*+Alt+F*.


----------



## balanga (Nov 10, 2014)

fonz said:


> Mind you: that should be *Ctrl*+Alt+F*.


Yes.


----------



## Beeblebrox (Nov 11, 2014)

You need to get vt(4) working: http://forums.freebsd.org/threads/ati-rv250-xorg-blackscreen.48897/#post-273351.


----------



## balanga (Nov 11, 2014)

From what I read vt(4) gets installed with FreeBSD 10.1, so maybe I should try a fresh install, as I'm on 10.0 at the moment...


----------



## wblock@ (Nov 12, 2014)

Fresh install is a Windows technique, usually a waste of time on FreeBSD when you can easily upgrade from source or binary and keep all the existing configuration and data files.


----------



## balanga (Nov 12, 2014)

wblock@ said:


> Fresh install is a Windows technique, usually a waste of time on FreeBSD when you can easily upgrade from source or binary and keep all the existing configuration and data files.



That's fair comment but since I'm running an experimental system which is simply being used for teaching myself FreeBSD, I've probably installed a lot of things I don't need and configured things wrongly so there's a bit of a mess on the hard disk which would be best cleaned up with a fresh install.


----------

