AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-606260

lucidbrot's questions

Martin Hope
lucidbrot
Asked: 2023-02-17 07:50:56 +0800 CST

将 .dpkg-old 文件保存在 /etc/grub.d 中是否安全?

  • 8

发布升级问我是否要使用新版本或旧版本的/etc/grub.d/10_linux文件。我选择了新的,但现在注意到旧的(稍微手动修补过的)文件仍然存在,名为10_linux.dpkg-old.

我的理解是update-grub将运行/etc/grub.d. 由于新版本的脚本修复了一些错误10_linux,我不想update-grub运行10_linux.dpkg-old.

我假设使旧脚本不可执行使用chmod将允许我将它保存在该文件夹中。但我想知道是否有其他机制阻止update-grub使用它。

我目前的理解参考:help.ubuntu

此目录中的脚本在执行 update-grub 命令期间被读取,它们的指令被合并到 /boot/grub/grub.cfg 中。

grub.cfg 菜单中菜单项的位置由该目录中文件的运行顺序决定。首先执行带有前导数字的文件,从最小的数字开始。10_linux 在 20_memtest 之前运行,后者将在 40_custom 之前运行。如果存在具有字母名称的文件,它们将在以数字命名的文件之后运行。

可以将自定义菜单条目添加到 40_custom 文件或新创建的文件中。根据其名称,40_custom 条目默认显示在菜单底部。以 06_ 开头的自定义文件将出现在菜单顶部,因为其字母数字排序会将其置于 10_ 到 40_ 文件之前。

在执行 update-grub 期间,只有可执行文件会向 grub.cfg 生成输出。默认情况下,/etc/grub.d 文件夹中的文件是可执行的。

grub2
  • 1 个回答
  • 27 Views
Martin Hope
lucidbrot
Asked: 2021-11-25 00:53:55 +0800 CST

Nautilus 使用 vim 打开文本文件并在关闭后使终端保持不变

  • 1

我想在 nautilus 中用 Vim 打开一个(文本)文件。这部分很简单:Right-Click -> Open With Vim启动一个运行 vim 的终端,文件已经打开。

当我关闭 vim 时,终端也会关闭。我希望终端保持打开状态,并将工作目录设置为文件所在的目录。

我确信有一种简单的方法可以通过创建自定义 bash 脚本并将其添加到上下文菜单(甚至作为Enter选择文件时的默认操作)来实现此目的,但我不知道如何。那么,如何做到这一点?

我在 ubuntu 18.04 上,但我希望以后的版本也类似。

18.04
  • 1 个回答
  • 229 Views
Martin Hope
lucidbrot
Asked: 2021-10-08 22:35:21 +0800 CST

为什么必须在 `apt` 中明确接受 PPA 标签更改?

  • 2

正如这里所讨论的,如果一个 apt PPA 更改了它的标签并且我们尝试这样做apt-get update,我们会得到这样的结果:

E: Repository 'http://ppa.launchpad.net/ondrej/php/ubuntu artful InRelease' changed its 'Label' value from '*****
The main PPA for PHP (5.6, 7.0, 7.1) with many PECL extensions *****' to '*****
The main PPA for supported PHP versions with many PECL extensions *****'
N: This must be accepted explicitly before updates for this repository can be applied.
See apt-secure(8) manpage for details."

解决方案是改为运行apt update并手动接受更改。

这个问题是关于推理的。为什么标签在我没有明确意识的情况下不会改变很重要?我不知道在正常的日常使用中我什至会在哪里看到这个标签......

apt
  • 1 个回答
  • 422 Views
Martin Hope
lucidbrot
Asked: 2021-04-24 04:05:46 +0800 CST

如何处理这个 docker 安装后脚本错误?`mv:无法统计'/var/lib/docker'`

  • 2

我尝试升级docker,但收到错误,所以我重新安装了。但是,问题仍然存在。它无法统计的文件夹确实不存在。我能做些什么来解决这个问题?

我当然可以简单地创建该目录,并希望它不是严重损坏的迹象,以后会困扰我。但我希望得到比我了解更多的人的意见。

generic@motorbrot:~$ sudo apt-get install docker.io
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  aufs-tools btrfs-progs debootstrap docker-doc rinse zfs-fuse | zfsutils
The following NEW packages will be installed:
  docker.io
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/36.9 MB of archives.
After this operation, 192 MB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package docker.io.
(Reading database ... 539898 files and directories currently installed.)
Preparing to unpack .../docker.io_20.10.2-0ubuntu1~18.04.2_amd64.deb ...
Unpacking docker.io (20.10.2-0ubuntu1~18.04.2) ...
Setting up docker.io (20.10.2-0ubuntu1~18.04.2) ...
mv: cannot stat '/var/lib/docker': No such file or directory
dpkg: error processing package docker.io (--configure):
 installed docker.io package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Errors were encountered while processing:
 docker.io
E: Sub-process /usr/bin/dpkg returned an error code (1)

Docker 似乎已安装:

generic@motorbrot:~$ which docker
/usr/bin/docker
generic@motorbrot:~$ docker --version
Docker version 20.10.2, build 20.10.2-0ubuntu1~18.04.2

但是当我运行sudo apt upgrade它时,它显示为“未完全安装或删除”。

generic@motorbrot:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up docker.io (20.10.2-0ubuntu1~18.04.2) ...
mv: cannot stat '/var/lib/docker': No such file or directory
dpkg: error processing package docker.io (--configure):
 installed docker.io package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 docker.io
