LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-19-2021, 06:58 AM   #1
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
How to do custom (non EDID) resolution with nvidia BUT works with nv?


I have a Spectre 4K TV which only reports up to 30.00fps on EDID. This means that by default, xrandr only lets me get up to 3840x2160_30.00 with both nv and nvidia.

However, with nv I can easily add a custom modeline using xrandr to get 60fps - 3840x2160_60. The problem is that using nv inevitably crashes my computer, usually within a few minutes.

So, I bit the bullet and installed nvidia. But now I can't add a custom modeline! I get this:

Code:
kuo@cinderella:~$ xrandr --newmode "3840x2160ijk"  533.00  3840 3888 3920 4000  2160 2163 2168 2222 +hsync -vsync
kuo@cinderella:~$ xrandr --addmode DP-1 "3840x2160ijk"
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  18 (RRAddOutputMode)
  Serial number of failed request:  31
  Current serial number in output stream:  32
Searching around, I see suggested solutions involving setting "AllowNonEdidModes" and perhaps a slew of other settings to eliminate nvidia's draconian modeline checking or something. For example:

https://forums.developer.nvidia.com/...hat-i-do/27743

"If you want to use your own modes, the ModeValidation override you want is AllowNonEdidModes, not NoEdidModes (which has no effect since there’s no EDID)."

However, these suggestions all seem to involve editing xorg.conf, which does not exist on my system (Debian 10 Buster amd64). There are a bunch of files and directories in /etc/X11, but no xorg.conf.

I've been trying to figure out if there's a way to alter these settings with xrandr or nvidia-settings, but I haven't had any luck yet.

Any ideas?
 
Old 05-20-2021, 12:30 PM   #2
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546

Original Poster
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Success! Okay, I figured it out with some help on diaspora. First, I had to create an xorg.conf. I did it with X -configure, but maybe I should have used nvidia-xconfig? Here are the steps I used:
Code:
SWITCH TO TEXT CONSOLE WITH CTRL-ALT-F1
LOG IN AS ROOT
service lightdm stop
X -configure
cp -vax xorg.conf.new xorg.conf
vi xorg.conf
cp -vax xorg.conf /etc/X11/xorg.conf
shutdown -r
However, this actually bombed X on my first reboot, because for some reason it put in the line

Driver "nouveau"

instead of

Driver "nvidia"

I had to replace "nouveau" with "nvidia" to get X working again properly.

After confirming after reboot that this xorg.conf worked, I set various options with this line in the Device section (along with Driver "nvidia"):

Code:
Option "ModeValidation" "AllowNon60hzmodesDFPModes, NoEDIDDFPMaxSizeCheck, NoVertRefreshCheck, NoHorizSyncCheck, NoDFPNativeResolutionCheck, NoMaxSizeCheck, NoMaxPClkCheck,  AllowNonEdidModes, NoEdidMaxPClkCheck"
This line basically gets rid of a lot of checks so I can add my own modeline.

To activate 3840x2160 60fps, I run this script:

Code:
#!/bin/sh

# Set custom 4K@60Hz mode; otherwise only up to 30Hz - but note HDMI audio messed up by it
xrandr --newmode             "3840x2160ijk"  533.00  3840 3888 3920 4000  2160 2163 2168 2222 +hsync -vsync
xrandr --addmode DP-1        "3840x2160ijk"
xrandr --output  DP-1 --mode "3840x2160ijk"
 
1 members found this post helpful.
Old 01-14-2024, 01:39 PM   #3
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546

Original Poster
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
I'm bringing this back up, less than 2 years later, to update some stuff.

First off, the only reason I'm here again is because I ran into this same error, with a different monitor/computer, and so I did a search on the error and this was the only hit that looked promising and then I'm like ... "Wait. This is ME. I have no memory of this place."

Anyway, thanks, past me. You helped me fix my problem.

HOWEVER.

This eventually jogged my memories and I have to report that my previous fix wasn't perfect. When I used my fix to force 60Hz on 4K resolution, HDMI sound stopped working. So, I could have either 60Hz OR sound through HDMI, but not both at the same time. So annoying!

Well, my SCEPTRE 4K TV died due to my autistic daughter and some water, and I long forgot about it. Later on, my replacement monitor died (no idea why), and I found out that my SCEPTRE TV actually worked. By then, I'd forgotten about everything before, my created/modified xorg.conf was long gone, and I had a different video card ... whatever, this time the SCEPTRE TV just plain worked. I had 4K@60Hz no problem no fuss.

And so I just forgot about the whole thing.

Anyway, this comment might help someone later on, wondering why HDMI sound isn't working with the customized 4K@60Hz modeline. I never did solve that one, but at least you, the reader, will know it's a thing that can happen.

(In my current situation, I was having a problem with an nvidia card and an old VGA 1280x1024 monitor. No sound through VGA, of course, so no worries there.)
 
Old 01-31-2024, 07:29 AM   #4
ellitedev
LQ Newbie
 
Registered: Jan 2024
Posts: 1

Rep: Reputation: 1
Talking

I want you to know that in 2024 you're still saving people from pulling their hair out .
For those on Pop!_OS trying to find their xorg.conf, the one you'll want to edit can be found here:
Code:
/usr/share/X11/xorg.conf.d/10-nvidia.conf
 
1 members found this post helpful.
Old 01-31-2024, 09:13 AM   #5
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546

Original Poster
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Quote:
Originally Posted by ellitedev View Post
I want you to know that in 2024 you're still saving people from pulling their hair out .
For those on Pop!_OS trying to find their xorg.conf, the one you'll want to edit can be found here:
Code:
/usr/share/X11/xorg.conf.d/10-nvidia.conf
Cool, thanks for the success report and the useful additional info!
 
Old 02-01-2024, 06:52 AM   #6
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,876
Blog Entries: 1

Rep: Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078
When you write "nv", what driver are you referring to?
Code:
# aptitude search g-video
v   xorg-video-abi-25                                                                      -
p   xserver-xorg-video-all                                                                 - X.Org X server -- output driver metapackage
v   xserver-xorg-video-amd                                                                 -
p   xserver-xorg-video-amdgpu                                                              - X.Org X server -- AMDGPU display driver
i A xserver-xorg-video-ati                                                                 - X.Org X server -- AMD/ATI display driver wrapper
p   xserver-xorg-video-cirrus                                                              - X.Org X server -- Cirrus display driver
p   xserver-xorg-video-dummy                                                               - X.Org X server -- dummy display driver
i A xserver-xorg-video-fbdev                                                               - X.Org X server -- fbdev display driver
p   xserver-xorg-video-geode                                                               - X.Org X server -- Geode GX2/LX display driver
p   xserver-xorg-video-glide                                                               - X.Org X server -- Glide display driver
i A xserver-xorg-video-intel                                                               - X.Org X server -- Intel i8xx, i9xx display driver
p   xserver-xorg-video-ivtv                                                                - X.Org X server -- IVTV display driver
p   xserver-xorg-video-ivtv-dbg                                                            - X.Org X server -- IVTV display driver (debug symbols)
p   xserver-xorg-video-mach64                                                              - X.Org X server -- ATI Mach64 display driver
i A xserver-xorg-video-mga                                                                 - X.Org X server -- MGA display driver
v   xserver-xorg-video-modesetting                                                         -
p   xserver-xorg-video-neomagic                                                            - X.Org X server -- Neomagic display driver
i A xserver-xorg-video-nouveau                                                             - X.Org X server -- Nouveau display driver
p   xserver-xorg-video-openchrome                                                          - X.Org X server -- OpenChrome display driver
p   xserver-xorg-video-qxl                                                                 - X.Org X server -- QXL display driver
i A xserver-xorg-video-r128                                                                - X.Org X server -- ATI r128 display driver
i A xserver-xorg-video-radeon                                                              - X.Org X server -- AMD/ATI Radeon display driver
p   xserver-xorg-video-savage                                                              - X.Org X server -- Savage display driver
p   xserver-xorg-video-siliconmotion                                                       - X.Org X server -- SiliconMotion display driver
p   xserver-xorg-video-sisusb                                                              - X.Org X server -- SiS USB display driver
p   xserver-xorg-video-tdfx                                                                - X.Org X server -- tdfx display driver
p   xserver-xorg-video-trident                                                             - X.Org X server -- Trident display driver
i A xserver-xorg-video-vesa                                                                - X.Org X server -- VESA display driver
p   xserver-xorg-video-vmware                                                              - X.Org X server -- VMware display driver
#
I looked in Jessie and Stretch and didn't find xserver-xorg-video-nv there either.
 
