V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
weixiangzhe
V2EX  ›  问与答

Linux 下, hipdi 高分屏外接显示器显示怎么整啊?

  •  
  •   weixiangzhe · Feb 4, 2017 · 8311 views
    This topic created in 3378 days ago, the information mentioned may be changed or developed.

    说下我现在的环境 archlinux kde 桌面,内部显示器 2560x1440 ,外接显示器 1920x1080

    已经开启了 hidpi ,在没有接入外接显示器时使用还是可以的,除了 gtk 程序输入法会跑偏,接入外接显示后,因为是两倍优秀化,外接显示器分辨率变成了 960x540,内接显示器为 1280x720 。。。


    然后我查了 arch 的 wiki ,有条目hidpi

    大体上是使用 xrandr 调整,但是提供的几个方案大都有些问题的说

    • 方案一
    xrandr --output eDP-1 --auto --output DP-1 --auto --scale 2x2 --right-of eDP-1
    

    wiki 里也提到了这个问题,就是把外接显示器放大 2x2 后,鼠标只能控制到左上角 1/4 的部分

    • 方案二
    xrandr --output eDP-1 --auto --output HDMI-1 --auto --panning 3840x2160+3840+0 --scale 2x2 --right-of eDP-1
    
    

    使用 pinning 这个,在外接显示器就多出了滚动条,只能显示 1/4 的部分,

    • 方案三
    xrandr --output eDP-1 --auto --pos 0x1458 --output HDMI-1 --scale 1.35x1.35 --auto --pos 0x0 --fb 2592x2898
    

    方案三显示倒是挺下常,但是外接显器的分辨率按上面的设置后只有 1280x720 ,然后它的位置居然在内置显示器的上面,而不是一般情况下的左右两边


    上面是 arch wiki 的方案,我现在有点蒙了, v 友们都是怎么整的呢?

    Supplement 1  ·  Feb 4, 2017

    ok了,wiki还有个方案。。

    Supplement 2  ·  Jan 22, 2021
    加几条

    3200x1800 在左,1920x1080 在右

    ```
    xrandr --output eDP1 --primary --mode 3200x1800 --pos 0x0 --rotate normal --output DP1 --mode 1920x1080 --pos 3200x0 --rotate normal --scale 1x1 --scale 2x2')
    ```


    3200x1800 在右,1920x1080(19:10) 在左
    ```
    xrandr --output eDP1 --primary --mode 3200x1800 --pos 3200x0 --rotate normal --output DP1 --mode 1920x1080 --pos 0x0 --rotate normal --scale 1x1 --scale 2x2')
    ```
    14 replies    2023-06-26 21:56:27 +08:00
    weixiangzhe
        1
    weixiangzhe  
    OP
       Feb 4, 2017
    ok 了,还是 wiki 的方案。。。 wiki 还有个链接,这个是 ok 的
    https://gist.github.com/wvengen/178642bbc8236c1bdb67
    写入到 xprofile 里就好了
    skydiver
        2
    skydiver  
       Feb 4, 2017 via Android   ❤️ 1
    换成 gnome ,直接支持两个显示器不同 DPI ,不折腾
    bigpigeon
        3
    bigpigeon  
       Feb 4, 2017
    @skydiver 我想问一下,我的 ubuntu16.04 自从装了 nvidia 的官方驱动副显示器就检测不到了
    我 2 个显示器是插在一个显卡上的,其中插 VGA 的接口的显示器没法用
    这是 gnome 的 BUG 还是 nvidia 驱动的问题
    skydiver
        4
    skydiver  
       Feb 4, 2017
    @bigpigeon ubuntu 不是 Unity 么,不懂
    strahe
        5
    strahe  
       Feb 4, 2017
    我也是 arch , kde , 你什么机器内部显示 2560x1440 ?
    jarlyyn
        6
    jarlyyn  
       Feb 4, 2017
    可以 xrandr 双倍缩放

    但我最后还是用了非 hidpi 分辨率
    bigpigeon
        7
    bigpigeon  
       Feb 5, 2017
    @skydiver 那可能是显卡驱动的问题,不过可能因为我 install 过 gnome 所以总是有 gnome crash 报告,我还以为用的是 gnome
    weixiangzhe
        8
    weixiangzhe  
    OP
       Feb 7, 2017 via iPhone
    @skydiver gnome 用的 gtk ,输入法偏移的厉害, kde 好的多,而且我就是从 gnome 过来的
    weixiangzhe
        9
    weixiangzhe  
    OP
       Feb 7, 2017 via iPhone
    @strahe 改装的 t430s
    weixiangzhe
        10
    weixiangzhe  
    OP
       Feb 7, 2017 via iPhone
    @jarlyyn 问题是 1080 勉强能看,然而我的是 1440p 的 14 寸本
    jarlyyn
        11
    jarlyyn  
       Feb 7, 2017
    @weixiangzhe

    我还是 rmbp 呢。。。。

    有接非 hidpi 的需求的话,实际上最后还是连笔记本都不用 hidpi 更让眼睛容易习惯。
    deitymon
        12
    deitymon  
       Dec 22, 2017
    @skydiver 请问,gnome 在不同显示器设置不同 dpi 的功能是在哪里打开的呢?我现在的版本是 Ubuntu17.10 ,gnome3.26.1,没看到有你说的那个功能
    skydiver
        13
    skydiver  
       Dec 23, 2017 via Android
    @deitymon 应该是根据显示器的信息自动识别的吧…我好像没有改过
    Cu635
        14
    Cu635  
       Jun 26, 2023
    @skydiver #2
    是 gnome 的特性还是 wayland 的特性?除了 gnome 还有啥桌面环境可以做到么?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5652 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 127ms · UTC 07:41 · PVG 15:41 · LAX 00:41 · JFK 03:41
    ♥ Do have faith in what you're doing.