GUI界面偶尔出现鼠标指针偏移

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
tommy0607
帖子: 7
注册时间: 2017-11-13 15:17
系统: Android 8.0

GUI界面偶尔出现鼠标指针偏移

#1

帖子 tommy0607 » 2017-11-13 15:23

如题,就是鼠标出现的位置与实际触发的位置不一样,也不是总是出现,有时候软件用着用着就出现这个问题了,然后重启软件又恢复了,或者把软件最小化再打开也有一定几率恢复(不是单个软件的问题,像AS,CodeBlocks都有这个问题)
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: GUI界面偶尔出现鼠标指针偏移

#2

帖子 poloshiao » 2017-11-13 16:27

1. 把下面指令 複製 貼進終端機 執行
1-1. sudo cat /etc/os-release
1-2. echo $DESKTOP_SESSION
1-3. sudo lshw -numeric -class video
把結果直接複製貼上來
目的 了解一下 是否 顯卡驅動 引起的
tommy0607
帖子: 7
注册时间: 2017-11-13 15:17
系统: Android 8.0

Re: GUI界面偶尔出现鼠标指针偏移

#3

帖子 tommy0607 » 2017-11-13 17:22

还有就是虽然软件界面指针偏移,但左边的启动器和上面的时间wifi电量什么的没问题
tommy0607
帖子: 7
注册时间: 2017-11-13 15:17
系统: Android 8.0

Re: GUI界面偶尔出现鼠标指针偏移

#4

帖子 tommy0607 » 2017-11-13 18:59

poloshiao 写了:1. 把下面指令 複製 貼進終端機 執行
1-1. sudo cat /etc/os-release
1-2. echo $DESKTOP_SESSION
1-3. sudo lshw -numeric -class video
把結果直接複製貼上來
目的 了解一下 是否 顯卡驅動 引起的

第一个输出:
NAME="Ubuntu"
VERSION="16.04.3 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.3 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial

第二个输出ubuntu

第三个输出:
*-display
description: VGA compatible controller
product: Sky Lake Integrated Graphics [8086:1916]
vendor: Intel Corporation [8086]
physical id: 2
bus info: pci@0000:00:02.0
version: 07
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:125 memory:b0000000-b0ffffff memory:a0000000-afffffff ioport:5000(size=64) memory:c0000-dffff
*-display
description: Display controller
product: Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330] [1002:6660]
vendor: Advanced Micro Devices, Inc. [AMD/ATI] [1002]
physical id: 0
bus info: pci@0000:01:00.0
version: 83
width: 64 bits
clock: 33MHz
capabilities: pm pciexpress msi bus_master cap_list rom
configuration: driver=radeon latency=0
resources: irq:126 memory:90000000-9fffffff memory:b1300000-b133ffff ioport:4000(size=256) memory:b1340000-b135ffff
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: GUI界面偶尔出现鼠标指针偏移

#5

帖子 poloshiao » 2017-11-14 10:58

VERSION="16.04.3 LTS (Xenial Xerus)"
sudo lshw -numeric -class video
product: Sky Lake Integrated Graphics [8086:1916]
configuration: driver=i915 latency=0
product: Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330] [1002:6660]
configuration: driver=radeon latency=0
1. 雙顯卡
1-1. Sun XT 作用中 開源驅動 radeon

2. 參閱
2-1. https://askubuntu.com/questions/895386/ ... untu-16-04
Drivers for AMD Radeon R5 M330 on Ubuntu 16.04
2-2. https://askubuntu.com/questions/791249/ ... untu-16-04
AMD-INTEL hybrid graphics on Ubuntu 16.04
tommy0607
帖子: 7
注册时间: 2017-11-13 15:17
系统: Android 8.0

Re: GUI界面偶尔出现鼠标指针偏移

#6

帖子 tommy0607 » 2017-11-15 9:12

