You are not logged in.

#1 2022-09-24 15:11:05

JonatHam
Member
Registered: 2022-04-24
Posts: 14

Nvidia dual monitors conf and Sound system problem

Hello, I have encountered two problems.

The first problem: I'm using dwm and I used to use the Intel gpu to drive my dual display layout. At present, I want to transfer my work of video editing to Archlinux, so I want to use my NVIDIA card on the laptop to drive graghic, but when I tried several times on the manual setting, I still cannot configure my desktop layout according to the configuration file when I boot into system. This makes it inconvenient to work;

The second question: My sound system sometimes fails. I use the ALSA sound system. When I unplug the external display cable to connect to other devices, and then connect the external display back again, the sound will disappear. I tried to use systemctl to restart the ALSAMIXER, but it did not work. After several times of restarts, the sound came back.

The help to me will be grateful. The following is my NVIDIA configuration file:

/etc/X11/xorg.conf.d/90-nvidia.conf

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "screen0"
    Screen 1 "screen1"
    Inactive "intel"
EndSection

Section "Monitor"
	Identifier "eDP-1-1"
	Option	"Primary" "true"
	# Option	"DPMS" "true"
	# Option	"PreferredMode" "1920x1080"
	# Option	"Position" "1080 420"
EndSection

Section "Monitor"
	Identifier "HDMI-0"
	Option	"Rotate" "left"
	# Option	"DPMS" "true"
	# Option	"PreferredMode" "1920x1080"
	Option	"Position" "0 0"
EndSection

Section "Screen"
    Identifier "screen0"
    Device	"nvidia0"
    Monitor "eDP-1-1"
EndSection

Section "Screen"
    Identifier "screen1"
    Device	"nvidia1"
    Monitor "HDMI-0"
EndSection

Section "Device"
    Identifier "nvidia0"
    Driver	"nvidia"
    BusID	"PCI:1:0:0"
    # Option	"ConnectedMonitor" "HDMI-0,eDP-1-1"
EndSection

Section "Device"
    Identifier "nvidia1"
    Driver	"nvidia"
    BusID	"PCI:1:0:0"
    # Option	"ConnectedMonitor" "HDMI-0,eDP-1-1"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0:2:0"
EndSection

10-nvidia-drm-outputclass.conf

Section "OutputClass"
    Identifier "intel"
    MatchDriver "i915"
    Driver "modesetting"
EndSection

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "PrimaryGPU" "yes"
    ModulePath "/usr/lib/nvidia/xorg"
    ModulePath "/usr/lib/xorg/modules"
EndSection

~/.xinitrc

# Display and wallpaper
nitrogen --restore &
picom &

# Enable Chinese
export LANG=zh_CN.UTF-8
fcitx5 -d

# Configure nvidia by xinit
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --output eDP-1-1 --primary --mode 1920x1080 --pos 1080x420 --rotate normal --output HDMI-0 --mode 1920x1080 --pos 0x0 --rotate left

# Execute window manager
exec dwm

# Set nvidia dual monitors backup
# nvidia-settings --assign "CurrentMetaMode=DPY-4: nvidia-auto-select @1080x1920 +0+0 {ViewPortIn=1080x1920, ViewPortOut=1920x1080+0+0, Rotation=90}"

Offline

Board footer

Powered by FluxBB