强烈推荐一款性价比极高的 Linux 本搞 vibe coding

1 天前
 hihihihihi

Linux 笔记本这里讨论过很多次,我自己都多次发帖,我也前后用过折腾过一二十个笔记本,

60% Apple, 30% Thinkpad X1C/T 系列 10% 杂牌甚至 PAD/Surface 系列

多多少少都有不满意的对方,大部分是兼容问题,电池问题,驱动问题,启动问题,稳定问题。

由于目前我自己主要用 AI 来写一些小项目,所以主要考虑轻便,续航高,性能无所谓,由于 M 芯片支持不是太友好,要不然 M 芯片应该是首选。

后来我研究发现 12 寸的 Macbook+Omarchy 是极品配置

我以前定制过一台 12 寸的,好像 1.2w 买的,用了半年不习惯(那个时候觉得性能不行发热) 5k 卖了。

最近在咸鱼花 1000 出头买了一台 16G/256 的极品机,安装 Omarchy 很顺畅,唯一就是要自己改一下设置,要不然盒盖充电后,拔插头,wifi 不能唤醒,需要重新启动。

如果你对性能要求不高,只是上网,ai vibing ,对品相要求不高,700 多就能买到成色不错的,亮度 20-30,我浏览网页,vibing 一下,大概续航可以做到 8-10 个小时。我自己还有一台 x1 carbon 也装了 omarchy ,续航要比这个少,而且这个很轻 900 克,简直太好用了。

1000 元不到,还要什么自行车?

3527 次点击
所在节点    Linux
29 条回复
hihihihihi
1 天前
下面是我让 ai 帮我解决掉 wifi 和充电冲突的问题的脚本


#!/bin/bash
# Fix MacBook10,1 suspend/resume WiFi issues caused by BCM4350 brcmfmac PCIe D3 timeout
#
# ROOT CAUSE: systemd-sleep hooks run AFTER kernel PM tries to freeze devices.
# brcmfmac driver is still loaded when kernel calls pci_pm_suspend() -> D3 timeout
# error -5 -> suspend fails -> retry -> firmware corruption -> WiFi dead.
#
# SOLUTION: Use systemd services (Before=sleep.target / After=suspend.target)
# which execute BEFORE kernel PM freezes and AFTER kernel PM resumes.
#
# Run with: sudo bash ~/fix-macbook12-suspend.sh

set -euo pipefail

if [[ $EUID -ne 0 ]]; then
echo "ERROR: Please run with sudo: sudo bash $0"
exit 1
fi

echo "=== 1/6 Removing old systemd-sleep hook ==="

if [[ -f /etc/systemd/system-sleep/brcmfmac-suspend.sh ]]; then
rm /etc/systemd/system-sleep/brcmfmac-suspend.sh
echo "Removed old hook"
else
echo "Old hook not found, skipping"
fi

echo ""
echo "=== 2/6 Creating WiFi recovery script ==="

cat > /usr/local/bin/brcmfmac-recovery.sh << 'SCRIPT'
#!/bin/bash
# Full PCIe reset + driver reload for BCM4350 on MacBook10,1
BRCM_PCI="0000:02:00.0"
LOG="/var/log/brcmfmac-resume.log"

log() {
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" >> "$LOG"
}

log "=== ${1:-manual} START ==="

# Step 1: Unload everything
log "Stopping iwd"
systemctl stop iwd 2>/dev/null

log "Removing brcmfmac modules"
modprobe -r brcmfmac_wcc 2>/dev/null || true
modprobe -r brcmfmac 2>/dev/null || true
sleep 1

# Step 2: PCIe bus reset (hardware level)
if [[ -f "/sys/bus/pci/devices/${BRCM_PCI}/reset" ]]; then
log "PCIe bus reset"
echo 1 > "/sys/bus/pci/devices/${BRCM_PCI}/reset" 2>/dev/null && log "reset OK" || log "reset failed"
sleep 2
else
log "No reset file, trying remove+rescan"
if [[ -d "/sys/bus/pci/devices/${BRCM_PCI}" ]]; then
echo 1 > "/sys/bus/pci/devices/${BRCM_PCI}/remove" 2>/dev/null || true
sleep 2
fi
echo 1 > /sys/bus/pci/rescan 2>/dev/null || true
sleep 3
fi