1. 雙顯卡
1-1. Sun XT 作用中 開源驅動 radeon
这第一步是要我干啥?
2. 參閱
2-1. https://askubuntu.com/questions/895386/ ... untu-16-04
Drivers for AMD Radeon R5 M330 on Ubuntu 16.04
2-2. https://askubuntu.com/questions/791249/ ... untu-16-04
AMD-INTEL hybrid graphics on Ubuntu 16.04
这个第二步是 我参阅文章仍然不知道如何解决。我是linux小白,求帮助 :Adore
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: GUI界面偶尔出现鼠标指针偏移

#7

帖子 poloshiao » 2017-11-15 11:43

sudo lshw -numeric -class video
product: Sky Lake Integrated Graphics [8086:1916]
configuration: driver=i915 latency=0
product: Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330] [1002:6660]
configuration: driver=radeon latency=0
1. 雙顯卡 AMD 顯卡 必需安裝 閉源驅動 fglrx
1-1. https://wiki.ubuntu.com/X/Config/Hybrid ... quirements
Hardware Requirements
AMD systems:
A graphics card compatible with the fglrx driver 13.101 series or higher.
An integrated Intel card.
A MUXless system with an Intel or an AMD integrated card and an AMD discrete card.

2. 但是 Ubuntu 16.04 不支援 閉源驅動 fglrx
2-1. http://forum.ubuntu.com.cn/viewtopic.ph ... x#p3157378
自 Ubuntu 16.04 LTS 開始 Ubuntu 將棄用閉源驅動 fglrx (Catalyst Crimson) 鼓勵使用者採用 開源驅動 Radeon
2-2. Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330]
也沒有 for Linux 的 閉源驅動 可以下載
3-2-1. http://support.amd.com/en-us/download
Manually Select Your Driver
見 附圖一 及 附圖二
product: Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330] [1002:6660]
configuration: driver=radeon latency=0
3. AMD 顯卡 目前作用中 驅動 開源驅動 radeon
3-1. 但是
Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330]
不在目前 開源驅動 radeon 支援名單內
https://help.ubuntu.com/community/RadeonDriver
RadeonDriver
product: Sky Lake Integrated Graphics [8086:1916]
configuration: driver=i915 latency=0
4. 建議
4-1. 16.04 把
Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330]
關閉
只使用 Intel
product: Sky Lake Integrated Graphics [8086:1916]
configuration: driver=i915 latency=0
4-1-1. 如果不知如何關閉 參閱
https://help.ubuntu.com/community/Hybri ... switcheroo
4-1-2. 或者 從 Bios 看看 有沒有 把 Discrete Card 設為 disabled 的選項
4-2. Intel 公司 提供下載網頁 提供 支援 i915 的程式套件
https://01.org/linuxgraphics/downloads/ ... -os-v2.0.2
Intel Graphics Update Tool for Linux* OS v2.0.2

5. 其它發展中的驅動 (是否支援 還須查查) 還不推薦新手試用
5-1. Vulkan
5-2. boinc-client-fglrx
5-2-1. https://packages.ubuntu.com/search?suit ... chon=names
5-3. AMDGPU
5-4. AMDGPU-Pro
5-5. 有興趣試試 再貼文
附件
附圖一 下載 閉源驅動
附圖一 下載 閉源驅動
附圖二 沒有 for Linux
附圖二 沒有 for Linux
tommy0607
帖子: 7
注册时间: 2017-11-13 15:17
系统: Android 8.0

Re: GUI界面偶尔出现鼠标指针偏移

#8

帖子 tommy0607 » 2017-11-16 11:29

4-1-1. 如果不知如何關閉 參閱
https://help.ubuntu.com/community/Hybri ... switcheroo
4-1-2. 或者 從 Bios 看看 有沒有 把 Discrete Card 設為 disabled 的選項
这个。。我看了半天网页没看懂怎么关闭这个显卡,bios里面也没找到这个选项,尴尬
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: GUI界面偶尔出现鼠标指针偏移

#9

帖子 poloshiao » 2017-11-16 14:43

