问题
当我启动 Ubuntu 时,紫色的登录屏幕非常像素化。登录后,显示非常好。
背景
我的系统使用旧显卡,NVIDIA 8800 GT。当我最初安装 Ubuntu 时,使用默认的 Nouveau 驱动程序启动过程失败,所以我启动了nomodeset
(这会拉长屏幕但它可以工作)。然后我安装了 GPU ( sudo apt install nvidia-340
) 支持的专有 nvidia 驱动程序。nvidia 驱动程序允许计算机启动,但屏幕像素化。我相信这是因为显卡只支持 1080p 的 60Hz 输出,而我的显示器在 144Hz 时是 1080p。
尝试的解决方案
我尝试在终端中将刷新率设置为 60Hz,但收到一条错误消息:
xrandr -s 1920x1080 -r 60
# Output
# > Rate 60.00 Hz not available for this size
然后我尝试在 Ubuntu 设置中手动将刷新率设置为 60Hz。这似乎解决了问题,但重启后,紫色的登录屏幕仍然非常像素化。但是,登录后,显示效果很好。
我还尝试在 NVIDIA X Server 程序中将刷新率设置为 60Hz,但这并没有起到任何作用。(我还在程序中保存了 60Hz 配置,/etc/X11/xorg.conf
因为我认为它可能会在登录之前加载。重新启动时它仍然没有做任何事情。)
最后,我xrandr
再次尝试,但使用了输出参数:
xrandr --output DVI-I-2 --size 1920x1080 --refresh 60
没有错误消息,但它仍然没有工作。我也尝试将相同的命令作为启动程序,但同样没有发生任何事情。
诊断信息
- 显示器:宏碁 XV240Y (144Hz@1920x1080)
- 显示器连接:DVI 从 GPU 到 HDMI 适配器到显示器
- 显卡:英伟达 8800 GT
- 英伟达驱动版本:340.108
我可以根据需要提供更多详细信息。
日志文件/命令输出
# sudo systemctl status display-manager
* gdm.service - GNOME Display Manager
Loaded: loaded (/lib/systemd/system/gdm.service; static; vendor preset: enabled)
Active: active (running) since Tue 2021-02-16 19:52:47 PST; 19min ago
Process: 27678 ExecStartPre=/usr/share/gdm/generate-config (code=exited, status=0/SUCCESS)
Process: 27708 ExecStartPre=/usr/lib/gdm3/gdm-wait-for-drm (code=exited, status=0/SUCCESS)
Main PID: 27717 (gdm3)
Tasks: 3 (limit: 19072)
Memory: 8.0M
CGroup: /system.slice/gdm.service
└─27717 /usr/sbin/gdm3
Feb 16 19:52:47 desktop systemd[1]: Starting GNOME Display Manager...
Feb 16 19:52:47 desktop systemd[1]: Started GNOME Display Manager.
Feb 16 19:52:47 desktop gdm-launch-environment][27773]: pam_unix(gdm-launch-environment:session): session opened for user gdm by (uid=0)
Feb 16 19:52:54 desktop gdm-password][28089]: pam_unix(gdm-password:auth): Couldn't open /etc/securetty: No such file or directory
Feb 16 19:52:56 desktop gdm-password][28089]: pam_unix(gdm-password:auth): Couldn't open /etc/securetty: No such file or directory
Feb 16 19:52:56 desktop gdm-password][28089]: gkr-pam: unable to locate daemon control file
Feb 16 19:52:56 desktop gdm-password][28089]: gkr-pam: stashed password to try later in open session
Feb 16 19:52:56 desktop gdm-password][28089]: pam_unix(gdm-password:session): session opened for user felix by (uid=0)
Feb 16 19:52:56 desktop gdm-password][28089]: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring
# cat /var/log/gpu-manager.log
log_file: /var/log/gpu-manager.log
last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
can't access /opt/amdgpu-pro/bin/amdgpu-pro-px
Looking for nvidia modules in /lib/modules/5.8.0-43-generic/updates/dkms
Found nvidia module: nvidia.ko
Looking for amdgpu modules in /lib/modules/5.8.0-43-generic/updates/dkms
Is nvidia loaded? yes
Was nvidia unloaded? no
Is nvidia blacklisted? no
Is intel loaded? no
Is radeon loaded? no
Is radeon blacklisted? no
Is amdgpu loaded? no
Is amdgpu blacklisted? no
Is amdgpu versioned? no
Is amdgpu pro stack? no
Is nouveau loaded? no
Is nouveau blacklisted? yes
Is nvidia kernel module available? yes
Is amdgpu kernel module available? no
Vendor/Device Id: 10de:611
BusID "PCI:6@0:0:0"
Is boot vga? yes
Skipping "/dev/dri/card0", driven by "nvidia-drm"
Skipping "/dev/dri/card0", driven by "nvidia-drm"
Skipping "/dev/dri/card0", driven by "nvidia-drm"
Skipping "/dev/dri/card0", driven by "nvidia-drm"
Does it require offloading? no
last cards number = 1
Has amd? no
Has intel? no
Has nvidia? yes
How many cards? 1
Has the system changed? No
Single card detected
Nothing to do
删除后nvidia-340
# new gpu-manager.log
log_file: /var/log/gpu-manager.log
last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
can't access /run/u-d-c-nvidia-was-loaded file
can't access /opt/amdgpu-pro/bin/amdgpu-pro-px
Looking for nvidia modules in /lib/modules/5.8.0-43-generic/updates/dkms
Looking for amdgpu modules in /lib/modules/5.8.0-43-generic/updates/dkms
Is nvidia loaded? no
Was nvidia unloaded? no
Is nvidia blacklisted? no
Is intel loaded? no
Is radeon loaded? no
Is radeon blacklisted? no
Is amdgpu loaded? no
Is amdgpu blacklisted? no
Is amdgpu versioned? no
Is amdgpu pro stack? no
Is nouveau loaded? no
Is nouveau blacklisted? yes
Is nvidia kernel module available? no
Is amdgpu kernel module available? no
Vendor/Device Id: 10de:611
BusID "PCI:6@0:0:0"
Is boot vga? yes
Error: can't access /sys/bus/pci/devices/0000:06:00.0/driver
The device is not bound to any driver.
Error : Failed to open /dev/dri
Error : Failed to open /dev/dri
Error : Failed to open /dev/dri
Error : Failed to open /dev/dri
Does it require offloading? no
last cards number = 1
Has amd? no
Has intel? no
Has nvidia? yes
How many cards? 1
Has the system changed? No
Single card detected
Nothing to do
如何让登录屏幕以 60Hz 的频率加载?任何帮助,将不胜感激。谢谢!
绕过登录屏幕怎么办?
https://techpiezo.com/linux/enable-or-disable-automatic-login-in-ubuntu-20-04/
或者,您可以按 Ctrl Alt F3 退出图形屏幕以进行文本登录。
我想知道您是否使用以下命令获得有关显示管理器的任何有用信息:systemctl status display-manager
抱歉——你有文件 /lib/systemd/system/gpu-manager.service 吗?
我最终只是将我的 GPU 升级到稍微旧一点的 Radeon 卡。
amdgpu
默认驱动程序一切正常。这可能不是一个很令人满意的结论,但是经过大量的挖掘,我找不到问题的根源。
感谢@mondotofu 在此过程中帮助我。