ubuntu22 无法设置 4k 分辨率怎么办?

前言:之前是 ubuntu20.04,安装 ubuntu20.04 的时候,用的还是 2k 显示器,所以就一直是 2k 分辨率,但是后来换了 4k 显示器之后,ubutu20 还是最高只能 2k,折腾了半天也设置不了 4k,后来就一直忍了!

但是后来因为,我安装的是双系统,win+ubuntu,我把 win 删了之后,ubuntu 就只能 768p 了,连 2k 都没有了。

一通操作之后,我只能升级到了 ubuntu22


原本是 ubuntu20.04 , 我通过 sudo do-release-upgrade 命令升级到了 ubuntu22.04

我通过设置 https://blog.csdn.net/u013764485/article/details/78007370 这个教程修改分辨率

╰─➤  cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=1920x1080
GRUB_GFXPAYLOAD_LINUX=1920x1080


# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

设置为 1080P 可以正常显示

但是我改成 3840x2160,反而变成了 768P!

GRUB_GFXMODE=3840x2160
GRUB_GFXPAYLOAD_LINUX=3840x2160

xrandr 显示如下:

╰─➤  xrandr                   
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 1920 x 1080, current 1920 x 1080, maximum 1920 x 1080
default connected primary 1920x1080+0+0 0mm x 0mm
   1920x1080     77.00* 

我的 CPU 是 amd5700g(没有配独立显卡,因为 amd5700g 只带了集成显卡vega8)

─➤  lscpu
架构:                   x86_64
  CPU 运行模式:         32-bit, 64-bit
  Address sizes:         48 bits physical, 48 bits virtual
  字节序:               Little Endian
CPU:                     16
  在线 CPU 列表:        0-15
厂商 ID:                AuthenticAMD
  型号名称:             AMD Ryzen 7 5700G with Radeon Graphics
    CPU 系列:           25
    型号:               80
    每个核的线程数:     2
    每个座的核数:       8
    座:                 1
    步进:               0
    Frequency boost:     enabled
    CPU 最大 MHz:       4673.0000
    CPU 最小 MHz:       400.0000
    BogoMIPS:           7585.66
    标记:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm cons
                         tant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16
                         c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext p
                         erfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a rdseed adx smap clf
                         lushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd cppc arat
                          npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip pku osp
                         ke vaes vpclmulqdq rdpid overflow_recov succor smca fsrm
Virtualization features: 
  虚拟化:               AMD-V
Caches (sum of all):     
  L1d:                   256 KiB (8 instances)
  L1i:                   256 KiB (8 instances)
  L2:                    4 MiB (8 instances)
  L3:                    16 MiB (1 instance)
NUMA:                    
  NUMA 节点:            1
  NUMA 节点0 CPU:       0-15
Vulnerabilities:         
  Itlb multihit:         Not affected
  L1tf:                  Not affected
  Mds:                   Not affected
  Meltdown:              Not affected
  Mmio stale data:       Not affected
  Retbleed:              Not affected
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl and seccomp
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:            Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP always-on, RSB filling, PBRSB-eIBRS Not affected
  Srbds:                 Not affected
  Tsx async abort:       Not affected

主板是 微星的 B450M-MORTAR-MAX,链接: https://www.msi.com/Motherboa...

显示器是 dell 的 P2723 ,链接:https://item.jd.com/100050153...

阅读 4.4k
2 个回答

问题已解决,重装系统就好了

之前是通过 ubuntu20 升级上来的,问题多到解决不了,索性重装为 ubuntu22

一切问题都消失了

在登录输入密码的界面,右下角有一个设置按钮,把Ubuntu换成Ubuntu on Xorg试试。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题