我看了半天网页没看懂怎么关闭这个显卡
先詳看這一段 確認 是否可以使用 vga_switcheroo 幫你啟用/關閉 獨顯 discrete graphics (簡稱 DIS)
https://help.ubuntu.com/community/Hybri ... switcheroo
Enabling vga_switcheroo
一般 從 2.6 以後的 Linux Kernel 應該都支援
tommy0607
帖子: 7
注册时间: 2017-11-13 15:17
系统: Android 8.0

Re: GUI界面偶尔出现鼠标指针偏移

#10

帖子 tommy0607 » 2017-11-17 10:34

poloshiao 写了:先詳看這一段 確認 是否可以使用 vga_switcheroo 幫你啟用/關閉 獨顯 discrete graphics (簡稱 DIS)
https://help.ubuntu.com/community/Hybri ... switcheroo
Enabling vga_switcheroo
一般 從 2.6 以後的 Linux Kernel 應該都支援
这一步我已经完成了,应该是可以使用vga_switcheroo了,然后下一步是什么?
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: GUI界面偶尔出现鼠标指针偏移

#11

帖子 poloshiao » 2017-11-17 17:10

这一步我已经完成了,应该是可以使用vga_switcheroo了,然后下一步是什么?
把下面的指令 複製 貼進終端機 執行
1. sudo cat /sys/kernel/debug/vgaswitcheroo/switch
2. xrandr --listproviders
把結果直接複製 貼上來
Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330]
3. 補充
雙顯卡的獨顯 分為 Muxed 與 Muxless
關閉 獨顯的方法 有區別
3-1. 意思是 查閱你的顯卡規格說明書
確認看看 你的顯卡是 Muxed 還是 Muxless
3-1-1. Muxed
https://zh.wikipedia.org/wiki/%E6%95%B0 ... 9%E5%99%A8
multiplexer,簡稱:MUX
3-1-2. Muxless
即 不是 3-1 的 Muxed
3-2. 參閱
https://forums.linuxmint.com/viewtopic. ... 9&t=139413
[HOWTO] ATI hybrid graphics with open source radeon driver
MUXED SYSTEMS:
MUXLESS SYSTEMS
tommy0607
帖子: 7
注册时间: 2017-11-13 15:17
系统: Android 8.0

Re: GUI界面偶尔出现鼠标指针偏移

#12

帖子 tommy0607 » 2017-11-19 22:00

把下面的指令 複製 貼進終端機 執行
1. sudo cat /sys/kernel/debug/vgaswitcheroo/switch
2. xrandr --listproviders
把結果直接複製 貼上來
sudo cat /sys/kernel/debug/vgaswitcheroo/switch
0:DIS: :DynOff:0000:01:00.0
1:IGD:+:Pwr:0000:00:02.0

~$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x65 cap: 0x9, Source Output, Sink Offload crtcs: 3 outputs: 3 associated providers: 1 name:modesetting
Provider 1: id: 0x3f cap: 0x4, Source Offload crtcs: 0 outputs: 0 associated providers: 1 name:HAINAN @ pci:0000:01:00.0
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: GUI界面偶尔出现鼠标指针偏移

#13

帖子 poloshiao » 2017-11-20 9:39

sudo cat /sys/kernel/debug/vgaswitcheroo/switch
0:DIS: :DynOff:0000:01:00.0
1:IGD:+:Pwr:0000:00:02.0
1. 目前 獨顯 Dis 是動態關閉 DynOff (猜測 由 kernel 動態 控制著)

2. 這個指令 可以改為手動關閉 (把 DynOff 變成 OFF)
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
(可能需要重新開機才生效)
2-1. 詳細參閱
2-1-1. https://blog.laplante.io/2014/07/disabl ... x-kernels/
2-1-2. https://help.ubuntu.com/community/Hybri ... switcheroo
2-1-3. https://forums.linuxmint.com/viewtopic. ... 9&t=139413
2-2. 提醒 參閱你的顯卡規格詳細說明 看看 有沒有 muxed 或 muxless 的記載
回复