E: Sub-process /usr/bin/dpkg returned an error code (1)
generic@motorbrot:~/algolab$ dpkg -s docker.io | grep Status
Status: install ok half-configured

系统

我在 Ubuntu 18.04

$ uname -a
Linux motorbrot 5.4.0-72-generic #80~18.04.1-Ubuntu SMP Mon Apr 12 23:26:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

尝试使用码头工人

但我无法启动守护进程。它说它是“蒙面的”。

docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.
generic@motorbrot:~/algolab$ sudo systemctl docker start
Unknown operation docker.
generic@motorbrot:~/algolab$ sudo service docker start
Failed to start docker.service: Unit docker.service is masked.
generic@motorbrot:~/algolab$ sudo systemctl unmask docker
Removed /etc/systemd/system/docker.service.
generic@motorbrot:~/algolab$ sudo systemctl start docker
Failed to start docker.service: Unit docker.socket is masked.

创建目录/var/lib/docker

我尝试创建它无法统计的目录(在制作 zfs 快照之后,以便在最坏的情况下可以回滚)。现在它在抱怨docker.migrating/docker不是空的。

generic@motorbrot:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up docker.io (20.10.2-0ubuntu1~18.04.2) ...
mv: cannot move '/var/lib/docker' to '/var/lib/docker.migrating/docker': Directory not empty
dpkg: error processing package docker.io (--configure):
 installed docker.io package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 docker.io
E: Sub-process /usr/bin/dpkg returned an error code (1)

即使我删除了那个目录,我也会遇到问题:

generic@motorbrot:~$ sudo rm -r /var/lib/docker.migrating/docker
generic@motorbrot:~$ sudo mkdir /var/lib/docker
generic@motorbrot:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up docker.io (20.10.2-0ubuntu1~18.04.2) ...
mv: target '/var/lib/docker/' is not a directory
dpkg: error processing package docker.io (--configure):
 installed docker.io package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 docker.io
E: Sub-process /usr/bin/dpkg returned an error code (1)

安装后脚本

它位于/var/lib/dpkg/info/docker.io.postinst根据this answer,在我看来,即使我提前创建了目录,它也会删除目录,然后抱怨它不存在。

快速浏览一下它会发现它对 ZFS 进行了特殊处理,所以我应该指出我确实在 root 上运行在 ZFS 上。

易于清除

我现在有点核,反正我很少使用 docker。无论如何,我已经删除了所有困扰我的 docker 数据集 zfs list :

for dataset in $(zfs list | grep legacy | cut -f1); do zfs destroy -R "$dataset" || true ; done

还做了一次清洗

$ sudo apt purge docker.io

