kde changes screen refresh rate of nvidia card

Bug #89640 reported by Viktor Rasmussen
12
Affects Status Importance Assigned to Milestone
linux-restricted-modules (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: kde-systemsettings

The refresh rate is 85hz (as it should be) on the login screen, but when kde starts it changes the refresh to 60 or 75hz.

In kde systemsettings i can only give refresh rates from 50 to 56hz. (systemsettings also crashes on exit if I have been to administrator mode. Another problem?)

If I change the driver to nv instead of nvidia, then it works

ProblemType: Bug
Date: Sun Mar 4 12:49:40 2007
DistroRelease: Ubuntu 7.04
Uname: Linux ubuntu 2.6.20-9-386 #2 Mon Feb 26 02:58:41 UTC 2007 i686 GNU/Linux

Revision history for this message
Jeffry Johnston (ubuntu-kidsquid) wrote :

I'm having the same problem, although my screen is in interlace mode. According to nvidia-settings it is in 1024x768, 43Hz interlaced mode (or it might have been 42Hz). According to xrandr, 1024x768, 57Hz:

 SZ: Pixels Physical Refresh
*0 1024 x 768 ( 346mm x 260mm ) 50 53 54 55 56 *57
 1 800 x 600 ( 270mm x 203mm ) 51 62 63 64 65 66 67
 2 640 x 480 ( 216mm x 162mm ) 52 73 74 75 76
 3 960 x 600 ( 325mm x 203mm ) 58
 4 896 x 672 ( 303mm x 227mm ) 59
(...etc..)

I am using the nvidia driver, gdm, kde, and kubuntu 7.04. kernel: 2.6.20-14-generic, x86_64

Unfortunately, I cannot test the nv driver as it does not support my GeForce 7800 GT.

One thing I should mention is that I have my system set up in a multiseat configuration. When it wasn't, I was able to use nvidia-settings to change the refresh to 85Hz, which lasted until reboot. But now, because I'm running two Xgl sessions on top, I cannot use nvidia-settings (that's why I can't check whether it was 42 or 43 Hz.)

Here is my ~/.kde/share/config/displayconfigrc file. Notice that it has the correct refresh value listed:
[General]
targetgamma=2.0

[Screen0]
dpmsEnabled=off
dpmsSeconds=2700
height=768
reflectX=0
reflectY=0
refresh=85
rotate=0
width=1024

Revision history for this message
Jeffry Johnston (ubuntu-kidsquid) wrote :

I messed around, starting from xorg.conf, tracing that through to Xsession, to /etc/X11/Xsession.d/40guidance-displayconfig_restore
and discovered a partial workaround:

1) sudo mv /usr/bin/displayconfig-restore /usr/bin/displayconfig-restore.orig
 2) sudo touch /usr/bin/displayconfig-restore
3) sudo chmod +x /usr/bin/displayconfig-restore
4) reboot

It messes up my fonts though (very squished), probably because that is something that displayconfig-restore also does.
I'll investigate a bit more to see which lines need to be commented out to remove the bug, but not mess up the fonts.

Revision history for this message
Jeffry Johnston (ubuntu-kidsquid) wrote :

Okay, after looking at displayconfig-restore.py, I'm convinced that I haven't really found the source of the bug, just a place where the bug is causing a mess up. Inside this program, it is getting a list of refresh rates, then picking the best one. I overrode its preferred choice of 57Hz and told it to use 85Hz. This worked. I have a few thoughts on this:

* xrandr reported a max of 57Hz. I looked at the source of this program and it is querying X to get its info
* kde-guidance (the package with displayconfig-restore) has a dependency on libxrandr2.

Since xrandr is just querying the system, I don't think the bug is there either. In my opinion this is a bug with either the kernel or nvidia driver.

Revision history for this message
predder (predder) wrote :

I'm running Debian but I experienced a similar problem and wound up looking for a solution. Hopefully what worked for me will also work for you..

Firstly I was running the nv driver, kde and xserver-xorg. I wanted to get 3D acceleration happening so I switched to the nvidia driver, restarted X with the same config file (except I changed "nv" to "nvidia" and commented out the DRI module) and the resolution was 1600x1200, I switched using the KDE menu to 1280x1024 and the max refresh rate was 66 which killed my eyes. My monitor section was as below:

Section "Monitor"
    Identifier "Sony G520"
    HorizSync 30.0 - 130.0
    VertRefresh 48.0 - 170.0
EndSection

I changed the refresh and sync values to some others I found on the net and when I restarted the xserver, at the kde login screen everything looked great. Then after logging in the screen flashed and switched to the poor refresh rate again and changed the positioning of the screen on the monitor slightly.

I followed the advice of the following thread:
http://ubuntuforums.org/showthread.php?t=83973

and used this tool:
http://www.bohne-lang.de/spec/linux/modeline/

to generate a modeline for me, copied it into my Monitor section as follows:
Section "Monitor"
    Identifier "Sony G520"
    # V-freq: 75.00 Hz // h-freq: 80.42 KHz
    Modeline "1280x1024" 151.83 1280 1360 1544 1888 1024 1024 1027 1072
EndSection

also changed the Display subsection in screen and got rid of all the resolutions except 1280x1024:
    SubSection "Display"
        Depth 24
        Modes "1280x1024"
    EndSubSection

restarted X and everything is working great.

Revision history for this message
kingof1981 (kingof1981) wrote :

tahnks you for this.. i have the same problem...
what kde does with refresh rate...
normally i shouldn't have this problem... because i don't have a refresh rate on my monitor... i've acer X222W...
but for some reason get changes the refresh rate every time i use fullscreen mode(to watch movie's)...
AND vaula i got a weird monitor...
i change the refresh rate back again and all is fine again...

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

Viktor:
Misreported screen refresh rates (typically xrandr based tools report 57Hz) on the NVIDA binary drivers with dynamic twinview on is a known "bug". See Bug #92599 for details.

Revision history for this message
Josh Stern (josh-phadd) wrote :

I found this thread by googling after I had a similar problem. I wanted to add the comment that for someone who just wants to keep a good refresh rate on their CRT, the easiest solution seems to be to add the option line:
Option "IncludeImplicitMetaModes" "false"
to the device section for their nvidia card. This basically causes the driver to only use the modes defined in the xconfig instead of doing what it pleases.

Revision history for this message
santiago (fox16e) wrote :
Download full text (4.5 KiB)

hello everybody from Argentina,
I have the same problem, i don't know how, But i fix it editing the xorg.conf, really
it was an accident i was trying to configure the tv-out, but the fist boot i saw that kde
start whit a different resolution (it was too much for my Syncmaster) and refresh ratio (NOT the classic 43hz ¬¬), I change this in the Xorg.conf restart and, it's magic Kde start whit 1024x768 _85hz.

---
Estaba intentando configurar el tv out de mi fx5200, agregando unas lineas. Despues de varios
intentos vi que kde arranco con la resolucion 1024x768 85hz sin volver a 43hz todas las veces que prendia
----

Sorry my English is not too "good" and i am a newbie but i want to help, Ileave my xorg.conf

Section "ServerLayout"
    Identifier "Default Layout"
    Screen "Default Screen" 0 0
    InputDevice "Generic Keyboard"
    InputDevice "Configured Mouse"
    InputDevice "stylus" "SendCoreEvents"
    InputDevice "cursor" "SendCoreEvents"
    InputDevice "eraser" "SendCoreEvents"
EndSection

Section "Files"

 # path to defoma fonts
    FontPath "/usr/share/fonts/X11/misc"
    FontPath "/usr/share/fonts/X11/cyrillic"
    FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
    FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
    FontPath "/usr/share/fonts/X11/Type1"
    FontPath "/usr/share/fonts/X11/100dpi"
    FontPath "/usr/share/fonts/X11/75dpi"
    FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
    Load "i2c"
    Load "bitmap"
    Load "ddc"
    Load "extmod"
    Load "freetype"
    Load "glx"
    Load "int10"
    Load "vbe"
EndSection

Section "InputDevice"
    Identifier "Generic Keyboard"
    Driver "kbd"
    Option "CoreKeyboard"
    Option "XkbRules" "xorg"
    Option "XkbModel" "pc105"
    Option "XkbLayout" "latam"
EndSection

Section "InputDevice"
    Identifier "Configured Mouse"
    Driver "mouse"
    Option "CorePointer"
    Option "Device" "/dev/input/mice"
    Option "Protocol" "ImPS/2"
    Option "ZAxisMapping" "4 5"
    Option "Emulate3Buttons" "true"
EndSection

Section "InputDevice"
    Identifier "stylus"
    Driver "wacom"
    Option "Device" "/dev/input/wacom"
    Option "Type" "stylus"
    Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
    Identifier "eraser"
    Driver "wacom"
    Option "Device" "/dev/input/wacom"
    Option "Type" "eraser"
    Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
    Identifier "cursor"
    Driver "wacom"
    Option "Device" "/dev/input/wacom"
    Option "Type" "cursor"
    Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "Monitor"
    Identifier "SyncMaster"
    Option "DPMS"
    HorizSync 30.0 - 70.0
    VertRefresh 50.0 - 160.0
EndSection

Section "Device"
    Identifier ...

Read more...

Revision history for this message
Peter B (peter3887) wrote :

Hi - Just to say thanks to Josh Stern above - as a newbie I have been struggling with the same problem and the Option "IncludeImplicitMetaModes" "false" fixed it for me
Does anyone have a link to the full list of these options for the nvidia driver ?

Revision history for this message
Rich Johnson (nixternal) wrote :

Seeing as this isn't a KDE issue but rather an NVidia issue, I am going to change the package to linux-restricted-modules-2.6.20 since that was the only kernel revision I saw posted. Thanks

Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10 alpha?

Changed in linux-restricted-modules-2.6.20:
status: New → Incomplete
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in linux-restricted-modules:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.