当前位置: 首页 > news >正文

Ubuntu20.04或者Ubuntu24.04 TypeC-连接屏幕不显示问题

一、环境

设备:机械革命苍龙16 Ultra
显卡:NVIDA GeForce RTX 5080
系统:windows11+Ubuntu24.04的双系统
显示器:笔记本显示器+redmi 显示器A27Q(使用的type-c接口)+ HKC OVERSEAS LIMITED27
驱动:nvidia-driver-580

二、存在问题。

HKC显示器用HDMI连接,可以直接显示,而redmi显示器用typec连接笔记本但是不显示,而在windows系统下是可以显示。只有在Ubuntu下不显示。

三、解决方案

使用命令:prime-select query,查询得到当前的结果为on-demand。
使用命令:sudo prime-select nvidia,强行修改使用nvidia进行显示器的驱动。

文件:sudo gedit /usr/share/X11/xorg.conf.d/10-nvidia.conf的内容如下:

# This xorg.conf.d configuration snippet configures the X server to
# automatically load the nvidia X driver when it detects a device driven by the
# nvidia-drm.ko kernel module.  Please note that this only works on Linux kernels
# version 3.9 or higher with CONFIG_DRM enabled, and only if the nvidia-drm.ko
# kernel module is loaded before the X server is started.Section "OutputClass"Identifier     "nvidia"MatchDriver    "nvidia-drm"Driver         "nvidia"Option "AllowEmptyInitialConfiguration"ModulePath "/usr/lib/x86_64-linux-gnu/nvidia/xorg"
EndSection

文件:sudo gedit /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=0
GRUB_DISTRIBUTOR=`( . /etc/os-release; echo ${NAME:-Ubuntu} ) 2>/dev/null || echo Ubuntu`GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia.NVreg_RegistryDwords=EnableBrightnessControl=1"
GRUB_CMDLINE_LINUX=""# If your computer has multiple operating systems installed, then you
# probably want to run os-prober. However, if your computer is a host
# for guest OSes installed via LVM or raw disk devices, running
# os-prober can cause damage to those guest OSes as it mounts
# filesystems to look for things.
#GRUB_DISABLE_OS_PROBER=false# 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_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=640x480# 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"

将grub文件中GRUB_CMDLINE_LINUX_DEFAULT行的nomodeset关键字删除。
此文件修改之后,需要使用命令:sudo update-grub,更新以使其生效。

参考链接https://blog.csdn.net/u014587123/article/details/128519833

http://www.dtcms.com/a/389161.html

相关文章:

  • 【SQLSERVER】SQL Server 表导出与导入
  • postgresql和mongodb谁的地位更高
  • RK3588+复旦微JFM7K325T工业控制解决方案
  • RabbitMQ全方位解析
  • 云望无人机图传原理,无人机图传方式哪种好
  • 无人机50公里遥控模块技术要点与难点
  • 【三维重建】Octree-GS:基于LOD的3DGS实时渲染(TPAMI2025)
  • 《深度拆解3D开放世界游戏中角色攀爬系统与地形碰撞网格动态适配的穿透卡顿复合故障》
  • 数据库mysql连接池:从原理到实践的全面解析
  • # 深入理解栈、栈帧与递归:从迭代与递归归并排序双视角解析
  • Django 完整项目开发:博客系统
  • FPGA部署视觉模型
  • 课后实验实验拓扑:
  • 二阶段 docker 构建
  • React原理二
  • 116.block design 设计中设置的DDR起始地址的作用是什么
  • 报名中|2025 Maple 用户大会
  • 深入解析Channel:数据流动的秘密通道
  • 一键快速发布服务
  • 栈-394.字符串解码-力扣(LeetCode)
  • 【数据库】视图与表的区别:深入理解数据库中的虚拟表
  • 保障货物安全:商贸物流软件的实时追踪与风险预警机制​
  • 第二部分:VTK核心类详解(第23章 vtkInteractor交互器类)
  • 【LeetCode】45. 跳跃游戏 II
  • 【C++进阶】C++11的新特性—右值引用和移动语义
  • AssemblyScript 入门教程(4)AssemblyScript 编译器选项与高级应用指南
  • rust编写web服务09-分页与搜索API
  • 时空预测论文分享:元学习 神经架构搜索 动态稀疏训练 提示未来快照
  • 新服务器安装宝塔,发布前后端分离项目
  • [科普] 零中频发射架构的本振泄露校准技术