generic@motorbrot:~$ sudo apt purge docker.io
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  bridge-utils cgroupfs-mount containerd pigz runc ubuntu-fan
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  docker.io*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 192 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 540125 files and directories currently installed.)
Removing docker.io (20.10.2-0ubuntu1~18.04.2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
(Reading database ... 539920 files and directories currently installed.)
Purging configuration files for docker.io (20.10.2-0ubuntu1~18.04.2) ...
dpkg: warning: while removing docker.io, directory '/etc/docker' not empty so not removed

还有一个文件/etc/docker/key.json

重新安装,出现新问题:

generic@motorbrot:~$ sudo apt install docker.io
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  aufs-tools btrfs-progs debootstrap docker-doc rinse zfs-fuse | zfsutils
The following NEW packages will be installed:
  docker.io
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/36.9 MB of archives.
After this operation, 192 MB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package docker.io.
(Reading database ... 539920 files and directories currently installed.)
Preparing to unpack .../docker.io_20.10.2-0ubuntu1~18.04.2_amd64.deb ...
Unpacking docker.io (20.10.2-0ubuntu1~18.04.2) ...
Setting up docker.io (20.10.2-0ubuntu1~18.04.2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Fri 2021-04-23 14:31:06 CEST; 3ms ago
     Docs: https://docs.docker.com
  Process: 32306 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
 Main PID: 32306 (code=exited, status=1/FAILURE)
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
generic@motorbrot:~$ sudo systemctl restart docker
apt
  • 1 个回答
  • 2339 Views
Martin Hope
lucidbrot
Asked: 2021-01-04 12:37:06 +0800 CST

upower 的 CriticalPowerAction=HybridSleep 会干扰 tlp 的重新校准吗?

  • 1

tlp文档描述tlp recalibrate如下:

sudo tlp recalibrate [ BAT0 | BAT1 ]
该命令的工作原理如下:

  • 将充电阈值重置为出厂默认值 96/100 %
  • 将选定的电池完全放电(参见上面的 tlp 放电说明)
  • 当放电完成时,命令终止;它不会等待充电完成
  • 重要提示:要完成重新校准过程,请让电池充电至 100%(您可以关闭电源但不能断开交流电源)

我已/etc/UPower/UPower.conf设置为HybridSleep以 3% 的电池百分比进入。

如果我想重新校准我的电池,使用sudo tlp recalibrate BAT0,我是否必须通过将 upower 配置更改为如下来临时禁用 upower?或者 upower 不会因为笔记本电脑处于 HybridSleep 时电池仍然可以完成放电而产生干扰?

UsePercentageForPolicy=true
PercentageAction=0

(这是对在干净的 Ubuntu 18.04 安装上预安装哪种电池管理?)中给出的解释的后续问题

18.04
  • 1 个回答
  • 247 Views
Martin Hope
lucidbrot
Asked: 2020-12-25 06:41:54 +0800 CST

在干净的 Ubuntu 18.04 安装中预装了什么样的电池管理?

  • 3

一位朋友最近告诉我,重要的是不要将笔记本电脑电池完全充电,这样可以延长使用寿命。我不知道这是否属实,如果是这样,我希望电池硬件或操作系统能够在我不摆弄它的情况下处理它。

为了支持这一说法,这里引用了 Lenovo 在 Windows 上的 Vantage Tool:

如果您主要使用连接了 AC 适配器的计算机并且不经常使用电池电源,则可以通过将最大充电值设置为低于 100% 来延长电池的使用寿命。这很有用,因为不经常使用的电池在保持低于完全充电状态时具有更长的使用寿命。

我有一个装有 Ubuntu 18.04 的 ThinkPad X1 Yoga,但我希望答案不会强烈依赖于笔记本电脑型号和 Ubuntu 版本。

Ubuntu 上预装了什么样的电池管理,无需进一步配置?

我正在考虑以下问题:

  • 在 XX% 时停止充电
  • 电池电量低时发出警告
  • 在电池电量严重不足时休眠

我担心我可能会因为让笔记本电脑在几周内不断插上电源而破坏电池寿命。

如果 Ubuntu 尚未设置预防措施,请在您的回答中提及有关此的建议。

power-management
  • 1 个回答
  • 436 Views
Martin Hope
lucidbrot
Asked: 2020-06-04 07:32:47 +0800 CST

为什么会发生 dkms 状态“警告!构建和安装模块之间的差异”?

  • 6
generic@motorbrot:~$ sudo dkms status
zfs, 0.8.4, 5.3.0-51-generic, x86_64: installed (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!)
zfs, 0.8.4, 5.3.0-53-generic, x86_64: installed (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!)

为什么会出现此消息?

我已尝试zfs在这两个内核之一上删除并重新安装。

generic@motorbrot:~$ sudo dkms remove -m zfs -v 0.8.4 -k 5.3.0-53-generic

-------- Uninstall Beginning --------
Module:  zfs
Version: 0.8.4
Kernel:  5.3.0-53-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

zavl.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.3.0-53-generic/
rmdir: failed to remove '': No such file or directory
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

# [skipping long output that all looks similar but for different something.ko]

spl.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.3.0-53-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod...

DKMS: uninstall completed.
generic@motorbrot:~$ sudo dkms install -m zfs -v 0.8.4 -k 5.3.0-53-generic

Kernel preparation unnecessary for this kernel.  Skipping...

Running the pre_build script:

# [Skipping "checking for blah... blah" outputs]

Building module:
cleaning build area...
make -j8 KERNELRELEASE=5.3.0-53-generic............

Running the post_build script:
Signing module:
 - /var/lib/dkms/zfs/0.8.4/5.3.0-53-generic/x86_64/module/spl.ko
 - /var/lib/dkms/zfs/0.8.4/5.3.0-53-generic/x86_64/module/icp.ko
 - /var/lib/dkms/zfs/0.8.4/5.3.0-53-generic/x86_64/module/zfs.ko
 - /var/lib/dkms/zfs/0.8.4/5.3.0-53-generic/x86_64/module/zcommon.ko
 - /var/lib/dkms/zfs/0.8.4/5.3.0-53-generic/x86_64/module/zlua.ko
 - /var/lib/dkms/zfs/0.8.4/5.3.0-53-generic/x86_64/module/znvpair.ko
 - /var/lib/dkms/zfs/0.8.4/5.3.0-53-generic/x86_64/module/zunicode.ko
 - /var/lib/dkms/zfs/0.8.4/5.3.0-53-generic/x86_64/module/zavl.ko
Secure Boot not enabled on this system.
cleaning build area...

DKMS: build completed.

zavl.ko:
Running module version sanity check.

Good news! Module version 0.8.4-1 for zavl.ko
exactly matches what is already found in kernel 5.3.0-53-generic.
DKMS will not replace this module.
You may override by specifying --force.

znvpair.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/5.3.0-53-generic/updates/dkms/

zunicode.ko:
Running module version sanity check.

Good news! Module version 0.8.4-1 for zunicode.ko
exactly matches what is already found in kernel 5.3.0-53-generic.
DKMS will not replace this module.
You may override by specifying --force.

zcommon.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/5.3.0-53-generic/updates/dkms/

zfs.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/5.3.0-53-generic/updates/dkms/

icp.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/5.3.0-53-generic/updates/dkms/

zlua.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/5.3.0-53-generic/updates/dkms/

spl.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/5.3.0-53-generic/updates/dkms/

depmod...

DKMS: install completed.

但输出dkms status保持不变。

为什么会这样?我应该担心吗?如果我担心,我将如何解决这个问题?

drivers kernel 18.04 dkms
  • 1 个回答
  • 6968 Views
Martin Hope
lucidbrot
Asked: 2020-06-01 11:48:20 +0800 CST

在 Ubuntu 18.04 上未检测到声卡

  • 5

我的 ThinkPad Yoga X1 上的声音不久前还可以工作。我不确定发生了什么变化,但现在它不再起作用了。它仍然可以在 ubuntu 18.04 的并行安装上继续工作一段时间(是的,我安装了两次相同的发行版)。它仍然适用于 Windows 10 的并行安装。

当我按下键盘上的音量按钮时,它会改变“虚拟输出”设备的音量。

lspci 列出音频设备:

$ lspci | grep -A8 Audio
00:1f.3 Audio device: Intel Corporation Device 9dc8 (rev 11)
00:1f.4 SMBus: Intel Corporation Device 9da3 (rev 11)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Device 9da4 (rev 11)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (6) I219-LM (rev 11)
03:00.0 Non-Volatile memory controller: Micron/Crucial Technology Device 2263 (rev 03)
05:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
06:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
06:01.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
06:02.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)

但是aplay没有找到

sudo aplay -l
[sudo] password for generic: 
aplay: device_list:270: no soundcards found...
$ pacmd list-sinks
1 sink(s) available.
  * index: 0
    name: <auto_null>
    driver: <module-null-sink.c>
    flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE 
    priority: 1000
    volume: front-left: 46332 /  71% / -9.04 dB,   front-right: 46332 /  71% / -9.04 dB
            balance 0.00
    base volume: 65536 / 100% / 0.00 dB
    volume steps: 65537
    muted: no
    current latency: 0.00 ms
    max request: 344 KiB
    max rewind: 344 KiB
    monitor source: 0
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
    module: 14
    properties:
        device.description = "Dummy Output"
        device.class = "abstract"
        device.icon_name = "audio-card"

我在 root 上运行带有 ZFS 的 ubuntu 18.04。这意味着我可以尝试一个解决方案并在它不起作用时回滚。这意味着我尝试了几种解决方案。

没有帮助的相关链接:

  • 未检测到 Ubuntu 18.04 声卡

  • 声卡检测不到

  • https://www.linuxupprising.com/2018/06/fix-no-sound-dummy-output-issue-in.html?m=1

  • https://askubuntu.com/a/815516/606260

  • 没有声音(虚拟输出)错误 Ubuntu 19.10

  • 在 LTS 18.04 上未检测到声卡

  • 没有声音(虚拟输出)Ubuntu 19.10

  • Ubuntu 19.10 上没有声音。虚拟输出

  • https://askubuntu.com/a/1027405/606260

  • https://askubuntu.com/a/811461/606260

我尝试了什么:

  • sudo apt-get --purge remove linux-sound-base alsa-base alsa-utils && reboot

  • sudo apt-get install build-essential linux-headers-unname -ralsa-base alsa-firmware-loaders alsa-oss alsa-source alsa-tools alsa-tools-gui alsa-utils alsamixergui

  • 将用户添加generic到组audio

  • 以上三者结合

  • 上述的变体

  • linuxupprising 帖子中的两个修复程序

  • modprobe snd_hda_intel && modprobe sof_pci_dev

  • 添加snd_hda_intel.dmic_detect=0到 GRUB 引导参数

  • 按照此处ppa:nilarimogard/webupd8的建议安装软件包集合

  • 使用 dkms 重新安装 alsa 相关的软件包。看这里

  • 重新安装pavucontrol并pulseaudio按照此QA

我的系统是

$ uname -r
5.3.0-51-generic

可能不相关,可能相关:
我的屏幕亮度控件也消失了。它们之前曾被破坏过一次,我通过添加并更新 grub 并重新启动acpi_backlight=video来修复它。但是该修复程序仍然存在,并且仍然再次被破坏。GRUB_CMDLINE_LINUX_DEFAULT/etc/default/grub

我怎样才能让声音再次正常工作?

当我启动 ubuntu 18.04 的 live 棒时,声音确实再次起作用。

# live system version:
$ uname -a
Linux ubuntu 5.3.0-28-generic #30-18.04.1-Ubuntu SMP Fri Jan 17 06:14:09 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

# aplay output on live system:
ubuntu@ubuntu:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC285 Analog [ALC285 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

(在非实时系统上)/var/log/apt/term.log和/var/log/apt/history.log和用 ./var/log/dpkg.log查看时都是空的sudo vim <filepath>。但是有一个history.log.1.gz包含所有历史记录的文件。我正在审查它,但我不知道要注意什么。

我已经启动了我目前在笔记本电脑上的最旧的 zfs 快照(不是非常老,因为当时我遇到了 zfs 的并发症)并且声音在那里也不起作用。5.3.0-28当我使用与 live USB 记忆棒相同的旧内核版本启动时,它也不起作用。

git diff --no-index apt_live.txt apt_tank.txt文件包含各自输出的地方apt list --installed给了我太多的输出。许多版本号已更改。


根据消息来源,我已经添加了标签19.04并20.04回想起来,因为修复也适用于这些标签。

sound drivers 18.04 20.04 19.04
  • 2 个回答
  • 4681 Views
Martin Hope
lucidbrot
Asked: 2020-05-15 12:43:00 +0800 CST

如何使用 update-grub 为加密的 zfs 根文件系统生成 grub2 菜单项?

  • 3

我在 ZFS 0.8.4 上运行 Ubuntu 18.04 并且正在玩加密。我想在 grub 中有一个菜单项,可以让我启动到加密的根目录。

系统设置

复选标记表示 grub 中有相应的菜单项。

  • aquarium/ds1/u18✓
    包含我的 ubuntu 18.04 并将其挂载点设置为/
  • tank/ds1/u18
    从中复制,aquarium唯一的区别ds1是加密并u18继承该属性。
  • Windows 10 ✓
    我希望它与我的问题无关。
  • /dev/nvme0n1p8✓
    从我切换到 ZFS 时仍然存在的 EXT4 格式的系统aquarium

我有一个 EXT2 分区/boot和另一个/boot/efi.

手动解决方法

aquarium当我通过替换来选择和编辑条目时root=ZFS=aquarium/ds1/u18,root=ZFS=tank/ds1/u18我可以很好地启动进入 initramfs,提示我输入密码。输入密码后,我按预期得到了我的系统。

在该系统(或任何其他 ubuntu 系统)内部,我可以在/etc/grub/40_custom.

menuentry "Encryptioned Magic 18.04" {
    linux /vmlinuz-5.3.0-51-generic root=ZFS=tank/ds1/u18 ro acpi_backlight=video resume=UUID-OF-SWAP-PARTITION
    initrd /initrd.img-5.3.0-51-generic
}

我想避免这种情况,因为手动输入意味着当我的交换文件系统的 UUID 更改或其他内容时我需要修改它。我的意思是,我们不为每个操作系统创建自定义条目的所有原因基本上也适用于此。

解决方案尝试

理想情况下,这将使用sudo update-grub,但即使加载了加密密钥,或者即使我在加密系统中,它似乎也找不到它。此日志来自运行它aquarium。

$ sudo update-grub
Sourcing file `/etc/default/grub`
Generating grub configuration file ...
Found theme: /boot/grub/themes/poly-dark/theme.txt
Found linux image: /boot/vmlinuz-5.3.0-51-generic
Found initrd image: /boot/initrd.img-5.3.0-51-generic
Found linux image: /boot/vmlinuz-5.3.0-28-generic
Found initrd image: /boot/initrd.img-5.3.0-28-generic
Found Windows Boot Manager on /dev/nvme0n1p2@/EFI/Microsoft/Boot/bootmgfw.efi
Found Ubuntu 18.04.4 LTS (18.04) on /dev/nvme0n1p8
Adding boot menu entry for EFI firmware configuration
done

当我在加密系统中运行相同的命令时tank,我会在第二行Found initrd image和Found Windows Boot Manager行之间另外收到一条消息:

device-mapper: reload ioctl on osprober-linux-nvme0n1p10   failed: Device or resource busy
Command failed

提到的分区是在其中设置具有加密数据集nvme0n1p10的池的单个分区。 tanktank/ds1/u18

zfs每当我运行时使用分区时,似乎都会发生同样的错误消息,update-grub 因为它以独占方式打开它,无论我登录到哪个系统。此行为是 os-prober 中已确认的错误,但他们称之为

实际上并没有失败,只是在 os-prober 期间喷出错误。我们想清理它(它是化妆品)。

如何为我的加密 zfs 数据集自动生成 grub 条目?

encryption grub2 boot uefi zfs
  • 1 个回答
  • 1364 Views
Martin Hope
lucidbrot
Asked: 2020-05-15 09:31:14 +0800 CST

zpool create -O file-system-property 参数用于什么?

  • 4

man zpool 创建页面状态

-O file-system-property = value
在池的根文件系统中设置给定的文件系统属性。有关可以设置的有效属性的列表,请参阅 zfs(8) 的 Sx 属性部分。

搜索man zfs页面Sx Properties导致我

设置属性 = 值 [属性 = 值 ...] 文件系统 | 体积 | 快照...

将属性或属性列表设置为每个数据集的给定值。
只能编辑部分属性。有关可以设置哪些属性和可接受的值的更多信息,请参阅 Sx 属性部分。
[...]

当我在寻找如何在 ubuntu 18.04 上使用 zfs 0.8.4(自建)做类似的事情时,我在alpinelinux wiki上看到了这个。

big-O 选项实际上有什么作用?

我已经尝试并创建了一个新池,-O compression=lz4并测试了它们可能会做什么的一些假设,但是:

  • zfs get compression tank不显示压缩已启用

  • zfs create tank/ds不会创建默认激活压缩的数据集。

那么zpool 创建的文件系统属性参数实际上有什么影响呢?


编辑

我又试了一次,这次一切都像我预期的那样。

创建一个池-O compression=lz4确实具有zfs get compression mypool显示的效果lz4。并且它被继承到未来创建的子数据集。

zfs
  • 1 个回答
  • 358 Views
Martin Hope
lucidbrot
Asked: 2020-05-07 08:29:38 +0800 CST

UEFI 模式下不显示安装程序的自定义引导选项

  • 0

TL;博士

我自定义的 Ubuntu Live Installer USB 记忆棒在旧笔记本电脑上显示了 Legacy BIOS 模式下的自定义菜单选项,但在我的新笔记本电脑上却没有显示 UEFI BIOS 模式下的自定义菜单选项。
为什么,我该如何解决这个问题?

问题和背景

我采用了原始的 Ubuntu 18.04 桌面 iso 并对其进行了修改,以包含一些脚本、不同的背景图像、我的预置文件和一个稍微修改过的 python 脚本。我怀疑我的问题与这些有关,但这就是上下文,如果您想了解更多信息,请在此处查看我的文章。
重要的一点是:我进行了修改isolinux/isolinux.cfg,以便当我从 USB 记忆棒启动时看到的第一个屏幕显示了一个默认选择的附加安装选项,并且有一些附加的启动参数。

它在带有 Legacy BIOS 的旧笔记本电脑上运行良好,但在带有 UEFI BIOS 的新笔记本电脑上无法启动。由于在其上使用 Legacy BIOS 模式可能会导致已安装的操作系统出现问题,因此我重新创建了我的 iso,以便它可以使用 xorriso 与两种模式一起使用,如下所述:

sudo apt-get -y install isolinux xorriso
sudo xorriso -as mkisofs \
  -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
  -c isolinux/boot.cat \
  -b isolinux/isolinux.bin \
  -no-emul-boot \
  -boot-load-size 4 \
  -boot-info-table \
  -eltorito-alt-boot \
  -e boot/grub/efi.img \
  -no-emul-boot \
  -isohybrid-gpt-basdat \
  -o /path/to/tmp.iso \
  /path/to/tmp

我已经在干净的 Ubuntu 18.04 桌面棒的实时系统上运行了它。然后dd把它放到另一个 U 盘上:

sudo umount /dev/sdb1
sudo dd bs=4M if=/path/to/tmp.iso of=/dev/sdb

现在,在将新笔记本电脑的 BIOS 设置为 UEFI Only Mode 后,它可以正常启动到 grub,尽管与旧 BIOS 笔记本电脑上的外观相比,它看起来完全不同。最重要的是:我的自定义选项丢失了。

我知道这些图片非常粗糙,但差异很明显:

旧版 BIOS(旧笔记本电脑)UEFI BIOS(新笔记本电脑)

当我按下e并编辑Install Ubuntu选项的引导参数时,它(大部分)完成了我的预期。以下是isolinux.cfg.

# D-I config version 2.0
# search path for the c32 support libraries (libcom32, libutil etc.)
path 
include menu.cfg
#default vesamenu.c32
default install
prompt 1
timeout 50
ui gfxboot bootlogo

label install
  menu label ^LucidBrot 18.04 v72 (prod)
  kernel /casper/vmlinuz
  append auto=true file=/cdrom/preseed/my.seed boot=casper debug-ubiquity automatic-ubiquity initrd=/casper/initrd DEBCONF_DEBUG=5 debian-installer/locale=de_CH.UTF-8 keyboard-configuration/layoutcode=ch languagechooser/language-name=English countrychooser/shortlist=CH localechooser/supported-locales=en_US.UTF-8 ---

如何让我的自定义选项出现在 UEFI 模式启动选择屏幕上?


补充说明

  • 我在上面简化了我的故事。当我将东西从一台机器复制到另一台机器时,创建iso之前文件中的某些权限可能已经被搞砸了。我提到这一点,以防万一这可能是罪魁祸首。

  • 当我按下e并编辑Install Ubuntu选项的引导参数时,它(大部分)完成了我的预期。

    大部分是我所期望的,但不完全是:我添加了一个脚本,将实时安装程序(不是目标系统)的原始橙色仿生海狸背景替换为蓝色版本,用于测试目的。这在我的旧笔记本电脑和新笔记本电脑的 Legacy BIOS 上都可以正常工作,但在以 UEFI 模式运行的新笔记本电脑上,它显示为单色蓝色背景。
    据我所知,当手动添加引导参数运行时,我所做的任何其他预置都按预期工作。

  • 安全启动当前已禁用

boot live-usb uefi 18.04
  • 1 个回答
  • 340 Views
Martin Hope
lucidbrot
Asked: 2020-05-02 06:47:32 +0800 CST

如何在 Ubuntu 18.04 中使用 GNOME3 从 bash 脚本设置自定义键盘快捷键?

  • 1

与2012的这个问题类似,我正在寻找一种方法来自动设置组合键,该组合键应该触发命令的执行,就像在 gui 中设置它一样。(示例用法)

我在 Ubuntu 18.04 上,链接答案的 gsettings 架构似乎不存在:

$ gsettings list-schemas | grep keyboard
org.gnome.settings-daemon.plugins.keyboard
org.gnome.settings-daemon.plugins.a11y-keyboard
org.gnome.shell.keyboard
org.gnome.settings-daemon.peripherals.keyboard
org.gnome.libgnomekbd.keyboard
com.canonical.indicator.keyboard
org.gnome.desktop.peripherals.keyboard
org.gnome.desktop.a11y.keyboard

我如何使用 bash 来设置它,就像我进入 GNOME GUISettings > Devices > Keyboard并手动设置它一样? 显示 GUI 中的设置的示例图像

shortcut-keys ubuntu-gnome 18.04
  • 3 个回答
  • 1447 Views
Martin Hope
lucidbrot
Asked: 2020-05-01 05:25:58 +0800 CST

如何预置 ubuntu 20.04 桌面?

  • 15

在弄清楚 Ubuntu 18.04 Desktop 上的预置是如何工作的之后,我想通了。我希望我可以对 20.04 Desktop 使用相同的程序。我可以吗?

ubuntu wiki page on Automated Server Installs for 20.04听起来好像它已被删除,取而代之的是一种新的,因此不同的操作模式:

20.04 的服务器安装程序支持一种新的操作模式:自动安装,简称自动安装。您可能还会将此功能称为无人值守、切换或预置安装。[...]

preseeds 是基于 debian-installer (aka di) 自动化安装程序的方法。

新服务器安装程序的自动安装在以下主要方面不同于预种子:

  • 格式完全不同(cloud-init config,通常是 yaml,vs debconf-set-selections 格式)
  • 当一个问题的答案不存在于预种子中时,di 停止并要求用户输入。自动安装不是这样的:默认情况下,如果有任何自动安装配置,安装程序会为任何未回答的问题采用默认设置(如果没有默认设置则失败)。您可以将配置中的特定部分指定为“交互式”,这意味着安装程序仍会停止并询问这些部分。

问题

  1. 我可以使用带有d-i/ubiquity指令的预置文件的旧程序预置吗?
  2. 这个新的“自动安装”是否仅适用于 Ubuntu 20.04 服务器或也适用于 Ubuntu 20.04 桌面?
  3. 或者,如果前面的答案都是“不,这在 Ubuntu 20.04 Desktop 上不起作用。”,那么推荐的自动安装 Ubuntu 20.04 Desktop 的方法是什么?
system-installation preseed 20.04
  • 3 个回答
  • 21439 Views
Martin Hope
lucidbrot
Asked: 2020-04-20 10:37:12 +0800 CST

mru-sources 和 dconf /org/gnome/desktop/input-sources 中的源有什么区别?

  • 2
dconf read /org/gnome/desktop/input-sources/sources

具有相同的输出

dconf read /org/gnome/desktop/input-sources/mru-sources

这是

[('xkb', 'ch+de_nodeadkeys'), ('xkb', 'us')]

有什么区别?
我应该总是修改两者吗?如果没有,什么时候/为什么不?

ubuntu-gnome 18.04
  • 1 个回答
  • 283 Views
Martin Hope
lucidbrot
Asked: 2020-04-06 11:05:46 +0800 CST

如何从实时安装程序 preseed/early_command 访问引导介质上的文件?

  • 0

我目前正在尝试为我的 ubuntu 桌面 18.04 设置一个预置文件。查看它是否正常工作的一种简单方法是更改​​ ubuntu 实时安装程序的背景图像。因此,受这个问题的启发,我在预置文件的开头添加了:

d-i preseed/early_command string cp /cdrom/preseed/warty-final-ubuntu-blue.png /root/usr/share/backgrounds/warty-final-ubuntu.png

我按照UbiquityAutomation的建议将前缀添加/root到目标路径

您可以将 preseed/early_command 与 live CD 一起使用;它将由 initramfs 中的“casper”(在启动时设置实时环境的组件)运行。
请注意,如果您想影响实时环境中的文件,这意味着您必须在其文件名前加上 /root。

当我从我的 USB 记忆棒(我用和创建的)启动时mkisofs,我进入了安装程序开始验证的部分。它会自动选择语言,正如我在引导参数中指定的那样,然后显示分区对话框(正如预期的那样,我没有在预种子文件中指定分区)。但背景保持不变。isohybriddd

当我通过按下打开 tty2CtrlAltF2并使用 ubuntu 登录时,我可以看到/log/var/casper.logcp 无法统计我的文件。

但我此时可以看到文件。/cdrom/preseed/warty-final-ubuntu-blue.png正如我预期的那样,它就在下面。当然,它preseed/early_command是由 casper 运行的,因此可能无法访问与我在安装期间相同的文件系统。但如果是这样的话,它确实cp从我的预置文件中执行命令会很奇怪,该文件位于/cdrom/preseed/early_command. 在引导参数中,它是用该路径指定的。

如何将我的图像文件从 USB 记忆棒复制到实时系统?
我明确询问实时系统,而不是正在安装的目标系统。

system-installation live-usb preseed 18.04
  • 1 个回答
  • 436 Views
Martin Hope
lucidbrot
Asked: 2020-03-31 09:48:39 +0800 CST

何时在 preseed/late_command apt-install 上使用 pkgsel/include?

  • 2

链接到此处的用于预置仿生的示例文件同时包含

# Individual additional packages to install
#d-i pkgsel/include string openssh-server build-essential ```

和

# This command is run just before the install finishes, but when there is
# still a usable /target directory. You can chroot to /target and use it
# directly, or use the apt-install and in-target commands to easily install
# packages and run commands in the target system.
#d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh ```

我如何决定是要使用preseed/late_command版本还是pkgsel/include版本?

我的问题apt-install 和 in-target apt-get install 有什么区别?是相关但互补的。我希望它是一个足够独立的问题。

preseed
  • 1 个回答
  • 1569 Views
Martin Hope
lucidbrot
Asked: 2020-03-25 07:22:59 +0800 CST

如何在 ubuntu 18.04 上为 qemu windows 10 来宾设置动态屏幕大小?

  • 11

我的笔记本电脑上有一个双引导设置:Ubuntu 18.04 和 Windows 10。在 ubuntu 中,我可以在本指南的帮助下使用 qemu 引导到我现有的 Windows 分区。我正在使用的命令是这样的:

sudo qemu-system-x86_64 --enable-kvm -cpu host -smp 8 -m 8192 \
-drive format=raw,file=/dev/nvme0n1,index=1 \
-bios /usr/share/ovmf/OVMF.fd \
-display sdl -vga qxl \
-device qemu-xhci,id=xhci \
-netdev user,id=vmnic,smb=/home/generic/Downloads \
-device virtio-net,netdev=vmnic -cdrom ~/Downloads/virtio-win-0.1.171.iso

最后一行只是安装virtio 驱动程序,所以我很确定我不需要每次都需要它。
第二行确定分区/dev/nvme0n1p1。

该指南提到了 SPICE,这显然对

动态屏幕调整大小,来宾/主机之间的剪贴板等。

我想让虚拟屏幕在调整窗口大小时改变它的大小并调整分辨率。我尝试按照https://www.linux-kvm.org/page/SPICE上的指南进行操作,并意识到这spicec不再是一回事 - 这意味着我无法使用spicec -h 127.0.0.1 -p 5900. Spice 用户手册同意
:

推荐的客户端是 remote-viewer(随 virt-viewer 提供)。
GNOME Boxes 也可以用作 Spice 客户端。
spicec 是一个过时的遗留客户端,spicy 只是一个测试应用程序。

所以我尝试添加-spice port=5900,addr=127.0.0.1,disable-ticketing到我的qemu命令并remote-viewer在spice://127.0.0.1:5009. 这实际上打开了一个香料窗口——所以现在我有两个窗口可以显示我的 win10 客户机。
Spice 窗口在调整大小时反应更好,但它保持相同的分辨率,并在必要时添加白色边框。

问题

如何获得能够很好地适应调整大小的访客系统的无边界视图?
如果这不是一个完全不同的问题:我怎么能只有一个窗口,而不是 qemu 和 spice 窗口?


更多详细信息

当我连接remote-viewer时,它的控制台窗口显示

** (remote-viewer:3066): CRITICAL **: 15:54:52.441: virt_viewer_util_extract_host: assertion 'uri != NULL' failed

qemu输出显示

main_channel_link: add main channel client
main_channel_client_handle_pong: net test: latency 0.110000 ms, bitrate 34711864406 bps (33103.813559 Mbps)
inputs_connect: inputs channel client create
red_qxl_set_cursor_peer:
virtualization qemu spice
  • 2 个回答
  • 13743 Views
Martin Hope
lucidbrot
Asked: 2020-03-20 01:59:32 +0800 CST

休眠后如何恢复 Ubuntu 18.04?

  • 1

两天前,我按照这个答案在我全新安装的 ubuntu 18.04 上激活了休眠功能,它起作用了。

然后我设法彻底破坏了文件系统,以至于干净的重新安装似乎是最简单的方法。/tmp所以我用, swap,/boot和/分区重新安装了 ubuntu(使用安装程序中的“其他”选项) 。跟我上次做的一模一样。然后我再次按照该答案设置休眠。

休眠有效 - 但恢复无效:
当我执行 asystemctl hibernate时,我的笔记本电脑屏幕立即变黑,只有电源按钮上的 LED 指示与完全关机有任何区别 - 这很好。但是,笔记本电脑不会响应任何交互,例如键盘输入或短按电源按钮。唯一的选择是按住电源按钮 15 秒以强制关机,然后正常按下以重新启动。

以下是有关我的系统的一些信息:

generic@motorbrot-linux:~$ cat /sys/power/state
freeze mem disk
generic@motorbrot-linux:~$ grep swap /etc/fstab
# swap was on /dev/nvme0n1p7 during installation
UUID=93232136-5a6d-4ffc-b40d-809ccead48df none            swap    sw              0       0
generic@motorbrot-linux:~$ 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"
GRUB_CMDLINE_LINUX=""
# FOR HIBERNATION 
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=93232136-5a6d-4ffc-b40d-809ccead48df"

# 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=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"

我注意到的一件事是它update-initramfs显示update-grub了它的输出两次。按照这个答案摆脱了那个,但我很困惑为什么我还有两个linux image:

generic@motorbrot-linux:~$ sudo update-grub
[sudo] password for generic: 
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.3.0-42-generic
Found initrd image: /boot/initrd.img-5.3.0-42-generic
Found linux image: /boot/vmlinuz-5.3.0-28-generic
Found Windows Boot Manager on /dev/nvme0n1p2@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
done

我正在寻找有关如何在将笔记本电脑发送到休眠状态后使其恢复的指导。如果相关,我有一个带有 ubuntu 18.04 和 Windows 10 的双启动系统。

Device             Start        End    Sectors   Size Type
/dev/nvme0n1p1      2048    1085439    1083392   529M Windows recovery environme
/dev/nvme0n1p2   1085440    1288191     202752    99M EFI System
/dev/nvme0n1p3   1288192    1320959      32768    16M Microsoft reserved
/dev/nvme0n1p4   1320960  614399999  613079040 292.3G Microsoft basic data
/dev/nvme0n1p5 614400000  614985727     585728   286M Linux filesystem
/dev/nvme0n1p6 614985728  628658175   13672448   6.5G Linux filesystem
/dev/nvme0n1p7 628658176  667719679   39061504  18.6G Linux swap
/dev/nvme0n1p8 667719680 1953523711 1285804032 613.1G Linux filesystem

我刚刚尝试过systemctl suspend,同样的事情发生在那里:屏幕立即变黑,唯一让它重新打开的方法是通过按下电源按钮大约 20 秒来强制关机。有时,挂起后不是黑屏,而是冻结的黑屏,上面有一个不会移动的光标。这个暗示司机有过错的答案nouveau没有帮助。

ping“休眠”系统没有反应,而 ping 完全启动的系统确实得到回复。

在黑屏上按亮度键没有反应。

这/var/log/syslog是我从“请求睡眠”开始到我有理由确定它是随后启动的一部分而不是“休眠”本身的部分摘录。

我已经尝试了所有三个选项 reboot,platform并且shutdown它们都冻结了我的屏幕。


我目前不再遇到这个确切的问题。对于任何拥有 thinkpad 的人,也许ThinkWiki会有所帮助

grub2 hibernate
  • 2 个回答
  • 3261 Views
Martin Hope
lucidbrot
Asked: 2020-03-13 10:03:42 +0800 CST

如何在不更改活动工作区的情况下将窗口发送到不同的工作区?

  • 12

是否有键盘快捷键可以将窗口发送到不同的工作区,同时保留在当前工作区中,以便我现在可以忽略它?

我正在使用带有默认 GNOME 界面的全新安装的 Ubuntu 18.04。在 win10 上,我习惯于将窗口发送到不同的工作区,这样它现在就不会打扰我了,这要归功于virtualdesktopenhancer。

这个问题完全一样,只是它不是关于 GNOME 而是关于 XFCE。我没有尝试过那里的答案是否也适用于 GNOME,因为我希望得到一个更简单的答案。
如果没有更简单的答案,我将不胜感激,该答案还解释了如何设置这样的键盘快捷键。

这个问题在姊妹网站上完全相同 - 没有有效答案。我在这里问是因为这是特定于 ubuntu 的。

gnome workspaces
  • 4 个回答
  • 2204 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve