I can't make screen size changes "stick" -- they're always set back after a reboot
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I can't make screen size changes "stick" -- they're always set back after a reboot
Every time I reboot I have to go to "System Settings -> Display" and reset my screen size to 1680x1050 because it's seems to be reset to 1152x864 by the reboot.
I've also looked at /etc/kde3/et ales and been unable to find any place where the screen size is forced.
Oh, I also ran dkpg to reset xorg.conf, but that, too, made no difference.
Note, please, that the display works fine at 1680x1050 and the display configuration tool has no problem setting that resolution, so xorg.conf must be reasonably correct.
So, friends, any suggestions?
Last edited by PTrenholme; 02-25-2008 at 03:16 PM.
Reason: Mis-stated the size after a reboot. Corrected to 1152x864
As I said, the setting the screen size "by hand" works with no problem. It just doesn't "stick."
So if you add 1680x1050@60 to that section you can then choose that resolution, but upon reboot it is gone? Please confirm this because I want to make sure I am understanding you correctly.
It would seem that one of the startup scripts is modifying this. Taking away the write perms on the file (as mentioned above) is a workaround, but definitely not an ideal one. If you were going to do something similar I suggest that you make a backup of the config you like and then add a line at the end of your startup scripts that simply backs up the xorg.conf file (somewhere different that your previous backup) and copies your chosen backup to xorg.conf. That way no information is lost and your file will be how you want it at every boot.
However, it would be better to understand why this is happening instead of just working around it. I suggest you look through the startup scripts to try and determine what is modifying it.
It could be that even though the settings you are putting in xorg.conf appear to be safe, they might be out of spec with what your monitor/graphics card can safely produce for extended periods of time. I suggest you check the documentation for both and double check that the resolutions, color depths, horizontal and vertical syncs are all within the specs.
It could also be that the EDID that your computer is acquiring for your monitor (at every bootup) doesn't include the resolution you are trying to display. As a result, some auto sane check on your xorg.conf file decides to "fix" this for you.
I find it strange that your Screen section only shows one sync rate. What does your Monitor section say? Do you really only have one sync rate?
My Monitor and Screen Sections look like (comments removed)
I believe that the problem is that, someplace in the boot-up scripts, the resolution is being set to the value I was using before I bought the Sceptre monitor. (The 1152x864 was the resolution I set when I installed Gutsy on my older system.) But I can't find any script where those values are used.
I went back and regenerated the xorg.conf file using the dkpg tool, and I still have the same problem, although the section in question now looks like this:
Oh, notice the "gamma 0.65" in the "Monitor" section. I set that in the System Settings screen, and it took.
Anyhow, I'd be really surprised if the problem was in the xorg.conf file.
But, just for the sake of completeness, I'm going to "import" the screen and monitor sections of the xorg.conf file I use on my Fedora system too see if that makes any difference. Look for my next post for an update.
Well, back on Kubuntu with the Fedora xorg.conf, and no change to the need to reset the resolution after reboot.
I do notice, though, that the login screen size (from kdm, I presume) is also incorrectly set. But that size is not specified anywhere that I can find. Any clues, anyone?
For completeness, here's the current xorg.conf from /etc/X11 on my Kubuntu system:
<edit>
Wait a second: I just looked at the xorg.conf I posted, and it doesn't look like the one I copied from my Fedora system. The "modline" and "modes" are different. (I didn't review them before posting, just cut them from a terminal window and pasted.)
Here, for example, is what the "Screen" section should have been:
So whilst it doesn't solve the mystery of where the resolution is being set from (an overzealous failsafe mechanism I think) ... did you try setting a working xorg.conf to not be writable?
You might also look at xrandr which I think can be used to force your desired screen resolution at startup.
I'll try setting the sticky bit on xorg.conf. I don't think that making it unwritable would work, since the boot process is running as root.
I just thought to look at all of the /etc/X11/xorg.conf files, and it looks like every time I set xorg.conf by hand, the boot "bumped" it to a backup. Here's what I found: (I'm on my Fedora system right now.)
An addendum: Before trying the "no write" option, I thought I'd try pbhj's suggestion re xrandr. (Thank you pbhj!)
xrandr (and grandr) did work to quickly change the screen resolution, but newly created windows on the screen seem to "think" that they're being rendered in the smaller window. After they're created, they can be resized to the larger screen. That's a pain, but the real pain is that the task bar (which I keep at the bottom of the screen) ends up in the lower left quadrant, and is not movable. It's also some shorter than the whole screen width. (I did move it to the top screen position for now, but that, too, is a pain since I ware bifocals, and need to tilt my head way back to read the task bar in that position.)
I'll try setting the sticky bit on xorg.conf. I don't think that making it unwritable would work, since the boot process is running as root.
Just to clarify: the sticky bit is set on a directory to protect it's files from deletion by unauthorised users (that's the short version).
Unless root (or a script run as root) does a "chmod u+w" on a file it remains unwritable. As ever root has ultimate power but is still confined by the settings it puts in place itself.
Just to clarify: the sticky bit is set on a directory to protect it's files from deletion by unauthorised users (that's the short version).
Unless root (or a script run as root) does a "chmod u+w" on a file it remains unwritable. As ever root has ultimate power but is still confined by the settings it puts in place itself.
FWIW.
Sometimes (usually in older distributions) the sticky bit can also be placed on a file to prevent any changes in the file unless you are the file owner or a privileged user. Kubuntu, unfortunately for my idea, does not honor the sticky bit on files and, in any case, root is a privileged user.
So when I tried it, changing the owner and group of xorg.conf me, making it read only, and setting the sticky bit, the boot process blithely ignored all that, created the backup file as owned by root, and added its own (improperly generated) xorg.conf file.
Now I'm looking at the Python programs in /usr/share/python-support/guidance-backends/ and thinking about adding a new option that /etc/X11/Xsession.options can read that will tell the X startup to keep its grubby hands off my hand-crafted and tested xorg.conf file.
That's weird cos it worked for me! Setting the file read only I mean. It seems a bit of a stretch that the distro designers would not only enforce a failsafe rewrite but also enabling writing of the file that could only have been disabled by root level user ... that's sick!
That's weird cos it worked for me! Setting the file read only I mean. It seems a bit of a stretch that the distro designers would not only enforce a failsafe rewrite but also enabling writing of the file that could only have been disabled by root level user ... that's sick!
O.K., I'll give it another shot: when I made the changes in the file permissions for the test I was logged in to my Fedora system, and my numeric user id in that system is 1000, not 500, since Fedora starts the user list at 1000, so I may have confused Kubuntu with an unassigned user and group number. (I did specify 500, but I'm not sure if that "took.")
More later -- I have a process running on my Fedora system right now that will take a few more hours to complete, and then I'll probably need to go see if my wife remembers what I look like, so check here tomorrow (afternoon in GB time) to see what happened. (With the problem -- I'll try to deal with the wife on my own, thank you.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.