Old 02-01-2024, 07:33 AM   #7
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546

Original Poster
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Quote:
Originally Posted by mrmazda View Post
When you write "nv", what driver are you referring to?
It's this one: xserver-xorg-video-nouveau

It's the open source nvidia driver, as opposed to the closed source proprietary driver (that most people use).
 
Old 02-03-2024, 05:17 AM   #8
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,876
Blog Entries: 1

Rep: Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078
Quote:
Originally Posted by IsaacKuo View Post
It's this one: xserver-xorg-video-nouveau
Once upon a time there was an xserver-xorg-video-nv. Some distros catering to older hardware might still offer it.

Quote:
It's the open source nvidia driver, as opposed to the closed source proprietary driver (that most people use).
Functionally, there is not any "the" open source NVidia driver, while technically it is arguably true. Upstream there is a newer, device independent technology (DIX), default X display driver than that from the device dependent (DDX) xf86-video-* series from which xserver-xorg-video-nouveau comes. It's named modesetting, provided by the xorg server package, and used automatically when xserver-xorg-video-nouveau is not installed, or when all xserver-xorg-video-* are not installed, and the GPU is AMD, Intel or NVidia, because it is device independent. e.g.
Code:
# inxi -Gxx --vs
inxi 3.3.32-00 (2024-01-30)
Graphics:
  Device-1: NVIDIA GF108 [GeForce GT 630] vendor: Gigabyte driver: nouveau
    v: kernel arch: Fermi pcie: speed: 2.5 GT/s lanes: 16 ports:
    active: DVI-I-1,VGA-1 empty: HDMI-A-1 bus-ID: 01:00.0 chip-ID: 10de:0f00
    temp: 37.0 C
  Display: x11 server: X.Org v: 21.1.10 compositor: Twin v: 3.0 driver: X:
    loaded: modesetting unloaded: fbdev,vesa dri: nouveau gpu: nouveau
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3600x1200 s-dpi: 120
  Monitor-1: DVI-I-1 pos: primary,left model: NEC EA243WM res: 1920x1200
    dpi: 94 diag: 612mm (24.1")
  Monitor-2: VGA-1 pos: right model: Dell P2213 res: 1680x1050 dpi: 90
    diag: 558mm (22")
  API: EGL v: 1.5 platforms: device: 0 drv: nouveau device: 1 drv: swrast
    gbm: drv: nouveau surfaceless: drv: nouveau x11: drv: nouveau
    inactive: wayland
  API: OpenGL v: 4.3 vendor: mesa v: 23.2.1-1 glx-v: 1.4 es-v: 3.1
    direct-render: yes renderer: NVC1 device-ID: 10de:0f00
#
For more info, see this primer.

I have several NVidia GPUs no longer supported by NVidia's own drivers. All are using the DIX display driver.
 
  


Reply

Tags
edid, nv, nvidia, xorg.conf



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] In Slackware64 current, the custom EDID on DRM works with kernel 4.14.x but not with 4.17.x LuckyCyborg Slackware 7 05-01-2023 10:48 AM
[SOLVED] Debian Buster, Kernel 4.19.x, Need to enforce custom EDID on LG monitor from firmware! jumpingpenguin Linux - Hardware 6 08-16-2020 05:17 AM
custom edid + mode "1920x1080@60" (hsync out of range) jheengut Linux - Hardware 4 08-05-2015 03:41 AM
Incorrect resolution on external monitor w/ custom EDID (Fedora 13, GeForce GT 330M) ESC201 Linux - Software 0 08-03-2010 05:49 PM
Bad Resolution/EDID problem paperbag Slackware 18 07-23-2009 02:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 09:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration