# Screen Sizing on Laptop with Nvidia Driver



## k3y5 (May 28, 2020)

I've recently been able to get the Nvidia driver setup and working. The laptop (thinkpad p72) has two vgapci devices, one intel, and the other nvidia.

Now, I can't seem to get the screen size correct (1920x1080), its stuck on an unreasonable small 3840x2160. I'm not sure what to do to get the screen size to resolve itself. The only way I can get a semi-correct screen is to use: `xrandr -s 1920x1080` which blows up the DWM tool bar, and looks generally silly.


```
Section "Device"
        Identifier      "NVIDIA"
        Driver          "nvidia"
        #BusID          "PCI:0:1:0"
        VendorName      "NVIDIA Corporation"
EndSection

Section "Screen"
        Identifier      "Screen0"
        Device          "NVIDIA"
        Monitor         "Monitor0"
        DefaultDepth    24
        #Option                 "AddARGBGLXVisuals" "True" #3d virtualization
        #Option                 "ConnectedMonitor" "DP-2"
        #Option                 "UseDisplayDevice" "DP-2"
        #Option                 "IgnoreEDID" "True"
        #Option                 "MetaModes" "DP-2:1920x1080+0+0"
        SubSection      "Display"
                #Depth  24
                Modes   "1920x1080_60"
        EndSubSection
EndSection

#Section "Module"
#       Load            "glx"
#EndSection

Section "Monitor"
        Identifier      "Monitor0"
        Gamma           1
        ModeLine        "1920x1080_60.00"  172.80  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync
EndSection

Section "Device"
        Identifier      "Device0"
        Option          "SWCursor" "true"
EndSection


#### RC.CONF ####
# Install configs
sshd_enable="YES"
moused_enable="YES"
ntpdate_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
accounting_enable="yes"

# Intel Graphic Card
kld_list="/boot/modules/i915kms.ko"

# Display Dependencies
dbus_enable="YES"
# hald_enable="YES"
dwm_enable="YES"

# Tor browser
# tor_enable="YES"

# SCBUS I/O operations
smbus_load="YES"
ichsmb_load="YES"

# NVIDIA DRIVER
nvidia_modeset_load="YES"
kld_list="nvidia-modeset"

#### /BOOT/LOADER.CONF ####

security.bsd.allow_destructive_dtrace=0

kern.vty=vt
kern.vt.default_mode="1980x1080"
kern.vt.fb.default_mode="1980x1080"

i915kms_load="YES"
# nvidia_modeset_load="YES"
```


The commented out code in the X11 config files were configurations that were unsuccessful at updating the screen resolution correctly. I've tried to load the intel, and nvidia drivers. If I load the intel driver I get weird mouse issues. If I load the Nvidia driver, the screen resolution is set at the 'HD default,' (3840x2160). When I run `xrandr` I get a couple different display variables:


```
DP-0 disconnected . . .
DP-1 disconnected . . .
HDMI-0 disconnected . . .
DP-2 connection . . .
  3840x2160
DP-3 disconnected . . .
DP-4 disconnected . . .
```

I'm not sure what to do, to get the correct default screen resolution (1920x1080) to load when running `startx`.


----------



## shkhln (May 28, 2020)

Xrandr? You just select the desired resolution in `nvidia-settings`.



k3y5 said:


> which blows up the DWM tool bar



Probably needs restart.



k3y5 said:


> looks generally silly



3840x2160 _is_ the correct resolution, whether you like it or not and some programs might be already scaled according to the screen PPI.


----------



## k3y5 (May 28, 2020)

shkhln said:


> Xrandr? You just select the desired resolution in `nvidia-settings`.
> 
> 
> 
> ...



I'll checkout nvidia-settings, but I thought that the screen resolution was controlled via the X11 config. Good to know. 

Yeah, I understand that it may be the correct resolution. I can't read anything on the screen though. The fonts are crazy small. 

Thank you shkhln


----------



## k3y5 (May 28, 2020)

nvidia-settings was a fix-all: thank you. 

I was trying to dig through: 
- https://github.com/NVIDIA/nvidia-settings
- https://svnweb.freebsd.org/ports/head/x11/nvidia-settings/
Then finally went to the man page. `man nvidia-settings`

All I needed to do was `nvidia-settings` as a standalone. Ah, got it.


----------