# Step 3: Reload driver
log "Loading brcmfmac"
modprobe brcmfmac 2>/dev/null && log "brcmfmac OK" || log "brcmfmac FAIL"
modprobe brcmfmac_wcc 2>/dev/null || true
sleep 2

# Step 4: Start iwd
log "Starting iwd"
systemctl start iwd 2>/dev/null && log "iwd OK" || log "iwd FAIL"
sleep 3

# Step 5: Verify
if ip link show wlan0 &>/dev/null && iw dev wlan0 info &>/dev/null 2>&1; then
log "wlan0 functional - SUCCESS"
else
log "wlan0 broken, retrying once more"
modprobe -r brcmfmac_wcc 2>/dev/null || true
modprobe -r brcmfmac 2>/dev/null || true
sleep 2
echo 1 > "/sys/bus/pci/devices/${BRCM_PCI}/reset" 2>/dev/null || true
sleep 2
modprobe brcmfmac 2>/dev/null || true
modprobe brcmfmac_wcc 2>/dev/null || true
sleep 3
systemctl restart iwd 2>/dev/null || true
sleep 2
ip link show wlan0 &>/dev/null && log "retry SUCCESS" || log "retry FAILED - may need reboot"
fi

log "=== ${1:-manual} DONE ==="
SCRIPT

chmod +x /usr/local/bin/brcmfmac-recovery.sh
echo "Created: /usr/local/bin/brcmfmac-recovery.sh"

echo ""
echo "=== 3/6 Creating suspend service (runs BEFORE kernel PM freeze) ==="

cat > /etc/systemd/system/brcmfmac-suspend.service << 'SVC'
[Unit]
Description=Unload brcmfmac WiFi driver before suspend
Before=sleep.target
StopWhenUnneeded=yes

[Service]
Type=oneshot
ExecStart=/usr/bin/rmmod brcmfmac_wcc
ExecStart=/usr/bin/rmmod brcmfmac
RemainAfterExit=yes
ExecStop=/usr/bin/modprobe brcmfmac
TimeoutSec=15

[Install]
WantedBy=sleep.target
SVC

echo "Created: /etc/systemd/system/brcmfmac-suspend.service"

echo ""
echo "=== 4/6 Creating resume service (runs AFTER kernel PM resume) ==="

cat > /etc/systemd/system/brcmfmac-resume.service << 'SVC'
[Unit]
Description=Reset and reload brcmfmac WiFi after resume
After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
StopWhenUnneeded=yes

[Service]
Type=oneshot
ExecStart=/usr/local/bin/brcmfmac-recovery.sh resume
TimeoutSec=30

[Install]
WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
SVC

echo "Created: /etc/systemd/system/brcmfmac-resume.service"

echo ""
echo "=== 5/6 Creating udev rule for Type-C hotplug ==="

cat > /etc/udev/rules.d/99-brcmfmac-typec.rules << 'UDEV'
# Reset brcmfmac when Type-C port state changes and WiFi is broken
ACTION=="change|remove", SUBSYSTEM=="typec", RUN+="/usr/local/bin/brcmfmac-typec-check.sh"
UDEV

chmod 644 /etc/udev/rules.d/99-brcmfmac-typec.rules
echo "Created: /etc/udev/rules.d/99-brcmfmac-typec.rules"

cat > /usr/local/bin/brcmfmac-typec-check.sh << 'CHECK'
#!/bin/bash
# Only reset if WiFi is actually broken
if ip link show wlan0 &>/dev/null && iw dev wlan0 info &>/dev/null 2>&1; then
exit 0
fi
/usr/local/bin/brcmfmac-recovery.sh typec-hotplug
CHECK

chmod +x /usr/local/bin/brcmfmac-typec-check.sh
echo "Created: /usr/local/bin/brcmfmac-typec-check.sh"

echo ""
echo "=== 6/6 Enabling services ==="

systemctl daemon-reload
systemctl enable brcmfmac-suspend.service
systemctl enable brcmfmac-resume.service
udevadm control --reload-rules

echo ""
echo "=== Verify ==="
echo "--- suspend service ---"
cat /etc/systemd/system/brcmfmac-suspend.service
echo ""
echo "--- resume service ---"
cat /etc/systemd/system/brcmfmac-resume.service
echo ""
echo "--- service status ---"
systemctl is-enabled brcmfmac-suspend.service brcmfmac-resume.service
echo ""
echo "=== DONE ==="
echo ""
echo "Test: close lid with charger -> wait 1min -> open lid"
echo "Check WiFi: iw dev wlan0 link"
echo "Check debug log: cat /var/log/brcmfmac-resume.log"
echo ""
echo "Manual recovery: sudo /usr/local/bin/brcmfmac-recovery.sh manual"
w568w
1 天前
「就用 macOS 不行吗」还有十秒到达战场。不过我也想问:macOS 不行吗?装 Omarchy 是单纯为了 Linux 的兼容性还是有性能和续航的提升?
hidemyname
1 天前
对啊,「就用 macOS 不行吗」
dingawm
1 天前
纯用命令行的话还好,有的桌面端 vibe 工具优先支持/更新 macOS
dxcqcv
1 天前
arch 不好吗
hihihihihi
1 天前
@w568w
@hidemyname

我自己也在用 macos ,对我自己来说,我很需要 tile 方式的窗口管理, 我也安装了 ghostty , 很方便使用分屏和一些简单的 tui ,比如 yazi ,但是最不舒服的是,不方便平铺浏览器,如果平铺浏览器就只能单个分一个 1/2 之类给浏览器,可能我更喜欢 omarchy 整个快捷按的设计吧。
hihihihihi
1 天前
如果用 omarchy ,我可以随时 float 显示一个浏览器,或者设置一个 webapp ,或者某一个 tile 窗口(没有 title )
hihihihihi
1 天前
omarchy 窗口可以用完即走,需要一个快捷按键就回来平铺。mac 上要先设置好,比如平铺了浏览器,关闭后,未来想要又要去点全屏平铺,还有包括浏览器。

还有就是 omarchy 基本都配置好了,开箱即用,还是很方便的。
zxjxzj9
1 天前
严肃推荐前几年的松下 lets note,跳水速度最快价格约为同配置 ThinkPad 的一半到三分之一. 缺点就是搞不好你会买到电池是坏掉的然后你再买一个电池可能就要电脑的一半价格...
YanSeven
1 天前
我现在是 48+2T 移动硬盘,UTM 虚拟机,分了一个 debian 一个 macos 虚拟机,日常开发任务跑在 Debian 虚拟机里面,有 Mac app 的开发需求就跑在 Mac 虚拟机上。缺点就是时常背着移动,没法儿完全 24h 挂机跑
YanSeven
1 天前
@YanSeven 我的 Mac 宿主机还是不太敢放开让 Agent 在里面玩儿,虚拟机里面就 solo+goal 就完事儿了
hihihihihi
1 天前
@YanSeven M 芯片 UTM 速度不行吧,尤其是跑 UI 相关的。 跑 cli 用 orbstack 快,
YanSeven
1 天前
@hihihihihi 我也想 orbstack 啊,但是我是 512 的内置磁盘,稍微用 docker 拉点东西缓存点镜像,Agent 本地再搞点测试数据,就满了...,买了这个 512G 懊恼的一批,移动硬盘是下策了。
ko20
1 天前
我的机械革命无界 14Pro 就感觉还好,虽然有些小瑕疵但是通过 AI 解决了。何况 23 年 3000 多买的 16G+512G + intel i7-12650H ,还要什么自行车
babymonster
1 天前
买一台懒猫微服,加一个折叠屏,感觉就不错呀,移动编程 https://lazycat.cloud/playground/guideline/435
w568w
1 天前
@hihihihihi 可以。老哥觉得平铺和窗口管理器哪种好用呢,我最近也在调研 tile window manager
hihihihihi
1 天前
@w568w 你可以试下 omarchy ,很舒服
qW7bo2FbzbC0
1 天前
@babymonster #15 @livid 广告
hihihihihi
1 天前
@babymonster 手机端编程不方便,我试过买了几把移动折叠键盘+termux/ssh 客户端,都不好使。
fregie
23 小时 30 分钟前
vibe coding 之前我开发主力机用 ubuntu ,vibe coding 之后已经无所谓了,服务器上跑 vibe coding server ,开发用个浏览器或 gui 就行了,什么系统已经无所谓了

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1227981

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX